This topic describes Pass states and provides related examples.
Overview
You can use a Pass state as a blank node. You can also use a Pass state as a data preprocessing node to transform inputs into expected outputs. For example, when you start to define a flow, you can use Control states and Pass states to plan and debug the flow logic, and then gradually replace Pass states by using the states of tasks after you create the states of tasks.
The following table describes the attributes that a Pass state contains.
Attribute | Type | Required | Description | Example |
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 InputConstructor. |
OutputConstructor | map[string]any | No | The output constructor. | See OutputConstructor. |
Example
The following example defines a Pass state. After the Pass state is executed, the system returns an object in the JSON object format. The value of FieldA is 123.
Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: Pass1
States:
- Type: Pass
Name: Pass1
End: true
InputConstructor:
FieldA: 123