[Yandex Cloud documentation](../../../../index.md) > [Yandex Serverless Integrations](../../../index.md) > [Step-by-step guides](../../index.md) > Workflows > [Workflow step constructor](index.md) > Control steps > Switch

# Adding the Switch step for selecting a further execution path

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.

{% list tabs %}

- Management console {#console}

  1. When [creating](../workflow/create-constructor.md) a new workflow or [editing](../workflow/update.md) an existing one, in the management console, under **Create workflow** / **Edit workflow**, select `Constructor`. 
  1. From the **Control steps** section on the left side of the screen, drag the ![switch-icon](../../../../_assets/serverless-integrations/switch-icon.svg) **Switch** element to the relevant 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.
  1. In the workflow schema window, click the added **Switch** section to select it.
  1. At the right of the window, on the **Settings** tab.

      1. In the **Step name** field, enter a name for the workflow step.
  1. Optionally, navigate to the **Input** tab and set a [jq template](../../../concepts/workflows/templating.md) to filter the [workflow state](../../../concepts/workflows/workflow.md#state) fed into the step.
  1. To add a new execution branch:
  
      1. In the bottom-right corner of the **Switch** section, click ![circle-plus-fill](../../../../_assets/console-icons/circle-plus-fill.svg).

      1. 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 ![circle-xmark-fill](../../../../_assets/console-icons/circle-xmark-fill.svg).

{% endlist %}

## Useful links {#see-also}

* [YaWL specification](../../../concepts/workflows/yawl/management/switch.md)
* [Creating a workflow using the constructor](../workflow/create-constructor.md)
* [Updating a workflow](../workflow/update.md)