Approval Task
The Approval task lets you configure approval-based integrations. It also lets you control the flow of an integration.
You can use the Approval task to send approval request emails to one or more integration users. The email includes a link to the integration where the users can manually approve or reject the request.
During an integration execution, when the control reaches the Approval task, execution is halted, and all tasks after the Approval task are suspended. The integration resumes the execution only when a user manually approves or rejects the approval request.
An Approval task can be used for the following purposes:
- To suspend and branch an integration based on user approval or rejection.
- To suspend an integration until a specified duration.
- To use as a breakpoint to debug the integration.
Compare Approval task, Suspend task, and Timer task
All the three (Approval, Suspend, and Timer) tasks perform a similar function of pausing and resuming an integration. However, there are subtle differences among them. The following table describes the differences amongst the three tasks.
| Approval task | Suspend task | Timer task |
|---|---|---|
| Doesn't support automatic resumption of an integration and requires manual intervention to resume the integration. | Supports both manual and automatic resumption of an integration. If there is no manual intervention to revoke the suspension, the integration will automatically resume execution after the expiry of the suspension time limit. | Supports only automatic resumption of an integration. The integration execution automatically resumes after the exipry of the suspension time limit. |
| Can't resume an integration via an API call. You must manually resolve the suspension by using the Integrations UI. | Can resume an integration by using the Suspensions API for integrations. |
Supports only automatic resumption of an integration. |
| Users receive notification when an integration pauses (suspended). | Users don't receive any notification when an integration pauses (suspended). | Users don't receive any notification when an integration pauses (suspended). |
Supports a output variable (boolean), which allows you to perform conditional checks
before resuming an integration. However, the output variable can only have
the value as either true or false. |
Supports a output variable (string), which allows you to perform conditional checks before resuming an integration. You can set any value to the output variable. | Doesn't support any output variables. |
Configure the Approval task
To configure the Approval task:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations.
The Integrations page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration or click Create integration to create a new one.
If you are creating a new integration:
- Enter a name and description in the Create Integration pane.
- Select a region for the integration.
- Select a service account for the integration. You can change or update the service account details of an integration any time from the Integration summary pane in the integration toolbar.
- Click Create. The newly created integration opens in the integration editor.