Class State
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.services.stepfunctions.State
- All Implemented Interfaces:
IChainable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
Choice
,CustomState
,Fail
,MapBase
,Parallel
,Pass
,Succeed
,TaskStateBase
,Wait
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:17.573Z")
@Stability(Stable)
public abstract class State
extends software.constructs.Construct
implements IChainable
Base class for all other state classes.
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IChainable
IChainable.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
State
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
State
(software.amazon.jsii.JsiiObjectRef objRef) protected
State
(software.constructs.Construct scope, String id, StateProps props) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBranch
(StateGraph branch) Add a parallel branch to this state.protected void
Add a choice branch to this state.protected void
addChoice
(Condition condition, State next, ChoiceTransitionOptions options) Add a choice branch to this state.protected void
addItemProcessor
(StateGraph processor) Add a item processor to this state.protected void
addItemProcessor
(StateGraph processor, ProcessorConfig config) Add a item processor to this state.protected void
addIterator
(StateGraph iteration) Add a map iterator to this state.void
Add a prefix to the stateId of this state.void
bindToGraph
(StateGraph graph) Register this state as part of the given graph.filterNextables
(List<? extends State> states) Return only the states that allow chaining from an array of states.findReachableEndStates
(State start) Find the set of end states states reachable through transitions from the given start state.findReachableEndStates
(State start, FindStateOptions options) Find the set of end states states reachable through transitions from the given start state.findReachableStates
(State start) Find the set of states reachable through transitions from the given start state.findReachableStates
(State start, FindStateOptions options) Find the set of states reachable through transitions from the given start state.protected List<StateGraph>
protected String
protected State
Continuable states of this Chainable.getId()
Descriptive identifier for this chainable.protected String
protected StateGraph
protected String
protected com.fasterxml.jackson.databind.node.ObjectNode
protected StateGraph
protected ProcessorConfig
protected ProcessorMode
protected String
protected com.fasterxml.jackson.databind.node.ObjectNode
First state of this Chainable.Tokenized string that evaluates to the state's ID.protected String
protected void
makeDefault
(State def) Make the indicated state the default choice transition of this state.protected void
Make the indicated state the default transition of this state.static void
prefixStates
(software.constructs.IConstruct root, String prefix) Add a prefix to the stateId of all States found in a construct tree.protected Object
Render parallel branches in ASL JSON format.protected Object
Render the choices in ASL JSON format.protected Object
Render InputPath/Parameters/OutputPath in ASL JSON format.protected Object
Render ItemProcessor in ASL JSON format.protected Object
Render map iterator in ASL JSON format.protected Object
Render the default next state in ASL JSON format.protected Object
Render ResultSelector in ASL JSON format.protected Object
Render error recovery options in ASL JSON format.protected void
setDefaultChoice
(State value) protected void
setIteration
(StateGraph value) protected void
setProcessor
(StateGraph value) protected void
protected void
setProcessorMode
(ProcessorMode value) abstract com.fasterxml.jackson.databind.node.ObjectNode
Render the state as JSON.Allows the state to validate itself.protected void
whenBoundToGraph
(StateGraph graph) Called whenever this state is bound to a graph.Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
State
protected State(software.amazon.jsii.JsiiObjectRef objRef) -
State
protected State(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
State
@Stability(Stable) protected State(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull StateProps props) - Parameters:
scope
- This parameter is required.id
- Descriptive identifier for this chainable. This parameter is required.props
- This parameter is required.
-
-
Method Details
-
filterNextables
@Stability(Stable) @NotNull public static List<INextable> filterNextables(@NotNull List<? extends State> states) Return only the states that allow chaining from an array of states.- Parameters:
states
- This parameter is required.
-
findReachableEndStates
@Stability(Stable) @NotNull public static List<State> findReachableEndStates(@NotNull State start, @Nullable FindStateOptions options) Find the set of end states states reachable through transitions from the given start state.- Parameters:
start
- This parameter is required.options
-
-
findReachableEndStates
Find the set of end states states reachable through transitions from the given start state.- Parameters:
start
- This parameter is required.
-
findReachableStates
@Stability(Stable) @NotNull public static List<State> findReachableStates(@NotNull State start, @Nullable FindStateOptions options) Find the set of states reachable through transitions from the given start state.This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.
- Parameters:
start
- This parameter is required.options
-
-
findReachableStates
Find the set of states reachable through transitions from the given start state.This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.
- Parameters:
start
- This parameter is required.
-
prefixStates
@Stability(Stable) public static void prefixStates(@NotNull software.constructs.IConstruct root, @NotNull String prefix) Add a prefix to the stateId of all States found in a construct tree.- Parameters:
root
- This parameter is required.prefix
- This parameter is required.
-
addBranch
Add a parallel branch to this state.- Parameters:
branch
- This parameter is required.
-
addChoice
@Stability(Stable) protected void addChoice(@NotNull Condition condition, @NotNull State next, @Nullable ChoiceTransitionOptions options) Add a choice branch to this state.- Parameters:
condition
- This parameter is required.next
- This parameter is required.options
-
-
addChoice
Add a choice branch to this state.- Parameters:
condition
- This parameter is required.next
- This parameter is required.
-
addItemProcessor
@Stability(Stable) protected void addItemProcessor(@NotNull StateGraph processor, @Nullable ProcessorConfig config) Add a item processor to this state.- Parameters:
processor
- This parameter is required.config
-
-
addItemProcessor
Add a item processor to this state.- Parameters:
processor
- This parameter is required.
-
addIterator
Add a map iterator to this state.- Parameters:
iteration
- This parameter is required.
-
addPrefix
Add a prefix to the stateId of this state.- Parameters:
x
- This parameter is required.
-
bindToGraph
Register this state as part of the given graph.Don't call this. It will be called automatically when you work with states normally.
- Parameters:
graph
- This parameter is required.
-
makeDefault
Make the indicated state the default choice transition of this state.- Parameters:
def
- This parameter is required.
-
makeNext
Make the indicated state the default transition of this state.- Parameters:
next
- This parameter is required.
-
renderBranches
Render parallel branches in ASL JSON format. -
renderChoices
Render the choices in ASL JSON format. -
renderInputOutput
Render InputPath/Parameters/OutputPath in ASL JSON format. -
renderItemProcessor
Render ItemProcessor in ASL JSON format. -
renderIterator
Render map iterator in ASL JSON format. -
renderNextEnd
Render the default next state in ASL JSON format. -
renderResultSelector
Render ResultSelector in ASL JSON format. -
renderRetryCatch
Render error recovery options in ASL JSON format. -
toStateJson
@Stability(Stable) @NotNull public abstract com.fasterxml.jackson.databind.node.ObjectNode toStateJson()Render the state as JSON. -
validateState
Allows the state to validate itself. -
whenBoundToGraph
Called whenever this state is bound to a graph.Can be overridden by subclasses.
- Parameters:
graph
- This parameter is required.
-
getBranches
-
getEndStates
Continuable states of this Chainable.- Specified by:
getEndStates
in interfaceIChainable
-
getId
Descriptive identifier for this chainable.- Specified by:
getId
in interfaceIChainable
-
getStartState
First state of this Chainable.- Specified by:
getStartState
in interfaceIChainable
-
getStateId
Tokenized string that evaluates to the state's ID. -
getComment
-
getInputPath
-
getOutputPath
-
getParameters
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getParameters() -
getResultPath
-
getResultSelector
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getResultSelector() -
getStateName
-
getDefaultChoice
-
setDefaultChoice
-
getIteration
-
setIteration
-
getProcessor
-
setProcessor
-
getProcessorConfig
-
setProcessorConfig
-
getProcessorMode
-
setProcessorMode
-