All Products
Search
Document Center

CloudFlow:Succeed step

Last Updated:Jun 16, 2026

A succeed step terminates a serial flow early, similar to a return statement in programming languages.

Introduction

Steps defined in a Flow Definition Language (FDL) steps block execute serially. A succeed step interrupts this sequence and terminates the flow early, similar to a return statement in programming languages. Succeed steps are often combined with choice steps to stop further execution when a specific condition is met.

A succeed step has the following properties:

  • (Required) type: The value succeed indicates that the step is a succeed step.
  • (Required) name: The name of the step.
  • (Optional) inputMappings: The input mapping.
  • (Optional) outputMappings: The output mapping.

Example

The following flow definition uses a succeed step to end execution early based on input conditions.

  • If the value of status in the input is ready, the pass1 step in the first choice is executed, followed by the final step. Because final is a succeed step, the handle_failure step is not executed afterward.
  • If the value of status in the input is failed, the second choice is executed. This ends the choice step and executes handle_failure.
  • If the input does not contain status or the status value is not ready or failed, the default logic is executed: pass2 and handle_failure.
version: v1
type: flow
steps:
  - type: choice
    name: mychoice
    choices:
      - condition: $.status == "ready"
        # choice with steps
        steps:
          - type: pass
            name: pass1
      - condition: $.status == "failed"
        # choice with goto
        goto: handle_failure
    default:
      # choice with both steps and goto
      steps:
        - type: pass
          name: pass2
      goto: handle_failure
  - type: succeed
    name: final
  - type: pass
    name: handle_failure