All Products
Search
Document Center

CloudFlow:Wait

Last Updated:Oct 24, 2024

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:

  • Standard mode: 1 to 300.

  • Express mode: 1 to 20.

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