For Each 병렬 태스크를 사용하면 기본 통합에서 다른 통합(하위 통합)을 실행할 수 있습니다. 태스크 이름에서 암시하듯이 하위 통합은 동시에 실행됩니다.
이 태스크는 API 트리거 ID를 핸들로 사용하여 실행할 통합을 식별합니다.
예를 들어 API 트리거 ID를 api_trigger/APITriggerX로 지정하면 태스크는 api_trigger/APITriggerX 트리거 ID를 가진 모든 하위 통합을 실행합니다.
하위 통합을 실행한 후 기본 통합에서 하위 통합의 응답을 읽을 수도 있습니다. 이 태스크를 사용하여 하위 통합을 기본 통합의 종속 항목으로 실행합니다.
시작하기 전에
통합에 사용자 관리형 서비스 계정을 연결했는지 확인합니다. 통합에 사용자 관리형 서비스 계정이 구성되어 있지 않으면 기본적으로 인증에 기본 서비스 계정(service-PROJECT_NUMBER@gcp-sa-integrations.iam.gserviceaccount.com)이 사용됩니다.
서비스 계정에 Application Integration 호출자 IAM 역할이 있는지 확인합니다. 서비스 계정에 역할 부여에 대한 자세한 내용은 서비스 계정에 대한 액세스 관리를 참조하세요.
For Each 병렬 태스크 구성
For Each 병렬 태스크를 구성하려면 다음 안내를 따르세요.
Google Cloud 콘솔에서 Application Integration 페이지로 이동합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe For Each Parallel task enables the execution of multiple sub-integrations in parallel from a main integration, enhancing efficiency.\u003c/p\u003e\n"],["\u003cp\u003eThis task utilizes an API Trigger ID to identify and run the specified sub-integrations, and can run all sub-integrations with the same ID or target one specifically.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure sub-integrations to run synchronously (SYNC), where the main integration waits for completion, or asynchronously (ASYNC), where it doesn't wait.\u003c/p\u003e\n"],["\u003cp\u003eThe task allows for passing data to sub-integrations and optionally collecting their output back into the main integration, but not when running multiple sub-integrations simultaneously.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to use the SYNC strategy when the output of the sub-integration is needed, and the ASYNC strategy when sub-integrations might take longer than 2 minutes to run.\u003c/p\u003e\n"]]],[],null,["# For Each Parallel task\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nFor Each Parallel task\n======================\n\nThe **For Each Parallel** task lets you run other\nintegrations (sub-integrations) from your main integration. As the task name\nsuggests, the sub-integrations run in parallel.\n\nThis task uses the API **Trigger ID** as a handle to identify the integrations to run.\nFor example, if you specify the API **Trigger ID**\nas `api_trigger/APITriggerX`, the task runs all the sub-integrations that have\nthe `api_trigger/APITriggerX` trigger ID.\n\nAfter running a sub-integration, you can also\nread the response of the sub-integration in your main integration. Use this task to run sub-integrations as dependencies\nof the main integration.\n\nBefore you begin\n----------------\n\n- Ensure that you have [attached a user-managed service account](/application-integration/docs/access-control#add-service-account) to your integration. If your integration does not have user-managed service account configured, then by default the [default service account](/application-integration/docs/access-control#default-service-account) (`service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-integrations.iam.gserviceaccount.com`) is used for authentication.\n- Ensure that your service account has the **Application Integration Invoker** IAM role. For information about granting roles to a service account, see [Manage access to service accounts](/iam/docs/manage-access-service-accounts).\n\nConfigure the For Each Parallel task\n------------------------------------\n\nTo configure the **For Each Parallel** task:\n\n1. In the Google Cloud console, go to the **Application Integration** page.\n\n [Go to Application Integration](https://console.cloud.google.com/integrations)\n2. In the navigation menu, click **Integrations** .\n\n\n The **Integrations** page appears listing all the integrations available in the Google Cloud project.\n3. Select an existing integration or click **Create integration** to create a new one.\n\n\n If you are creating a new integration:\n 1. Enter a name and description in the **Create Integration** pane.\n 2. Select a region for the integration. **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, click **Enable Region** . See [Enable new region](/application-integration/docs/enable-new-region) for more information.\n 3. Select a service account for the integration. You can change or update the service account details of an integration any time from the info **Integration summary** pane in the integration toolbar. **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.\n 4. Click **Create** . The newly created integration opens in the *integration editor*.\n\n\n4. In the *integration editor* navigation bar, click **Tasks** to view the list of available tasks and connectors.\n5. Click and place the **For Each Parallel** task element in the integration editor.\n6. Click the **For Each Parallel** task element on the designer to open the **For Each Parallel** task configuration pane.\n7. Configure the displayed fields using the [Configuration properties](#params) for the task as detailed in the tables below.\n\n\n All changes to the properties are saved automatically.\n\nConfiguration properties\n------------------------\n\n\nThis section describes the configuration properties of\nthe **For Each Parallel** task.\n\n### Input properties\n\nBest practices\n--------------\n\nWe recommend the following best practices when using the **For Each Parallel** task:\n\n- Set your cohort size based on any quota limitations imposed by your sub-integrations.\n- Use a **SYNC** execution strategy when you want to collect the output of the sub-integration for later use.\n- Use an **ASYNC** execution strategy when your sub-integration might run longer than **2 minutes**.\n\nFor information about the usage limits that apply to the **For Each Parallel** task, see [Usage limits](/application-integration/docs/quotas#usage-limits).\n\nConsiderations\n--------------\n\nIn general, do not use a **SYNC** execution strategy if your sub-integration takes longer than **2 minutes** to run\nor you plan to use this task in conjunction with naturally asynchronous tasks like the Approval task.\n\nError handling strategy\n-----------------------\n\n\nAn error handling strategy for a task specifies the action to take if the task fails due to a [temporary error](/application-integration/docs/error-handling). For information about how to use an error handling strategy, and to know about the different types of error handling strategies, see [Error handling strategies](/application-integration/docs/error-handling-strategy).\n\nQuotas and limits\n-----------------\n\nFor information about quotas and limits, see [Quotas and limits](/application-integration/docs/quotas).\n\nWhat's next\n-----------\n\n- Learn about [all tasks and triggers](/application-integration/docs/all-triggers-tasks).\n- Learn how to [test and publish an integration](/application-integration/docs/test-publish-integrations).\n\n- Learn about [error handling](/application-integration/docs/error-handling-strategy).\n- Learn about [integration execution logs](/application-integration/docs/introduction-logs)."]]