Conditional Routing Tutorial

This tutorial shows you how to route an item in an application workflow based on the amount of an expense reimbursement request.
  • If the amount is less than $100.00, no approval is required, so the item is routed directly to the Accounts Payable and Processing states, where the reimbursement is processed. After the reimbursement is processed, the item is closed.
  • If the amount is between $100.00 and $1000.00, inclusive, a manager's approval is required, so the item is routed to the Manager state. The manager approves the request and transitions the item to the Accounts Payable state.
  • If the amount is more than $1000.00, a vice president's approval is required, so the item is routed to the Vice President state. The vice president approves the request and transitions the item to the Accounts Payable state.
Note: This tutorial does not demonstrate all ways to configure decisions and creating rules and application variables. For complete information about these tasks, see Using Conditional Routing, Creating a Rule, and Creating an Application Variable.

To use conditional routing:

  1. Create a process app from the Create New Process App Dialog Box and name it Expense Reimbursement.
  2. In the application workflow, add states and a decision as follows:
    1. Drag a Decision from the Workflow Palette to the workflow editor, and name it Amount?.
    2. Drag four "active" states from the Workflow Palette to the workflow editor and give them the following names:
      • Accounts Payable
      • Manager
      • Vice President
      • Processing
    3. Drag a "completed" state to the workflow and name it Closed.
  3. Rename the Branch transition from the Amount? decision to Send to A/P, and connect it to the Accounts Payable state.
  4. Rename the Otherwise transition from the Amount? decision to Send to VP, and connect it to the Vice President state.
  5. Add "regular" transitions from the Workflow Palette as shown in the following table.
    Note: Quick transitions do not have forms associated with them and do not require user input. You can drag Quick from the Transitions section of the Workflow Palette, or make a regular transition a quick transition by selecting the Quick transition (do not show a form) check box on the Options tab or Form tab of the transition Property Editor. Outgoing "regular" transitions from a decision are configured as quick transitions by default.
    Source Target Name Quick Transition?
    New Amount? Evaluate Yes
    Amount? Manager Send to Mgr Yes (default)
    Manager Accounts Payable Send to A/P No
    Vice President Accounts Payable Send to A/P No
    Accounts Payable Processing Process No
    Processing Closed Close No
  6. Add a Numeric field to the Expense Reimbursement table:
    1. Name the field Amount.
    2. On the Options tab of the field Property Editor, select Fixed precision, specify two digits to be displayed after the decimal point, and specify $ as the prefix.
  7. Select the Amount? decision in the workflow editor, and then select the Rules tab of the decision Property Editor.
  8. Select the Send to A/P transition, and then click the arrow in the Rule column.
  9. Select (New rule). The rule editor opens.
  10. On the General tab of the rule Property Editor, type A/P Direct in the Name box.
  11. Drag an Amount field from the Rule Palette onto the Rule: A/P Direct block in the rule editor.
    1. Select the > conditional operator.
    2. Make sure Value is selected in the drop-down list, and type 0 in the box.
  12. Drag an AND logical operator from the Rule Palette onto the Amount field.
  13. Drag another Amount field onto the bottom line of the AND operator.
    Note: You can optionally skip the previous step and instead drag the other Amount field onto the existing Amount block. This automatically adds the AND logical operator to the expression.
    1. Select the <= comparison operator.
    2. Make sure Value is selected in the drop-down list, type 100.00 in the box, and then click Convert to variable.
      Note: Designers can use the same application variable in multiple rules. They can also change the default value of an application variable, and all rules that reference that field will use the new value. For more information, see About Application Variables.
  14. Click Edit application variables.
  15. In the application variable editor, rename Amount Variable to Threshold.
  16. Click the Navigate Backward button image in the quick access toolbar at the top of the SBM Composer window two times.
  17. On the Rules tab of the Amount? decision Property Editor, select the Send to Mgr transition, and then click the arrow in the Rule column.
  18. Select (New rule).
  19. On the General tab of the rule Property Editor, type Manager in the Name box.
  20. Drag an Amount field from the Rule Palette to the Rule: Manager block in the rule editor.
    1. Select the > comparison operator.
    2. Click Variable in the drop-down list at the right of the expression, and then select Threshold.
  21. Drag an AND logical operator from the Rule Palette onto the Amount field.
  22. Drag an Amount field onto the bottom line of the AND operator.
    1. Select the <= comparison operator.
    2. Make sure Value is selected in the drop-down list, and type 1000.00 in the box.
  23. Click the Navigate Backward button image.
  24. On the Rules tab of the Amount? decision Property Editor, select the Send to VP transition, and click the arrow in the Rule column.
  25. Select [Otherwise]. One "otherwise" rule must be mapped to a transition. This transition is executed if the rule mapped to it evaluates to "true," or if no rule evaluates to "true." In this case, any amount over $1000.00 will use this rule and the Send to VP transition will be executed.
  26. Validate, publish, and deploy the process app.

Related Topics