Defining Order Rules

You define rules for orders to evaluate the order contents. Rules are used in process flow decisions, conditional transitions, subprocess logic, delay activities, jeopardies, and events and enable you to evaluate against the content of an order by comparing data node to data node or data node to a fixed value. When you compare data to data, you compare the contents of two data nodes (of the same type); for example, you might compare a due date with a payment date, based on some condition. When you compare data to a value, you compare a data node to a fixed value.

When you first create an order, the system automatically assigns to the order a system-based null_rule which always evaluates to true. This default configuration ensures that the order will be submitted to a process. You cannot remove the null_rule or modify its definition; however, you can define any number of your own custom rules.

To define rules for orders:

  1. From the Studio menu, select Show Design Perspective.

  2. Click the Studio Projects tab.

  3. Double-click an order.

    The order displays in the Order editor.

  4. Click the Rules tab.

    See "Order Editor Rules Tab" for more information about the fields on this tab.

  5. In the Rules area, click the corresponding Add button.

    The Add Rule dialog box is displayed.

  6. In the Name field, enter a name for the new rule.

    The name must be unique among rule entity types in the same namespace.

  7. Click OK.

    The new rule is displayed in the Name column. You can select the rule entity in the Name column at any time to edit the rule name.

  8. In the Name column, select the new rule entity.

  9. In the Definition tab, click the Add button.

    The Order Template Selection dialog box is displayed.

  10. Select the node against which the rule will evaluate.

    You can select one node for the rule or select multiple nodes to create multiple rules.

    You can right-click a data structure definition node to specify a derived complex type.

  11. Click OK.

  12. Select the node you just added.

  13. Click the Properties button.

    The Properties view Rules Expressions tab is displayed, where you can define values for the fields in the remaining steps. See "Properties View Rules Expression Tab" for more information.

  14. In the Data field, enter the XPath expression to identify the location of the data node.

    You can also select a data node from the Data Element view and drag the selected data node into the Data field to define the XPath expression. To drag a data node into the Properties view Rules Expressions tab, press and hold the Alt key before you select and drag the data node to the field.

    Additionally, you can click the corresponding Select button to select another data node.

  15. In the Operator field, select an operator from the list.

    The options available in the Operator field depend on the data type used in the Data field.

  16. In the Data/Value field, enter an XPath expression or enter a fixed value.

    You can select a data node from the Order Template tab and drag the selected data node into the Data/Value field to define the XPath expression. To drag a data node into the Properties view Rules Expressions tab, press and hold the Alt key before you select and drag the data node to the field.

    Additionally, you can click the corresponding Select button to select another data node.

  17. In the Order editor Definition tab, click Add to add another expression to the rule.

    Each condition is separated by either And or Or (And is the default).

Related Topics

Order Editor

Modeling Data