Defining time-based rules
You can define rules that run at specific intervals and perform an action based on the results. For example, you can define a rule that runs every hour, checks for tickets that contain certain values in the Title and change their Priority.
You specify intervals in minutes, hours, days, weeks, or months. You cannot select a value for an interval that is greater than the maximum for that interval because the utility that manages time-based triggering starts afresh with each new interval. Maximum values, therefore, are 59 for minutes, 24 for hours, 31 for days, 52 for weeks, and 12 for months.
For example, to run a report every so many hours, you can enter any value from 1 to 24, but not larger values. If you enter an invalid value, the system generates an error message when you save the rule.
Rules are based on the time zone of the system server. Hour values are expressed in military format (for example, 1600 represents 4:00 P.M.). However, 16 represents 16 hours from the start of the work schedule day.
Triggers scheduled for every other day or every other week start afresh on the first day of the month. In production, this means that the first report of a month might occur sooner than expected based on the last report of the previous month. For example, if you run a report every other day and the last report runs on the last day of a month, the next report will run on the first day of the next month because the cycle begins afresh every month.
Use caution when selecting values that will trigger the rule very frequently as this may slow performance.
To define a time-based rule
- Open the container and item where you want to define the rule:
- Click the Administration tab.
- In the appropriate section, click the name of the container, or click Manage to open the container Administration page. Then double-click the container.
The container details page appears. - In the left pane, click the item link (such as Record Definitions in workspaces).
The Items page appears. - Double-click the item that you want to modify.
The Item details page appears.
- In the left pane, click Business Rules.
- Click New Business Rule and select the appropriate rule type.
The Rule Builder page appears. For detailed information about configuring different types of rules, see Types-of-business-rules. - In the Business Rule Name field, enter a descriptive name for this rule.
- (Optional) In the Description field, type a useful description.
- In the Business Rule Schedule field, accept the default of Run Any Time or select a work schedule defined for the container.
- In the Triggers section:
- Click Add new trigger.
- In the Available triggers field, select Time based.
- In the Frequency field, select how often you want the rule to fire, such as checking every hour.
In the next fields, enter the values for the selected interval such as selecting a day of the week, an hour, and a minute.
- Click Create.
- In the Criteria section:
- Click Add new condition.
- In the first field, select the field that you want to be used for this rule.
- In the Contains field, accept the default value of contains.
- In the Value field, enter the value that will trigger this rule.
- Click Create.
- In the Actions section:
- Click Add new action.
- In the Action field, select the action that you want to be performed when this rule is triggered.
- In the next field, select the field that will be used by this rule.
- In the Value field, enter the value or formula for this rule. If you want to use field name variables, select them from the Field Variables list and click Insert.
- Click Create.
- Click Save.
- Publish the container to implement your changes:
- In the breadcrumb trail, click the container link.
Click Save and Publish.
A confirmation message appears.
Click Yes.
The Publication Succeeded message appears, showing the number of errors and warnings.