Menjalankan alur kerja yang mengeksekusi alur kerja lain secara paralel
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menggunakan alur kerja induk yang memanggil alur kerja turunan melalui konektor. Setiap iterasi alur kerja turunan meneruskan argumen iterasi. Alur kerja induk menunggu dan menyimpan hasil setiap eksekusi alur kerja turunan.
Mempelajari lebih lanjut
Untuk dokumentasi mendetail yang menyertakan contoh kode ini, lihat artikel berikut:
Contoh kode
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],[],[],[],null,["# Run a workflow that executes other workflows in parallel\n\nUses a parent workflow that invokes a child workflow through a connector. Each iteration of the child workflow is passed an iteration argument. The parent workflow waits for and stores the result of each child workflow execution.\n\nExplore further\n---------------\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [Run a workflow that executes other workflows in parallel](/workflows/docs/tutorials/execute-workflows-from-workflow)\n\nCode sample\n-----------\n\n### YAML\n\n try:\n steps:\n - execute_child_workflow:\n call: googleapis.workflowexecutions.v1.projects.locations.workflows.executions.run\n args:\n workflow_id: workflow-child\n #location: ...\n #project_id: ...\n argument:\n iteration: ${iteration}\n result: execution_result\n - save_successful_execution:\n assign:\n - execution_results.success[string(iteration)]: ${execution_result}\n except:\n as: e\n steps:\n - save_failed_execution:\n assign:\n - execution_results.failure[string(iteration)]: ${e}\n\nWhat's next\n-----------\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=workflows)."]]