Practicing with the Decision Step

Prerequisites:

You performed the steps in Creating an Empty Orchestration Workflow For the Decision Step.

In this exercise, you add a Decision step to the DecisionOrchWF orchestration workflow and define values for it. When DecisionOrchWF is invoked, it inserts One, Two, or Otherwise (depending on your input) in the Title box of the State2 state form after you click the OK button on the transition form between State1 and State2. If you enter the number 1 and then click OK, One is inserted into the Title box. If you enter the number 2, Two is inserted. If you enter any other text, Otherwise is inserted.

To use the Decision step in an orchestration workflow:

  1. In App Explorer, under StepPaletteOrch, under Orchestration Workflows, select DecisionOrchWF.
  2. In the New Items section of the Step Palette, drag and drop a Decision step onto the line between the Start and End steps.
  3. Right-click the Decision step, and then select Insert New Branch.

    A new branch is added above the Otherwise branch.

  4. On the General tab of the Property Editor, change the Name to One, and then press the Tab key.
  5. On the Options tab, in the Rule section, enter the following function: NORMALIZESPACE(EventNoticeWithReply\Extension\Title)="1".
  6. In the New Items section of the Step Palette, drag and drop a Calculate step onto the One branch.
  7. On the Options tab of the Calculate step Property Editor, in the Target section, enter the following expression: EventNoticeWithReply\Extension\Title
  8. In the Expression section, enter the following text, including the quotation marks: "One"
  9. Right-click the Decision step, and then select Insert New Branch.

    A new branch is added between the One branch and the Otherwise branch.

  10. On the General tab of the Property Editor, change the Name to Two, and then press the Tab key.
  11. On the Options tab, in the Rule section, enter the following function: NORMALIZESPACE(EventNoticeWithReply\Extension\Title)="2".
  12. In the New Items section of the Step Palette, drag and drop a Calculate step onto the Two branch.
  13. On the Options tab of the Property Editor, in the Expression section, enter the following text, including the quotation marks: "Two"
  14. In the Target section, enter the following expression: EventNoticeWithReply\Extension\Title
  15. In the New Items section of the Step Palette, drag and drop a Calculate step onto the Otherwise branch.
  16. On the Options tab of the Property Editor, in the Expression section, enter the following text, including the quotation marks: "Otherwise"
  17. In the Target section, enter the following expression: EventNoticeWithReply\Extension\Title
  18. Select the End step.
  19. On the Data Mapping tab, expand Extension, locate the Title data element, select the cell corresponding to the Source elements column, and then click the down arrow.
  20. In the Select a source popup, expand DecisionOrchWF, Inputs, EventNoticeWithReply, and Extension; select Title; and then click OK.