Class State
Base class for all other state classes.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions
Assembly: Amazon.CDK.AWS.StepFunctions.dll
Syntax (csharp)
public abstract class State : Construct, IConstruct, IDependable, IChainable
Syntax (vb)
Public MustInherit Class State
Inherits Construct
Implements IConstruct, IDependable, IChainable
Synopsis
Constructors
State(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
State(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
State(Construct, String, IStateProps) |
Properties
Branches | |
Comment | |
DefaultChoice | |
EndStates | Continuable states of this Chainable. |
Id | Descriptive identifier for this chainable. |
InputPath | |
Iteration | |
OutputPath | |
Parameters | |
ResultPath | |
ResultSelector | |
StartState | First state of this Chainable. |
StateId | Tokenized string that evaluates to the state's ID. |
Methods
AddBranch(StateGraph) | Add a paralle branch to this state. |
AddChoice(Condition, State) | Add a choice branch to this state. |
AddIterator(StateGraph) | Add a map iterator to this state. |
AddPrefix(String) | Add a prefix to the stateId of this state. |
BindToGraph(StateGraph) | Register this state as part of the given graph. |
FilterNextables(State[]) | Return only the states that allow chaining from an array of states. |
FindReachableEndStates(State, IFindStateOptions) | Find the set of end states states reachable through transitions from the given start state. |
FindReachableStates(State, IFindStateOptions) | Find the set of states reachable through transitions from the given start state. |
MakeDefault(State) | Make the indicated state the default choice transition of this state. |
MakeNext(State) | Make the indicated state the default transition of this state. |
PrefixStates(IConstruct, String) | Add a prefix to the stateId of all States found in a construct tree. |
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. |
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() | Render the state as JSON. |
WhenBoundToGraph(StateGraph) | Called whenever this state is bound to a graph. |
Constructors
State(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected State(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
State(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected State(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
State(Construct, String, IStateProps)
protected State(Construct scope, string id, IStateProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IStateProps
Properties
Branches
Comment
protected virtual string Comment { get; }
Property Value
System.String
DefaultChoice
EndStates
Continuable states of this Chainable.
public abstract INextable[] EndStates { get; }
Property Value
Id
Descriptive identifier for this chainable.
public virtual string Id { get; }
Property Value
System.String
InputPath
protected virtual string InputPath { get; }
Property Value
System.String
Iteration
OutputPath
protected virtual string OutputPath { get; }
Property Value
System.String
Parameters
protected virtual JObject Parameters { get; }
Property Value
Newtonsoft.Json.Linq.JObject
ResultPath
protected virtual string ResultPath { get; }
Property Value
System.String
ResultSelector
protected virtual JObject ResultSelector { get; }
Property Value
Newtonsoft.Json.Linq.JObject
StartState
StateId
Tokenized string that evaluates to the state's ID.
public virtual string StateId { get; }
Property Value
System.String
Methods
AddBranch(StateGraph)
Add a paralle branch to this state.
protected virtual void AddBranch(StateGraph branch)
Parameters
- branch StateGraph
AddChoice(Condition, State)
Add a choice branch to this state.
protected virtual void AddChoice(Condition condition, State next)
Parameters
AddIterator(StateGraph)
Add a map iterator to this state.
protected virtual void AddIterator(StateGraph iteration)
Parameters
- iteration StateGraph
AddPrefix(String)
Add a prefix to the stateId of this state.
public virtual void AddPrefix(string x)
Parameters
- x System.String
BindToGraph(StateGraph)
Register this state as part of the given graph.
public virtual void BindToGraph(StateGraph graph)
Parameters
- graph StateGraph
Remarks
Don't call this. It will be called automatically when you work with states normally.
FilterNextables(State[])
Return only the states that allow chaining from an array of states.
public static INextable[] FilterNextables(State[] states)
Parameters
- states State[]
Returns
FindReachableEndStates(State, IFindStateOptions)
Find the set of end states states reachable through transitions from the given start state.
public static State[] FindReachableEndStates(State start, IFindStateOptions options = null)
Parameters
- start State
- options IFindStateOptions
Returns
State[]
FindReachableStates(State, IFindStateOptions)
Find the set of states reachable through transitions from the given start state.
public static State[] FindReachableStates(State start, IFindStateOptions options = null)
Parameters
- start State
- options IFindStateOptions
Returns
State[]
Remarks
This does not retrieve states from within sub-graphs, such as states within a Parallel state's branch.
MakeDefault(State)
Make the indicated state the default choice transition of this state.
protected virtual void MakeDefault(State def)
Parameters
- def State
MakeNext(State)
Make the indicated state the default transition of this state.
protected virtual void MakeNext(State next)
Parameters
- next State
PrefixStates(IConstruct, String)
Add a prefix to the stateId of all States found in a construct tree.
public static void PrefixStates(IConstruct root, string prefix)
Parameters
- root Constructs.IConstruct
- prefix System.String
RenderBranches()
Render parallel branches in ASL JSON format.
protected virtual object RenderBranches()
Returns
System.Object
RenderChoices()
Render the choices in ASL JSON format.
protected virtual object RenderChoices()
Returns
System.Object
RenderInputOutput()
Render InputPath/Parameters/OutputPath in ASL JSON format.
protected virtual object RenderInputOutput()
Returns
System.Object
RenderIterator()
Render map iterator in ASL JSON format.
protected virtual object RenderIterator()
Returns
System.Object
RenderNextEnd()
Render the default next state in ASL JSON format.
protected virtual object RenderNextEnd()
Returns
System.Object
RenderResultSelector()
Render ResultSelector in ASL JSON format.
protected virtual object RenderResultSelector()
Returns
System.Object
RenderRetryCatch()
Render error recovery options in ASL JSON format.
protected virtual object RenderRetryCatch()
Returns
System.Object
ToStateJson()
Render the state as JSON.
public abstract JObject ToStateJson()
Returns
Newtonsoft.Json.Linq.JObject
WhenBoundToGraph(StateGraph)
Called whenever this state is bound to a graph.
protected virtual void WhenBoundToGraph(StateGraph graph)
Parameters
- graph StateGraph
Remarks
Can be overridden by subclasses.