This topic describes Wait states and provides related examples.
Overview
A Wait state is used to pause a flow execution for a period of time and then resume the execution. You can pause a flow execution for a relative period of time, such as 12 seconds.
The following table describes the attributes that a Wait state contains.
Attribute | Type | Required | Description | Example |
Seconds | int | No | The waiting time. Unit: seconds. Valid values:
| 12 |
Name | string | Yes | The name of the state. | my state |
Description | string | No | The description of the state. | describe it here |
Type | string | Yes | The type of the state. | Pass |
Next | string | No | The next state that is executed after the current state is complete. If the End attribute is true, you do not need to specify this attribute. | my next |
End | bool | No | Specifies whether to end the current scope. | true |
InputConstructor | map[string]any | No | The input constructor. | See Inputs and outputs. |
OutputConstructor | map[string]any | No | The output constructor. | See the State OutputConstructor section of the "Inputs and outputs" topic. |
Example
Wait 12 seconds.
Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: Wait1
States:
- Type: Wait
Name: Wait1
Seconds: 12
End: true