Open1

google cloud workflowsを使ってみる

おっちー(O.S)おっちー(O.S)

こんな感じで書ける

main:
  steps:
    - init:
        assign:
          - project_id: test-dev
          - firestore_database: test-dev
          - collection_name: test_collection
          - document_id: test_document
          - default_clinic_id: 121232
- read_document:
        call: googleapis.firestore.v1.projects.databases.documents.get
        args:
          name: ${"projects/" + project_id + "/databases/" + firestore_database + "/documents/" + collection_name + "/" + document_id}
        result: read_result
        next: check_document_exists