Workflows 실행용 커넥터

Workflows 실행에 액세스하는 데 사용되는 기본 제공 함수를 정의하는 Workflows 커넥터입니다.

더 살펴보기

이 코드 샘플이 포함된 자세한 문서는 다음을 참조하세요.

코드 샘플


# This workflow demonstrates how to use the Cloud Workflow Executions connector
# to create an execution for a workflow. Make sure the workflow
# already exists in your project.
# Expected successful output: "SUCCESS"

- init:
    - project: ${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}
    - location: "us-central1"
    - workflow: "[fill in the workflow to execute]"  # Make sure this workflow exists in your project.
    - arguments:
        hello: world
        integer: 100
        boolean: true
# The run helper method is the preferred way to execute a workflow as it doesn't require
# encoding the workflow arguments in a JSON-formatted string. To compare
# the usage, we list two demo steps:
- run_execution:
      workflow_id: ${workflow}
      location: ${location}
      project_id: ${project}
      argument: ${arguments}  # Arguments could be specified inline as a map instead.
    result: r1
- create_execution:
    call: googleapis.workflowexecutions.v1.projects.locations.workflows.executions.create
      parent: ${"projects/" + project + "/locations/" + location + "/workflows/" + workflow}
        argument: ${json.encode_to_string(arguments)}
    result: r2
- the_end:
    return: [${r1}, ${r2}]

다음 단계

다른 Google Cloud 제품의 코드 샘플을 검색하고 필터링하려면 Google Cloud 샘플 브라우저를 참조하세요.