Creating Your First Notification

This topic is interesting for first users of Automic Automation. It describes how to create a basic Notification object and the type of messages that can be triggered by the Notification object. The example described here addresses developers and object designers (who create the Notification objects) and operators and managers (who receive the messages).

In this example we are going to create a Notification object that will be triggered by the Windows Job that we have created here: Creating Your First Job. The Notification object will send the user an online message. Later we will use a Workflow to design the automation logic to link the Job to the Notification object.

What You Will Learn

What You Should know Beforehand

Overview

  1. Create a Message Notification
  2. Test the Notification Object
  3. Open and React to the Request Created by the Notification
  4. Next

Create a Message Notification

Create a STANDARD Notification object that sends an online message. Add it to the GETTING_STARTED_OBJECTS folder that you have created for the Windows Job (see Creating Your First Job).

  1. Open the GETTING_STARTED_OBJECTS folder and add the Notification object.

  2. Select the Call > STANDARD template and call it CALL.MESSAGE.DISK.SPACE.

  3. The new CALL.MESSAGE.DISK.SPACE Notification object opens to the Notification page. It is divided in three sections:

    Recipients section, where you specify the user or users who will receive the message.

    1. In the Recipients section, open the Recipient combo box and start typing your user name, which is the name with which you have logged in. Select it.

      In a production environment, instead of sending messages to only one user, you will probably want groups of users to be informed. The Recipient combo box lets you select User Groups too. You can add as many recipients as you need.

    2. In Select Calendar Event you can apply a Calendar condition to the Notification. If you do, the message is sent only on the dates specified by the Calendar Event. We will not use this attribute now.

      For more information, see Calendars (CALE) and Calendar Events.

    3. Click Add.

    Message section, where you write the content.

    1. In Subject enter Free disk space ( &FREESPACE_IN_BYTE# bytes).
    2. In the input field below Subject, you write the content of your message. Enter Free Disk Space (Bytes): &FREESPACE_IN_BYTE#.

    Settings section

    1. The Priority is set to High by default. We will leave it as it is.
    2. From Type, select Message.
  4. Save the Notification object.

Test the Notification Object

To test whether the Notification behaves as expected, we will execute it. For this purpose, click the Execute button in the toolbar. The following happens:

This is what it looks like:

Screenshot of the Notification object that we have just created. It shows the two pop up messages at the top of the screen.

Open and React to the Request Created by the Notification

You have two options to open the Requests view:

The Free disk space ( &FREESPACE_IN_BYTE# bytes) message is listed in the left pane of the view. Select it. This is what it looks like:

Screenshot of the Requests view, where the left pane contains an entry for the messages created by the Notification object. The message is selected and the content area shows the subject and the text of the message.

You can do several things with the message and with the object that triggered it. Since we have executed the Notification manually, all these functions refer to the Notification object:

Prepare the Notification for Executing in the Workflow

We want the message sent by the Notification object to publish the value of the variable. The time at which the variable is resolved during the execution of the Workflow is very important. At the time at which the Notification object runs, the value of the variable must be already available. To understand the setting that ensures that this happens, you must know how tasks execute.

When executing, tasks go through four stages. Each stage comprises various processing steps. Click the links in the following list to read more about each execution stage:

  1. Activation
  2. Generation
  3. Processing
  4. Completion

For our example, it is important to understand the difference between generating a task at activation time and at generation time (also called runtime). You configure this setting in the Runtime Parameters section on the Attributes page of executable objects.

Generate at activation time

With this option, the Notification is generated as soon as it is activated. One of the implications of this option is that the variable is resolved after the Notification object has been activated. Therefore, the Notification cannot read the value of the variable.

Generate at runtime

With this option, the variable is resolved before the Notification is generated. Therefore, the Notification can read the value of the variable.

Generation times in tasks in Workflows

One of the peculiarities of Workflows is that as soon as they are activated, all the tasks within them are activated too. For this reason, it is important to set the correct generation time in the tasks in a Workflow.

For more information, see Generating at Activation or at Runtime.

Next

So far we have created a Notification that can be executed manually. However, Notifications are key objects in process automation. To connect the Notification to the Job that should trigger it, we use a Workflow. For more information, see Creating your First Workflow.