start
Directs the evaluation process to the beginning of one of the Flow's Segments. This command interrupts the evaluation of the current Step and Segment, causing any following commands within the Step to not be evaluated.
Attributes
segment | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
Defines the Segment whose evaluation is to start. The resolved value of this attribute should be the ID of a Segment or one of the five constant values described below, defining the Segment into which the evaluation process heads to. These six values point into Segments dependent on the structure of the Flow and the Segment this command is in:
If the resolved value is not one of those five, it is interpreted as the ID of a Segment. |
Examples
The start
command allows the evaluation process to proceed through the Segments in a non-linear manner. Unlike its cousin command next, start
is not essential in the Flow, as the evaluation process will move from Segment to another by itself.
Either use the ID of a Segment directly, or one of the constant values - the following would direct the evaluation process back to the start of the Flow regardless of Segment IDs:
<if test="${backToStart}">
<start segment=":first">
When doing something like the above, directing the evaluation process "backwards", just be sure that the condition or something else is preventing the start
from being evaluated again with the same resolved value - otherwise the evaluation process will end up in an infinite loop. Something like this would prevent the loop from occurring:
<if test="${backToStart}">
<set var="backToStart" value="${false}">
<start segment=":first">
One of the tools to prevent infinite loops, and a good companion command of start
in general, is setEvent, as it can change the starting Steps of Segments. This, for example, allows previously evaluated Segments to be evaluated again but go through different Steps.
<setEvent eventID="secondRun">
<start segment=":previous">