FinalBuilder's Flow Control actions provide many of the control constructs you expect
in a fully fledged programming language. You have Try/Catch/Finally actions
to handle exceptions; If/Then and Switch/Case actions to conditionally
execute child actions; For and While loops to iterate over actions
and Action Groups to structure a clean build project. Combined, you can
use these actions to create a FinalBuilder project as dynamic as your build process
requires.
Try/Catch/Finally
The Try/Catch/Finally actions can be used to structure exception handling.
If child actions of a Try block fail, then the actions under the Catch
block will be executed. This allows you to deal with errors that occur during
the try block.
These actions also need an End action to complete the block and they all
need to be at the same node level in the tree to form a valid block. You can also
nest the Try/Catch/Finally blocks, and they can be used in Try/Catch/Finally/End,
Try/Catch/End or Try/Finally/End constructs.
Switch/Case/Else
The Switch/Case/Else actions provide a selector construct using simple
case insensitive string comparisons.
The Case action must be a child of the Switch action, the same
goes for the Else. Note that the Else can also be used with the If..Then
action.
When used with the If..Then action the Else action must be the
next sibling action of the If..Then action. Another conditional action
is the If Previous Action Failed action. As the name suggests, this action
only executes if it's previous sibling action has "Ignore Failure" enabled (otherwise
the build would stop).
Async Action Group
You can also use the Aysnc Action Group to multi-thread components of your
build project. Run multiple actions in the build process simultaneously or entire
build processes in parallel to improve the speed of the build. The image below shows
a very simple implementation of the Aysnc Action Group executing 3 DOS
commands simultaneously.