Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
  • Comparing 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
  • Audit Trails events
  • Monitoring metrics
  • Public materials
  • Release notes
  1. Step-by-step guides
  2. Workflows
  3. Workflow step constructor
  4. Control steps
  5. While

Adding the While loop

Written by
Yandex Cloud
Updated at August 4, 2026
View in Markdown

You can use the While control step to set a sequence of steps to apply within a loop. The step will apply while the condition from Execution condition template is true, but only as many times as set in Maximum number of iterations. If no condition is set, the step is performed the specified number of times. If the number of iterations is not specified, the loop will continue until the condition is no longer met or the workflow timeout is reached.

Each execution branch within the While step (including all Switch steps) must contain an integration step or a Success, Fail, or Wait step.

Tip

There is an icon next to some fields in the Yandex AI Studio UI. These fields support templates for dynamic data retrieval from previous workflow steps. To avoid typing a template manually, click and enter {{ in the field.

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 While 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.

  3. In the workflow schema window, click the added While 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.

    2. In the Execution condition template field, specify a condition in jq format that returns either the true or false string. This is a required field if the Maximum number of iterations field is not set.
    3. In the Maximum number of iterations field, specify the maximum number of iterations the loop can complete. This is a required field if the Execution condition template value is not set.
  5. Optionally, navigate to the Input tab and set a jq template to filter the workflow state fed into the step.

  6. Optionally, navigate to the Output tab and set a jq template to filter the step outputs added into the workflow state.

  7. To add a new step to an execution branch, drag the step you need from Integration steps or Control steps to the area marked by the dotted line within the branch.

Useful linksUseful links

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

Was the article helpful?

Previous
Foreach
Next
Parallel
© 2026 Direct Cursus Technology L.L.C.