Step branches

A branch is a transition from one step to another. There are multiple kinds of elements that facilitate branching to another step. They are:

  • GO
  • TRIGGER
  • TIMEOUT

The Workflows editor indicates a branch by linking two steps with a line and placing one of the following icons on the line to indicate the branch type.

Type

Icon

Description

GO



A branch or transition to another workflow step. It occurs only within an AutoStep Workflow Step workflow step.

  • If there is only a single GO branch within the workflow step, branching occurs immediately upon workflow reaching that point.
  • If there are multiple GO branches within the workflow step, all GO branches (except one) must contain conditional logic. The workflow then determines the appropriate next step based on the defined conditions.

TRIGGER



A branch or transition to another workflow element. It occurs only within a ManualStep Workflow Step workflow step. Branching occurs only upon manual invocation from outside the workflow.

TIMEOUT



A branch or transition to another workflow element. It occurs only within a ManualStep Workflow Step workflow step. Branching to another workflow step occurs only after the passing of a specific time interval.

All branch elements contain a To value that indicates the step to which this branch leads. It can also contain an optional embedded Gosu block for the workflow to execute if a workflow instance follows that branch.

How a workflow decides which branch to take depends entirely on the type of the branch. However, the order is always the same:

  • The workflow executes the Enter block for a given step and generates any events, notifications, and activities (waiting for these activities to complete).
  • The workflow attempts to find the first branch that is ready to be taken. It starts with the first branch listed for that step in the outline view, then moves to evaluate the next branch if the previous branch is not ready.
  • If no branch is ready (which is possible only on a ManualStep), the workflow waits for one to become ready.
  • After the workflow selects a branch, it runs the Exit block, then executes the Gosu block of the branch.
  • Finally, the workflow moves to the next step and begins to evaluate it.