This topic describes the wait step and provides usage examples.
Parameters
A wait step pauses a flow's execution for a specified time. The flow resumes after the time elapses. You can specify a relative duration or an absolute end time as a timestamp.
A wait step contains the following parameters:
- (Required)
type: A value of 'wait' defines the step as a wait step. - (Required)
name: The name of the step. - (Optional)
duration: The relative wait time in seconds. This can be a constant or a parameter from the input. For example,10specifies a wait of 10 seconds.$.sleepspecifies that the wait time is the value of thesleepkey in the input. You must specify eitherdurationortimestamp, but not both. - (Optional)
timestamp: The absolute end time for the wait. The format must be RFC3339. This can be a constant or a parameter from the input. For example,2019-05-02T15:04:05Zspecifies a wait until 15:04:05 UTC on May 2, 2019. If the specified time is in the past, the wait step ends immediately.Note The maximum wait time is 2 days. - (Optional)
end: Specifies whether to continue to the subsequent steps after the current step is complete. - (Optional)
inputMappings: The input mapping. - (Optional)
outputMappings: The output mapping. This step does not generate data, so its$localis empty.
Examples
- Wait for 20 seconds
version: v1 type: flow steps: - type: wait name: wait20s duration: 20 - Wait for a duration determined by the input
version: v1 type: flow steps: - type: wait name: custom_wait duration: $.wait - Wait until an absolute time
version: v1 type: flow steps: - type: wait name: wait20s timestamp: 2019-05-02T15:04:05Z - Wait until an absolute time determined by the input
version: v1 type: flow steps: - type: wait name: custom_wait timestamp: $.wait_timestamp
该文章对您有帮助吗?