You can add conditional logic to a process flow so that different activities are executed
based on the return code of a preceding activity. For example, you could execute one
activity if a job returns a return code of 1 and another activity if a job returns a
return code of 0. In this way you can build conditional branching into your process
flow.
-
Open the process flow in Enterprise Designer.
-
Double-click the transition between two activities of the flow.
A transition is the line that connects two activities. For
example, the line between the GeocodeAddress activity and the Run Program
activity shown here is a transition:
The Transition Options window appears.
-
Select the type of transition you wish to add.
- Simple
- Select this option if you always want this path in the process flow
to execute.
- Conditional
- Select this option if you only want this path in the process flow to
execute if the upstream activity returns a specific return code or
return codes, or a range of return codes.
- Otherwise
- Select this option if you want this path in the process flow to
execute only if the conditions in the other transitions leading from
the activity are not met.
Note: Only one
Otherwise transition can exist among the
transitions leading from an activity.
-
Click OK.
-
To configure which transitions trigger an activity, right-click the activity,
select Input modes, then choose one of the
following:
- First Input
- The first transition coming into this activity, whether through a
Simple, Conditional,
or Otherwise transition, triggers the
execution of the activity. Other transitions are ignored.
- All Inputs
- The activity does not run unless all transitions coming into this
activity are taken.
-
To configure which transitions leading out of an activity are taken,
right-click the activity, select Output modes, then
choose one of the following:
- First Output
- The first transition that evaluates to true is taken. Other
transitions are ignored, even if their conditions evaluate to
true.
- All Outputs
- All transitions that evaluate to true are taken.