Branching from Business Process to Business Process with a Compare Task

Make the tasks within a Business Process branch out to another Business Process based on a Compare task.

You must have two Business Processes created:
  • The one you want to initially use (Initial Business Process)
  • The one to which you want to branch (Branch Business Process)

If its unclear why you would ever want to do this, see Business Process.

  1. Open the initial Business Process object's editor.
  2. Under the Script section, click the Add button to add a new task.
  3. Click Click to select task to produce a selection window. Select the task or object that can enable the branching.
    Many times, this task is a Boolean (true or false) comparison, such as CompareFiles, CompareValues, or ContainsString.
  4. With that task highlighted, access the Properties view and define the task's parameters.
  5. Click the Add button to add a new task.
  6. Click Click to select task to produce a selection window. Select the Branch Business Process.
    Note: A Business Process must be contained in the current Project or in a Package that has been made available to the current Project to appear in the selector window.
  7. In the Branch Business Process' Label column, type a label for this task (for example, BranchBP). Press Enter.
  8. Set the Pass and Fail actions for the task/object that can prompt the branching.
    For example, suppose you want to use the Branch Business Process if a CompareFile task is false. You would:
    • Set the CompareFile's Pass action as the Initial Business Process' next step
    • Set the CompareFile's Fail action as BranchBP (or whatever you labeled the Branch Business Process)
  9. If you are sequencing tasks that primarily use the "next" and "end" labels, make sure the Branch Business Process is moved down to the bottom of the list, and the task before it (that would end the Initial Business Process) has as Pass action of end.
    Note: If you leave the Initial Business Process's second-to-last task as next and the Branch Business Process follows, you'll kick off the Branch Business Process.
  10. Click the Save button and close the editor to complete this task.
    For more information on defining a Business Process, see Understanding a Business Process.