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 Studio
    • 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
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Integrations
    • Overview
      • Workflow
      • Starting a workflow execution
        • Overview
          • Switch
          • Foreach
          • Parallel
          • Success
          • Fail
          • NoOp
          • Wait
          • While
      • Templating
    • Quotas and limits
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Release notes
  1. Concepts
  2. Workflows
  3. YaWL specification
  4. Control steps
  5. While

While

Written by
Yandex Cloud
Updated at June 23, 2025

Performs the sequence of steps specified in do as long as the condition is met and the number of iterations does not exceed max_iterations. If the condition is not specified, the step is performed the number of times set in max_iterations. If max_iterations is not set, the loop will continue until the condition is met or the workflow timeout is reached.

The result is the output data of the last iteration's last step for which you can set the output field value.

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

Field name Type Required Default value Templating is supported Description
input string No Overall state of the workflow Yes. The $counter variable is additionally available, which is equal to the iteration number (indexing starts from zero). A jq template to filter the workflow state fed into the step.
output string No Step output data Yes A jq template to filter the step outputs added into the workflow state.
do WhileDo Yes No No The sequence of steps to performed in the loop.
condition string Required unless max_iterations is specified No Yes. The $counter variable is additionally available, which is equal to the iteration number (indexing starts from zero). A condition in jq format that returns either the true or the false string.
max_iterations int Required unless condition is specified No Yes The maximum number of iterations the cycle can complete.
next string No No No ID of the next step.

WhileDo objectWhileDo object

Field name Type Required Description
start string Yes ID of the step to start the execution from.
steps map<string, Step> Yes Description of the steps. Object where key is the step ID, and value is the object describing the step parameters. The structure is similar to the steps field in the high-level specification.

Was the article helpful?

Previous
Wait
Next
Templating
© 2025 Direct Cursus Technology L.L.C.