Use a Cloud Tasks queue to buffer your workflow executions

Uses a for loop in the workflow to invoke a child workflow, iteratively.

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample

YAML

- enqueue_tasks_to_execute_child_workflow:
    for:
      value: iteration
      range: [1, 100]
      steps:
          - iterate:
              assign:
                - data:
                    iteration: ${iteration}
                - exec:
                    # Need to wrap into argument for Workflows args.
                    argument: ${json.encode_to_string(data)}

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.