Building a Policy

Applies To: Opalis 6.3

This section describes how to build Policies.

Plan your Automation

When building a Policy, it is important to have a defined procedure that answers the questions:

  1. When will the Policy run?

  2. What actions will be taken?

The answer to the first question will correspond to the Monitor objects that will be used to trigger the Policy. The answer to the second question will determine the objects that will be used to take the resulting actions. You also need to know what data you expect from each action that is taken.

Create a New Policy

Once you have determined what will be automated you can start building, testing, and deploying your Policy. By default, all new policies are created using the Pipeline databus.

To create a new Policy

  1. Open the Client.

  2. In the Connections pane, click the Create a new policy icon. A new Policy tab appears in the workspace with a generic name.

  3. Right-click the Policy tab and select Rename. The Confirm Check out dialog appears. Click Yes.

  4. Type a name for the Policy, and press Enter.

Add Objects

There are two types of objects: Monitors and Actions. Monitor objects are triggered from an external source and are used to start policies. Actions are triggered by other objects and will carry out required procedures in response to the event detected by the Monitor. The names of the Monitor objects always begin with the word "Monitor", while the names of the Action objects are descriptive of the action that the object performs.

To add objects to a Policy

  1. In the Objects pane, drag and drop a monitor object to the Policy. For example, open the Scheduling section, and drag and drop the Monitor Date/Time object into the Policy.

  2. From the Objects pane, drag and drop an Action object to the Policy. For example, open the Email section, and drag and drop the Send Email object into the Policy.

  3. When the objects have been put on the workspace, double-click each object to configure it. For more information about configuring individual objects, click the Help button on the configuration dialog of the object.

After you have placed a Monitor and Action object on the workspace, you will create a link from the Monitor object to the Action object.

  • Click and drag the right arrow of the Monitor object. Drop the link on the Action object. You have now created a Policy and are ready to test it.

Test the Policy

When you have finished building the Policy, you can test it using the Policy Testing Console. The Policy Testing Console enables you to verify each object in the Policy as it executes in test mode.

To test a policy

  1. In the Client, open the Policy that you want to test. Click the Test icon. The Policy Testing Console appears.

  2. To run through the Policy from beginning to end, without stopping, click Run. To run through the Policy one object at a time, click Step Over. When the Policy Testing Console pauses at the next object, click Next to continue.

For a complete description of Policy Testing Console functionality, including the ability to add breakpoints, see the Policy Testing Console help. If the Policy Testing Console indicates that there are errors in the Policy, close the Policy Testing Console, return to the Policy in the Client, make adjustments, and test the Policy again.

Check in the Policy

Once you have finished creating and testing a Policy, you check in your changes to commit them to the Datastore.

To check in your changes

  1. Right-click the Policy tab and select Check In.

  2. To require check-in comments for future Policy changes, click Options and select Configure. Select the Prompt for comment on check in check box.

  3. To enable the ability to make changes to a Policy without checking it out first, select the Automatic check out check box.

  4. Click Finish.

Start the Policy

Once you have committed your changes, you will start the Policy so that it can be executed. If the Policy begins with a Monitor object, the Monitor object will wait indefinitely to be triggered by an external source. Once a Monitor object has been triggered, the Policy runs and the Monitor begins waiting for another trigger. If your policy does not begin with a Monitor object, then it will run once and then stop.

To start the Policy

  • Click the Policy tab and then click the Start icon.

    The Policy starts on the Action Server that was assigned to it, or the default Action Server.

Important

Be aware that you can only create one workflow in each Policy.