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.103.1 (build bef2dea)", date="2024-10-25T14:21:24.354Z") @Stability(Stable) public abstract class State extends software.constructs.Construct implements IChainable
Base class for all other state classes.
  • 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

      @Stability(Stable) @NotNull public static List<State> findReachableEndStates(@NotNull State start)
      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

      @Stability(Stable) @NotNull public static List<State> findReachableStates(@NotNull State start)
      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

      @Stability(Stable) protected void addBranch(@NotNull StateGraph branch)
      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

      @Stability(Stable) protected void addChoice(@NotNull Condition condition, @NotNull State next)
      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

      @Stability(Stable) protected void addItemProcessor(@NotNull StateGraph processor)
      Add a item processor to this state.

      Parameters:
      processor - This parameter is required.
    • addIterator

      @Stability(Stable) protected void addIterator(@NotNull StateGraph iteration)
      Add a map iterator to this state.

      Parameters:
      iteration - This parameter is required.
    • addPrefix

      @Stability(Stable) public void addPrefix(@NotNull String x)
      Add a prefix to the stateId of this state.

      Parameters:
      x - This parameter is required.
    • bindToGraph

      @Stability(Stable) public void bindToGraph(@NotNull StateGraph graph)
      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

      @Stability(Stable) protected void makeDefault(@NotNull State def)
      Make the indicated state the default choice transition of this state.

      Parameters:
      def - This parameter is required.
    • makeNext

      @Stability(Stable) protected void makeNext(@NotNull State next)
      Make the indicated state the default transition of this state.

      Parameters:
      next - This parameter is required.
    • renderBranches

      @Stability(Stable) @NotNull protected Object renderBranches()
      Render parallel branches in ASL JSON format.
    • renderChoices

      @Stability(Stable) @NotNull protected Object renderChoices()
      Render the choices in ASL JSON format.
    • renderInputOutput

      @Stability(Stable) @NotNull protected Object renderInputOutput()
      Render InputPath/Parameters/OutputPath in ASL JSON format.
    • renderItemProcessor

      @Stability(Stable) @NotNull protected Object renderItemProcessor()
      Render ItemProcessor in ASL JSON format.
    • renderIterator

      @Stability(Stable) @NotNull protected Object renderIterator()
      Render map iterator in ASL JSON format.
    • renderNextEnd

      @Stability(Stable) @NotNull protected Object renderNextEnd()
      Render the default next state in ASL JSON format.
    • renderResultSelector

      @Stability(Stable) @NotNull protected Object renderResultSelector()
      Render ResultSelector in ASL JSON format.
    • renderRetryCatch

      @Stability(Stable) @NotNull protected Object 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

      @Stability(Stable) @NotNull protected List<String> validateState()
      Allows the state to validate itself.
    • whenBoundToGraph

      @Stability(Stable) protected void whenBoundToGraph(@NotNull StateGraph graph)
      Called whenever this state is bound to a graph.

      Can be overridden by subclasses.

      Parameters:
      graph - This parameter is required.
    • getBranches

      @Stability(Stable) @NotNull protected List<StateGraph> getBranches()
    • getEndStates

      @Stability(Stable) @NotNull public abstract List<INextable> getEndStates()
      Continuable states of this Chainable.
      Specified by:
      getEndStates in interface IChainable
    • getId

      @Stability(Stable) @NotNull public String getId()
      Descriptive identifier for this chainable.
      Specified by:
      getId in interface IChainable
    • getStartState

      @Stability(Stable) @NotNull public State getStartState()
      First state of this Chainable.
      Specified by:
      getStartState in interface IChainable
    • getStateId

      @Stability(Stable) @NotNull public String getStateId()
      Tokenized string that evaluates to the state's ID.
    • getComment

      @Stability(Stable) @Nullable protected String getComment()
    • getInputPath

      @Stability(Stable) @Nullable protected String getInputPath()
    • getOutputPath

      @Stability(Stable) @Nullable protected String getOutputPath()
    • getParameters

      @Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getParameters()
    • getResultPath

      @Stability(Stable) @Nullable protected String getResultPath()
    • getResultSelector

      @Stability(Stable) @Nullable protected com.fasterxml.jackson.databind.node.ObjectNode getResultSelector()
    • getStateName

      @Stability(Stable) @Nullable protected String getStateName()
    • getDefaultChoice

      @Stability(Stable) @Nullable protected State getDefaultChoice()
    • setDefaultChoice

      @Stability(Stable) protected void setDefaultChoice(@Nullable State value)
    • getIteration

      @Stability(Stable) @Nullable protected StateGraph getIteration()
    • setIteration

      @Stability(Stable) protected void setIteration(@Nullable StateGraph value)
    • getProcessor

      @Stability(Stable) @Nullable protected StateGraph getProcessor()
    • setProcessor

      @Stability(Stable) protected void setProcessor(@Nullable StateGraph value)
    • getProcessorConfig

      @Stability(Stable) @Nullable protected ProcessorConfig getProcessorConfig()
    • setProcessorConfig

      @Stability(Stable) protected void setProcessorConfig(@Nullable ProcessorConfig value)
    • getProcessorMode

      @Stability(Stable) @Nullable protected ProcessorMode getProcessorMode()
    • setProcessorMode

      @Stability(Stable) protected void setProcessorMode(@Nullable ProcessorMode value)