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.116.0 (build 0eddcff)",
date="2025-10-24T13:34:47.882Z")
@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.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.IChainable
IChainable.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedState(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedState(software.amazon.jsii.JsiiObjectRef objRef) protectedState(software.constructs.Construct scope, String id, StateProps props) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBranch(StateGraph branch) Add a parallel branch to this state.protected voidAdd a choice branch to this state.protected voidaddChoice(Condition condition, State next, ChoiceTransitionOptions options) Add a choice branch to this state.protected voidaddItemProcessor(StateGraph processor) Add a item processor to this state.protected voidaddItemProcessor(StateGraph processor, ProcessorConfig config) Add a item processor to this state.protected voidaddIterator(StateGraph iteration) Add a map iterator to this state.voidAdd a prefix to the stateId of this state.voidbindToGraph(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 com.fasterxml.jackson.databind.node.ObjectNodeprotected com.fasterxml.jackson.databind.node.ObjectNodeprotected List<StateGraph> protected Stringprotected StateContinuable states of this Chainable.getId()Descriptive identifier for this chainable.protected Stringprotected StateGraphprotected Stringprotected com.fasterxml.jackson.databind.node.ObjectNodeprotected com.fasterxml.jackson.databind.node.ObjectNodeprotected StateGraphprotected ProcessorConfigprotected ProcessorModeprotected QueryLanguageprotected Stringprotected com.fasterxml.jackson.databind.node.ObjectNodeFirst state of this Chainable.Tokenized string that evaluates to the state's ID.protected Stringprotected voidmakeDefault(State def) Make the indicated state the default choice transition of this state.protected voidMake the indicated state the default transition of this state.static voidprefixStates(software.constructs.IConstruct root, String prefix) Add a prefix to the stateId of all States found in a construct tree.protected ObjectRender the assign in ASL JSON format.protected ObjectrenderAssign(QueryLanguage topLevelQueryLanguage) Render the assign in ASL JSON format.protected ObjectRender parallel branches in ASL JSON format.protected ObjectRender the choices in ASL JSON format.protected ObjectrenderChoices(QueryLanguage topLevelQueryLanguage) Render the choices in ASL JSON format.protected ObjectRender InputPath/Parameters/OutputPath/Arguments/Output in ASL JSON format.protected ObjectRender ItemProcessor in ASL JSON format.protected ObjectRender map iterator in ASL JSON format.protected ObjectRender the default next state in ASL JSON format.protected ObjectRender QueryLanguage in ASL JSON format if needed.protected ObjectrenderQueryLanguage(QueryLanguage topLevelQueryLanguage) Render QueryLanguage in ASL JSON format if needed.protected ObjectRender ResultSelector in ASL JSON format.protected ObjectRender error recovery options in ASL JSON format.protected ObjectrenderRetryCatch(QueryLanguage topLevelQueryLanguage) Render error recovery options in ASL JSON format.protected voidsetDefaultChoice(State value) protected voidsetIteration(StateGraph value) protected voidsetProcessor(StateGraph value) protected voidprotected voidsetProcessorMode(ProcessorMode value) abstract com.fasterxml.jackson.databind.node.ObjectNodeRender the state as JSON.abstract com.fasterxml.jackson.databind.node.ObjectNodetoStateJson(QueryLanguage stateMachineQueryLanguage) Render the state as JSON.Allows the state to validate itself.protected voidwhenBoundToGraph(StateGraph graph) Called whenever this state is bound to a graph.Methods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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.
-
renderAssign
@Stability(Stable) @NotNull protected Object renderAssign(@Nullable QueryLanguage topLevelQueryLanguage) Render the assign in ASL JSON format.- Parameters:
topLevelQueryLanguage-
-
renderAssign
Render the assign in ASL JSON format. -
renderBranches
Render parallel branches in ASL JSON format. -
renderChoices
@Stability(Stable) @NotNull protected Object renderChoices(@Nullable QueryLanguage topLevelQueryLanguage) Render the choices in ASL JSON format.- Parameters:
topLevelQueryLanguage-
-
renderChoices
Render the choices in ASL JSON format. -
renderInputOutput
Render InputPath/Parameters/OutputPath/Arguments/Output 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. -
renderQueryLanguage
@Stability(Stable) @NotNull protected Object renderQueryLanguage(@Nullable QueryLanguage topLevelQueryLanguage) Render QueryLanguage in ASL JSON format if needed.- Parameters:
topLevelQueryLanguage-
-
renderQueryLanguage
Render QueryLanguage in ASL JSON format if needed. -
renderResultSelector
Render ResultSelector in ASL JSON format. -
renderRetryCatch
@Stability(Stable) @NotNull protected Object renderRetryCatch(@Nullable QueryLanguage topLevelQueryLanguage) Render error recovery options in ASL JSON format.- Parameters:
topLevelQueryLanguage-
-
renderRetryCatch
Render error recovery options in ASL JSON format. -
toStateJson
@Stability(Stable) @NotNull public abstract com.fasterxml.jackson.databind.node.ObjectNode toStateJson(@Nullable QueryLanguage stateMachineQueryLanguage) Render the state as JSON.- Parameters:
stateMachineQueryLanguage-
-
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:
getEndStatesin interfaceIChainable
-
getId
Descriptive identifier for this chainable.- Specified by:
getIdin interfaceIChainable
-
getStartState
First state of this Chainable.- Specified by:
getStartStatein interfaceIChainable
-
getStateId
Tokenized string that evaluates to the state's ID. -
getArguments
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getArguments() -
getAssign
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getAssign() -
getComment
-
getInputPath
-
getOutputPath
-
getOutputs
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getOutputs() -
getParameters
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getParameters() -
getQueryLanguage
-
getResultPath
-
getResultSelector
@Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getResultSelector() -
getStateName
-
getDefaultChoice
-
setDefaultChoice
-
getIteration
-
setIteration
-
getProcessor
-
setProcessor
-
getProcessorConfig
-
setProcessorConfig
-
getProcessorMode
-
setProcessorMode
-