A Pass state forwards its input directly to its output without performing any work. Use Pass states to stub out your flow while you design the overall structure, or to reshape data between states with InputConstructor and OutputConstructor.
Use cases
Stub out flow logic: Combine Pass states with Control states to sketch and debug your flow structure, then replace them with Task states as you build out each step.
Reshape data between states: Use
InputConstructorto inject static values orOutputConstructorto restructure data so downstream states receive the format they expect.
Attributes
| 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 to run after this one completes. Not required when End is true. | my next |
| End | bool | No | Whether to end the current scope. | true |
| InputConstructor | map[string]any | No | Constructs new input, replacing the original state input entirely. See InputConstructor. | - |
| OutputConstructor | map[string]any | No | Restructures the state output before passing it to the next state. See OutputConstructor. | - |
Examples
Inject static data
This flow defines a single Pass state that uses InputConstructor to inject a fixed value. Because InputConstructor replaces the original state input entirely, the Pass state ignores any incoming data and constructs a new object.
Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: Pass1
States:
- Type: Pass
Name: Pass1
End: true
InputConstructor:
FieldA: 123Input (ignored because InputConstructor overrides it):
{
"requestId": "abc-123"
}Output:
{
"FieldA": 123
}The state discards the original input and returns a new object containing only FieldA set to 123.
Forward data without changes
A Pass state with no InputConstructor or OutputConstructor passes its input through unchanged. This is useful as a placeholder while you design your flow.
Type: StateMachine
Name: my-wkfl
SpecVersion: v1
StartAt: ProvideDefaults
States:
- Type: Pass
Name: ProvideDefaults
Next: ProcessOrder
- Type: Pass
Name: ProcessOrder
End: trueInput:
{
"orderId": "order-456",
"amount": 99.9
}Output (unchanged):
{
"orderId": "order-456",
"amount": 99.9
}Both states pass the data through as-is. Replace ProcessOrder with a Task state when your processing logic is ready.
Related topics
Input and output -- Learn how
InputConstructorandOutputConstructortransform data between states.