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 to run every hour and check for tickets that contain certain values in the Title and change their Priority.

There are certain limitations when selecting values for the different time periods (hourly, daily, and so on). Because the utility that manages time-based triggering starts fresh with each new time period, you cannot select time period values that are greater than the maximum normally expected.

For example, if you want 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.

Maximum values, therefore, are 59 for minutes, 24 for hours, 31 for days, 52 for weeks, and 12 for months.

The following topics are provided:

Best practices

Best practice

  • Design time-based rules to not update a large number of tickets at the same time.
  • When you define a time-based rule, consider how the rule might affect the application data in the production instance.
  • If you have an existing time-based rule that might impact a significant number of tickets, consider defining additional business rules to achieve the same end result. If too many tickets are updated at the same time during the business hours, it might cause performance issues.
  • If possible, schedule time-based rules to run outside of business hours, especially the ones that might impact a lot of tickets. Updating too many tickets at the same time can cause performance problems for other users of the system.
  • Do not schedule multiple time-based rules to run at the same time.
  • Ensure that you configure the right schedule to run a business rule. For example, do not configure to run a business rule every 15 minutes if you can meet the business need by running it once a day.

Additional considerations

  • Rules are based on the time zone of the system server.
  • Hour values are expressed in military format, that is, 1600 hours represents 4 p.m. However, 16 hours represents 16 hours from the start of the work schedule day.
  • Triggers scheduled for every other day or every other week, start fresh on the first day of the month. In production, this means that the first report of a month may 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 fresh 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

  1. Open the container and item where you want to define the rule:
    1. Click the Administration tab
    2. 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.
    3. In the left pane, click the item link (such as Record Definitions in workspaces).
      The Items page appears. 
    4. Double-click the item that you want to modify.
      The Item details page appears.
  2. In the left pane, click Business Rules.
  3. 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.
  4. In the Business Rule Name field, enter a descriptive name for this rule.

  5. (Optional) In the Description field, type a useful description.

  6. In the Business Rule Schedule field, accept the default of Run Any Time or select a work schedule defined for the container.
  7. In the Triggers section:
    1. Click Add new trigger.
    2. In the Available triggers field, select Time based.
    3. In the Frequency field, select how often you want the rule to fire, such as checking every hour.
    4. In the next fields, enter the values for the selected interval such as selecting a day of the week, an hour, and a minute.
    5. Click Create.
  8. In the Criteria section:
    1. Click Add new condition.
    2. In the first field, select the field that you want used for this rule.
    3. In the Contains field, accept the default value of contains.
    4. In the Value field, enter the value that will trigger this rule.
    5. Click Create.
  9. In the Actions section:
    1. Click Add new action.
    2. In the Action field, select the action you want performed when this rule fires.
    3. In the next field, select the field that will be used by this rule.
    4. 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.
    5. Click Create.
  10. Click Save.
  11. Publish the container to implement your changes:

    1. In the breadcrumb trail, click the container link.

    2. Click Save and Publish.

      A confirmation message appears.

    3. Click Yes.

      The Publication Succeeded message appears, showing the number of errors and warnings.

Related topics

Configuring business rules

Managing business rules

Deleting business rules

Was this page helpful? Yes No Submitting... Thank you

Comments