A collection of connected states.
A StateGraph is used to keep track of all states that are connected (have transitions between them). It does not include the substatemachines in a Parallel's branches: those are their own StateGraphs, but the graphs themselves have a hierarchical relationship as well.
By assigning states to a definitive StateGraph, we verify that no state machines are constructed. In particular:
- Every state object can only ever be in 1 StateGraph, and not inadvertently be used in two graphs.
- Every stateId must be unique across all states in the entire state machine.
All policy statements in all states in all substatemachines are bubbled so that the top-level StateMachine instantiation can read them all and add them to the IAM Role.
You do not need to instantiate this class; it is used internally.
new StateGraph(startState: State, graphDescription: string)
State— state that gets executed when the state machine is launched.
string— description of the state machine.
|policy||The accumulated policy statements.|
|start||state that gets executed when the state machine is launched.|
|timeout?||Set a timeout to render into the graph JSON.|
The accumulated policy statements.
state that gets executed when the state machine is launched.
(optional, default: No timeout)
Set a timeout to render into the graph JSON.
Read/write. Only makes sense on the top-level graph, subgraphs do not support this feature.