Evaluation of this command causes the currently ongoing Flow evaluation process to finish immediately. Normally the end of a Flow's evaluation is when the last Segment finishes, but this command can trigger the conclusion anywhere within the Flow. This command also prevents a follower Flow set through the setFollower command from continuing the evaluation process.


The finish command can be useful in implementing Flow-concluding buttons in Screens, as well as putting the Flow to an early end if some critical operations within the logic fail or do not produce expected results. If, for example, a Screen button with the name "Exit" is to finish the Flow, the following in a Step following the Screen would do the trick:

<if test="${param.button == 'Exit'}">