@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)",
date="2022-07-01T09:58:36.609Z")
public class StateGraph
extends software.amazon.jsii.JsiiObject
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:
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.stepfunctions.*; State state; StateGraph stateGraph = new StateGraph(state, "graphDescription");
Modifier | Constructor and Description |
---|---|
protected |
StateGraph(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
StateGraph(software.amazon.jsii.JsiiObjectRef objRef) |
|
StateGraph(State startState,
java.lang.String graphDescription) |
Modifier and Type | Method and Description |
---|---|
java.util.List<PolicyStatement> |
getPolicyStatements()
The accumulated policy statements.
|
State |
getStartState()
state that gets executed when the state machine is launched.
|
Duration |
getTimeout()
Set a timeout to render into the graph JSON.
|
void |
registerPolicyStatement(PolicyStatement statement)
Register a Policy Statement used by states in this graph.
|
void |
registerState(State state)
Register a state as part of this graph.
|
void |
registerSuperGraph(StateGraph graph)
Register this graph as a child of the given graph.
|
void |
setTimeout(Duration value)
Set a timeout to render into the graph JSON.
|
com.fasterxml.jackson.databind.node.ObjectNode |
toGraphJson()
Return the Amazon States Language JSON for this graph.
|
java.lang.String |
toString()
Return a string description of this graph.
|
protected StateGraph(software.amazon.jsii.JsiiObjectRef objRef)
protected StateGraph(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public StateGraph(State startState, java.lang.String graphDescription)
startState
- state that gets executed when the state machine is launched. This parameter is required.graphDescription
- description of the state machine. This parameter is required.public void registerPolicyStatement(PolicyStatement statement)
statement
- This parameter is required.public void registerState(State state)
Called by State.bindToGraph().
state
- This parameter is required.public void registerSuperGraph(StateGraph graph)
Resource changes will be bubbled up to the given graph.
graph
- This parameter is required.public com.fasterxml.jackson.databind.node.ObjectNode toGraphJson()
public java.lang.String toString()
public java.util.List<PolicyStatement> getPolicyStatements()
public State getStartState()
public Duration getTimeout()
Read/write. Only makes sense on the top-level graph, subgraphs do not support this feature.
Default: No timeout
public void setTimeout(Duration value)
Read/write. Only makes sense on the top-level graph, subgraphs do not support this feature.
Default: No timeout