Setting the priority of a rule

You can set priorities on the rules of an agent to define the order in which the rules are executed.

About this task

The priority property determines in which order the actions of the rules are triggered. For example, when several rules react to the same event, you can define which rule actions must be triggered first if their conditions are met.

You define priorities using a constant. The default priority is 0. Therefore, if a rule is the only rule that requires a priority, you can set the priority to any positive value.

Procedure

  1. Double-click the rule in the Solution Explorer to display the Properties view for the rule.
    Tip: If the Properties view is not displayed, click Window > Show View > Other, select General > Properties, and then click OK. Click in the rule editor, to view the properties specific to this rule.
  2. Make sure that the “hand” icon is displayed next to the Value column header of the Properties view.
  3. Click priority, and in the Value column, type a number that represents the priority.

    The number can be any Java™ integer value between -109 and +109 . The larger the number, the higher the execution priority of the rule.