52.22.1 If–Else

This activity splits the workflow into two or more branches, with a condition attached to each branch. Each condition (except the catch-all "Any": see below) is based on the outcome of a previous activity. Evaluation of conditions proceeds from left to right.
At the top level, the If–Else activity does not have any unique properties. Each branch of the construct, however, is constituted by an "if–else branch" activity which has the following property:

Condition Type property:

To define a non-trivial, yet simple condition, set Condition Type to Activity Result. The following attributes then become visible:

Activity: The activity (identified by its name in the script) whose outcome will determine the truth value of the condition.

Operator: Relational operator: "Equals" or "NotEquals".

Result: The activity result that you want to match. One of: Succeeded, Failed, Stopped by User, Stopped by Duration, Stopped by Event.

You can also set up a more complex condition in the form of a boolean expression involving multiple activity result conditions, each composed as described above. To this end, set Condition Type to Combined. The following attributes then appear (the structure can be expanded recursively):

Condition 1: A subcondition of type Activity Result, or another Combined condition.

Operator: Boolean operator: And or Or.

Condition 2: A subcondition of type Activity Result, or another Combined condition.

Finally, setting Condition Type to Any creates a trivial condition that always evaluates to true. This value should always be used as a catch-all condition for the rightmost if–else branch. (The If–Else construct is set up in that way by default.)
For an example of usage, see section "If–Else Constructs".