@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:55.839Z") public class Wait extends State implements INextable
A Wait state can be used to delay execution of the state machine for a while.
Example:
EvaluateExpression convertToSeconds = EvaluateExpression.Builder.create(this, "Convert to seconds") .expression("$.waitMilliseconds / 1000") .resultPath("$.waitSeconds") .build(); EvaluateExpression createMessage = EvaluateExpression.Builder.create(this, "Create message") // Note: this is a string inside a string. .expression("`Now waiting ${$.waitSeconds} seconds...`") .runtime(Runtime.NODEJS_14_X) .resultPath("$.message") .build(); SnsPublish publishMessage = SnsPublish.Builder.create(this, "Publish message") .topic(new Topic(this, "cool-topic")) .message(TaskInput.fromJsonPathAt("$.message")) .resultPath("$.sns") .build(); Wait wait = Wait.Builder.create(this, "Wait") .time(WaitTime.secondsPath("$.waitSeconds")) .build(); StateMachine.Builder.create(this, "StateMachine") .definition(convertToSeconds.next(createMessage).next(publishMessage).next(wait)) .build();
Modifier and Type | Class and Description |
---|---|
static class |
Wait.Builder
A fluent builder for
Wait . |
INextable.Jsii$Default, INextable.Jsii$Proxy
IChainable.Jsii$Default
IConstruct.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
Wait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Wait(software.amazon.jsii.JsiiObjectRef objRef) |
|
Wait(software.constructs.Construct scope,
java.lang.String id,
WaitProps props) |
Modifier and Type | Method and Description |
---|---|
java.util.List<INextable> |
getEndStates()
Continuable states of this Chainable.
|
Chain |
next(IChainable next)
Continue normal execution with the given state.
|
com.fasterxml.jackson.databind.node.ObjectNode |
toStateJson()
Return the Amazon States Language object for this state.
|
addBranch, addChoice, addIterator, addPrefix, bindToGraph, filterNextables, findReachableEndStates, findReachableEndStates, findReachableStates, findReachableStates, getBranches, getComment, getDefaultChoice, getId, getInputPath, getIteration, getOutputPath, getParameters, getResultPath, getResultSelector, getStartState, getStateId, makeDefault, makeNext, prefixStates, renderBranches, renderChoices, renderInputOutput, renderIterator, renderNextEnd, renderResultSelector, renderRetryCatch, setDefaultChoice, setIteration, whenBoundToGraph
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
protected Wait(software.amazon.jsii.JsiiObjectRef objRef)
protected Wait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Wait(software.constructs.Construct scope, java.lang.String id, WaitProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public Chain next(IChainable next)
public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()
toStateJson
in class State
public java.util.List<INextable> getEndStates()
getEndStates
in interface IChainable
getEndStates
in class State