A Broadway flow is a graph / tree built of several Stages where each Stage is a step of the flow that can include one or more Actors. The flow's Stages are executed consecutively from left to right. When there are several Stages on the same level, the execution order is top down. The Actors within each Stage are also executed top down.
This article describes the following Stage features:
A Stage can be added anywhere in the flow.
To add a Stage to the end of the flow, click the big + in the empty Stage area.
To add a Stage in the middle of the flow, click in the right corner of the Stage to open the Stage context menu and select either Insert After or Insert Before.
To delete a Stage, click Delete in the Stage context menu.
Each Stage can be split into two (and so on) to create several stages on the same dependency level.
To split a Stage, click in the right corner of the Stage to open the Stage context menu and select Split.
The Split's logic depends on the position of the Stage in the flow and includes the following rules:
If a condition is required in the flow, the flow can be split and a Stage Condition Actor can be added to one or more Stages that have been created as a result of the split.
The condition Actor can have any number of output parameters; however a True / False check is always performed on the first output parameter. Note that this parameter does not need to be Boolean, since Broadway automatically casts its type to Boolean. For example, an empty string is considered to be false while a string that is not empty is considered to be true.
Click for more information about Broadway data types.
The else condition can be set on a Stage on the same level as the Stage Condition and is only executed if all conditions are false. Stages without a Stage condition are always executed and do not impact the else Stage.
The Stage's conditions impact all subsequent Stages in the same branch. Thus:
To add a Stage condition to the flow, click in the right corner of the Stage to open the Stage context menu and select Stage Condition to add an Actor to the Stage. The added Actor is green.
To mark a Stage as else, click > Else.
Note that although any Actor can be used as a condition, a JavaScript Actor is a powerful actor for expressing complex conditions. The script returns the value of the last line and does not expect the return keyword.
The following example displays a split flow with a condition and an else Stage where each branch is then also split into a condition and an else Stage.
Depending on the flow's input, the execution can run via one of four alternatives on the third level.
A Broadway flow is a graph / tree built of several Stages where each Stage is a step of the flow that can include one or more Actors. The flow's Stages are executed consecutively from left to right. When there are several Stages on the same level, the execution order is top down. The Actors within each Stage are also executed top down.
This article describes the following Stage features:
A Stage can be added anywhere in the flow.
To add a Stage to the end of the flow, click the big + in the empty Stage area.
To add a Stage in the middle of the flow, click in the right corner of the Stage to open the Stage context menu and select either Insert After or Insert Before.
To delete a Stage, click Delete in the Stage context menu.
Each Stage can be split into two (and so on) to create several stages on the same dependency level.
To split a Stage, click in the right corner of the Stage to open the Stage context menu and select Split.
The Split's logic depends on the position of the Stage in the flow and includes the following rules:
If a condition is required in the flow, the flow can be split and a Stage Condition Actor can be added to one or more Stages that have been created as a result of the split.
The condition Actor can have any number of output parameters; however a True / False check is always performed on the first output parameter. Note that this parameter does not need to be Boolean, since Broadway automatically casts its type to Boolean. For example, an empty string is considered to be false while a string that is not empty is considered to be true.
Click for more information about Broadway data types.
The else condition can be set on a Stage on the same level as the Stage Condition and is only executed if all conditions are false. Stages without a Stage condition are always executed and do not impact the else Stage.
The Stage's conditions impact all subsequent Stages in the same branch. Thus:
To add a Stage condition to the flow, click in the right corner of the Stage to open the Stage context menu and select Stage Condition to add an Actor to the Stage. The added Actor is green.
To mark a Stage as else, click > Else.
Note that although any Actor can be used as a condition, a JavaScript Actor is a powerful actor for expressing complex conditions. The script returns the value of the last line and does not expect the return keyword.
The following example displays a split flow with a condition and an else Stage where each branch is then also split into a condition and an else Stage.
Depending on the flow's input, the execution can run via one of four alternatives on the third level.