Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
  • Comparison with other Yandex Cloud services
    • All guides
        • Overview
          • Switch
          • Foreach
          • While
          • Parallel
          • No op
          • Fail
          • Success
          • Wait
        • Configuring a retry policy for a workflow
        • Configuring an error transition rule
    • Viewing operations with service resources
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Public materials
  • Release notes
  1. Step-by-step guides
  2. Workflows
  3. Workflow step constructor
  4. Control steps
  5. Switch

Adding the Switch step for selecting a further execution path

Written by
Yandex Cloud
Updated at June 11, 2025

With the Switch control step, you can define conditions for selecting the further execution path in your workflow. This way, only one path can be selected: the one where the defined condition first returns true.

If all conditions return false, the workflow will be executed for the path specified in the default condition; if there is no default condition, the workflow execution will fail.

Management console
  1. When creating a new workflow or editing an existing one, in the management console, under Create workflow / Edit workflow, select Constructor.

  2. From the Control steps section on the left side of the screen, drag the Switch element to desired workflow location in the constructor window.

    You can drag and drop steps into areas marked by the dotted line in the workflow schema, such as Add a step, etc.

  3. In the workflow schema window, click the added Switch section to select it.

  4. At the right of the window, on the Settings tab.

    1. In the Step name field, enter a name for the workflow step.

  5. Optionally, navigate to the Input tab and set a jq template to filter the workflow state fed into the step.

  6. To add a new execution branch:

    1. In the bottom-right corner of the Switch section, click .

    2. In the window that opens, add a condition for selecting the execution branch. To specify the condition, use the jq format. To add the default condition, enable Default condition. The default condition is created automatically if Switch is not the first step in the workflow. Once the condition is added, click Create.

    To delete an execution branch, add any integration step to it and delete that step using .

See alsoSee also

  • YaWL specification
  • Creating a workflow using the constructor
  • Updating a workflow

Was the article helpful?

Previous
Database Query
Next
Foreach
© 2025 Direct Cursus Technology L.L.C.