Action Rules

Action Rules List

This form displays all of the action rules in the system.

If a given action rule is ticked as Active, it can be run automatically at the time interval you specify using the Action Service if this is running. If this is not running, you can run a rule by clicking the button "Run Selected Rows"

To view an action rule, double click in the blank column to the extreme LEFT of that row in the grid.

To create a new action rule, click the green plus button at the top of the form. The Action Rule Edit form will then appear.

To run selected action rules, select the appropriate rows in the grid and click the 'Run Selected Rules' button.

Action rule list

Editing an Action Rule

Action rules are based upon views in the database. These views are listed in the 'Entity' dropdown list and must be entered in the table AMS.ACT_ActionViews to appear in this dropdown. Note that there is NO way to edit this table in the CMSi database itself and this table must be edited manually in SQLServer Management Studio if you are creating your own view.

The table AMS.ACT_ActionViews requires the following columns to be populated:

  • GUID: A unique identifier for the Action View. This is populated by default with a new value.
  • Module: The three-letter code (trigram) for the module that the Action View is based on. This associates the view with a particular module and controls which action groups and types can be selected in the form.
  • ViewName: The full name (including schema) of the view in the database.
  • DisplayName: The name of the view as it appears in the drop down list of the form.

Action Rule Form

Action rule edit

To create a new action rule, choose the entity (view) that the rule will be based on (see above). Next create the conditions for the rule by selecting an attribute (column) of the entity and clicking 'Add Condition'. This displays a dialog to edit the condition. The attribute can be compared to a value (e.g. ContactName = 'Jones') or another attribute in the view (e.g. StartDate > EndDate). The conditional operators are sensitive to the type of column as are the attributes that can be compared e.g. only numbers can be greater or less than a value, only strings can contain other strings.

Any number of conditions can be added to the rule in this way. The SQL for the condition can be edited directly by clicking Edit SQL. This allows the users to change ANDs to ORs or change priority of the terms in the condition by adding parentheses for example.

Next select the action group and type. These dropdowns are populated from the table AMS.ACT_ActionTypeLUT, which associates action types with individual modules.

If an entity in the rule's associated view meets the conditions set for the rule, an action is created. This may be assigned to a user, who will be able to view the action in their action list. Alternatively, the action may run a stored  procedure or .NET method that, typically, will update data in the database. These settings are edited at the bottom of the form.

Action Rules can be scheduled to be applied at particular times at set intervals from a start date. Edit the controls in the top right of the form to set these values.

A time limit (in days) can also be set for any action to be resolved by the assignee. When this time has expired, the action will be flagged overdue in the assignee's Action List.

Finally, rules can be toggled between active and inactive. An inactive rule will not be applied to the database according to its schedule and so will not generate any new actions (though it may remain associated with actions that were generated when it was active).

 

Find out more