Use a Cloud Tasks queue to buffer your workflow executions

Creates and adds a large number of tasks to the Cloud Tasks queue to execute a child workflow.

Explore further

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

Code sample

YAML

- create_task_to_execute_child_workflow:
    call: googleapis.cloudtasks.v2.projects.locations.queues.tasks.create
    args:
        parent: ${"projects/" + project_id + "/locations/" + location + "/queues/" + queue_name}
        body:
          task:
            httpRequest:
              body: ${base64.encode(json.encode(exec))}
              url: ${"https://workflowexecutions.googleapis.com/v1/projects/" + project_id + "/locations/" + location + "/workflows/" + workflow_child_name + "/executions"}
              oauthToken:
                serviceAccountEmail: ${project_number + "-compute@developer.gserviceaccount.com"}

What's next

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