setEvent
Changes the currently running Flow's Event value, which dictates the starting Step of each Segment. The Event value is initially set at the Flow's start, defined by the request parameters sent to Dynamo, and remains unchanged throughout the Flow unless changed with this command.
Attributes
eventID | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
Defines the new Event value for the Flow. The resolved String has to consist of at least one character. |
Examples
The setEvent
command provides an additional way of dynamically altering the Flow's path, but unlike the next command which affects the path within the current Segment, changing the Event value affects the path in future Segments. One use case for this is to use setEvent
when critical data retrieval, for example, fails and the rest of the Flow cannot function properly. In this case setEvent
can change the Event to something that will cause the rest of the Segments to be skipped or go into separate error-handling paths.
The use of the command itself is simple - just set the eventID
attribute to resolve into an Event value that the Flow's remaining Segments react to.
<setEvent eventID="problem">
This should then be followed by Segments that have a starting Step for the "problem" Event, or no defined starting Step at all causing those Segments to be skipped.