@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.410Z") @Stability(value=Stable) 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. |
software.amazon.jsii.JsiiObject.InitializationModeINextable.Jsii$Default, INextable.Jsii$ProxyIChainable.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Wait(software.constructs.Construct scope,
String id,
WaitProps props) |
protected |
Wait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Wait(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
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, validateState, whenBoundToGraphjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Wait(software.amazon.jsii.JsiiObjectRef objRef)
protected Wait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public Chain next(@NotNull IChainable next)
@Stability(value=Stable) @NotNull public com.fasterxml.jackson.databind.node.ObjectNode toStateJson()
toStateJson in class State@Stability(value=Stable) @NotNull public List<INextable> getEndStates()
getEndStates in interface IChainablegetEndStates in class StateCopyright © 2022. All rights reserved.