All Products
Search
Document Center

CloudFlow:Pass state

Last Updated:Mar 11, 2026

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 InputConstructor to inject static values or OutputConstructor to restructure data so downstream states receive the format they expect.

Attributes

AttributeTypeRequiredDescriptionExample
NamestringYesThe name of the state.my state
DescriptionstringNoThe description of the state.describe it here
TypestringYesThe type of the state.Pass
NextstringNoThe next state to run after this one completes. Not required when End is true.my next
EndboolNoWhether to end the current scope.true
InputConstructormap[string]anyNoConstructs new input, replacing the original state input entirely. See InputConstructor.-
OutputConstructormap[string]anyNoRestructures 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: 123

Input (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: true

Input:

{
  "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 InputConstructor and OutputConstructor transform data between states.