- JSON representation
- FailurePolicy
- RetryStrategy
- ConditionalFailurePolicies
- TaskExecutionStrategy
- SuccessPolicy
- FinalState
- JsonValidationOption
- ExternalTaskType
The task configuration details. This is not the implementation of Task. There might be multiple TaskConfigs for the same Task.
JSON representation |
---|
{ "task": string, "taskId": string, "parameters": { string: { object ( |
Fields | |
---|---|
task |
Optional. The name for the task. |
task |
Required. The identifier of this task within its parent event config, specified by the client. This should be unique among all the tasks belong to the same event config. We use this field as the identifier to find next tasks (via field |
parameters |
Optional. The customized parameters the user can pass to this task. |
failure |
Optional. Determines the number of times the task will be retried on failure and with what retry strategy. This is applicable for asynchronous calls to Eventbus alone (events.post To Queue, events.schedule etc.). |
synchronous |
Optional. Determines the number of times the task will be retried on failure and with what retry strategy. This is applicable for synchronous calls to Eventbus alone (events.post). |
conditional |
Optional. The list of conditional failure policies that will be applied to the task in order. |
next |
Optional. The set of tasks that are next in line to be executed as per the execution graph defined for the parent event, specified by |
next |
Optional. The policy dictating the execution of the next set of tasks for the current task. |
task |
Optional. The policy dictating the execution strategy of this task. |
display |
Optional. User-provided label that is attached to this TaskConfig in the UI. |
success |
Optional. Determines what action to take upon successful task completion. |
json |
Optional. If set, overrides the option configured in the Task implementation class. |
description |
Optional. User-provided description intended to give additional business context about the task. |
task |
Optional. Used to define task-template name if task is of type task-template |
error |
Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task |
external |
Optional. External task type of the task |
position |
Optional. Informs the front-end application where to draw this error catcher config on the UI. |
FailurePolicy
Policy that defines the task retry logic and failure type. If no FailurePolicy is defined for a task, all its dependent tasks will not be executed (i.e, a retryStrategy
of NONE will be applied).
JSON representation |
---|
{
"retryStrategy": enum ( |
Fields | |
---|---|
retry |
Defines what happens to the task upon failure. |
max |
Required if retryStrategy is FIXED_INTERVAL or LINEAR/EXPONENTIAL_BACKOFF/RESTART_INTEGRATION_WITH_BACKOFF. Defines the number of times the task will be retried if failed. |
interval |
Required if retryStrategy is FIXED_INTERVAL or LINEAR/EXPONENTIAL_BACKOFF/RESTART_INTEGRATION_WITH_BACKOFF. Defines the initial interval in seconds for backoff. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
condition |
Optional. The string condition that will be evaluated to determine if the task should be retried with this failure policy. |
RetryStrategy
The behavior when the taks failed.
Enums | |
---|---|
RETRY_STRATEGY_UNSPECIFIED |
UNSPECIFIED. |
IGNORE |
Ignores the failure of this task. The rest of the integration will be executed Assuming this task succeeded. |
NONE |
Causes a permanent failure of the task. However, if the last task(s) of event was successfully completed despite the failure of this task, it has no impact on the integration. |
FATAL |
Causes a permanent failure of the event. It is different from NONE because this will mark the event as FAILED by shutting down the event execution. |
FIXED_INTERVAL |
The task will be retried from the failed task onwards after a fixed delay. A max-retry count is required to be specified with this strategy. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. maxRetries and intervalInSeconds must be specified. |
LINEAR_BACKOFF |
The task will be retried from the failed task onwards after a fixed delay that linearly increases with each retry attempt. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified. |
EXPONENTIAL_BACKOFF |
The task will be retried after an exponentially increasing period of time with each failure. A jitter is added to each exponential interval so that concurrently failing tasks of the same type do not end up retrying after the exact same exponential interval. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified. |
RESTART_INTEGRATION_WITH_BACKOFF |
The entire integration will be restarted with the initial parameters that were set when the event was fired. A max-retry count is required to be specified with this strategy. maxRetries and intervalInSeconds must be specified. |
ConditionalFailurePolicies
Conditional task failur retry strategies
JSON representation |
---|
{ "failurePolicies": [ { object ( |
Fields | |
---|---|
failure |
The list of failure policies that will be applied to the task in order. |
default |
The default failure policy to be applied if no conditional failure policy matches. |
TaskExecutionStrategy
Various policies to trigger the execution of this task.
Enums | |
---|---|
TASK_EXECUTION_STRATEGY_UNSPECIFIED |
Default. If the strategy is not set explicitly, it will default to WHEN_ALL_SUCCEED . |
WHEN_ALL_SUCCEED |
Wait until all of its previous tasks finished execution, then verify at least one of the edge conditions is met, and execute if possible. This should be considered as WHEN_ALL_TASKS_SUCCEED. |
WHEN_ANY_SUCCEED |
Start execution as long as any of its previous tasks finished execution and the corresponding edge condition is met (since we will execute if only that succeeding edge condition is met). |
WHEN_ALL_TASKS_AND_CONDITIONS_SUCCEED |
Wait until all of its previous tasks finished execution, then verify the all edge conditions are met and execute if possible. |
SuccessPolicy
Policy that dictates the behavior for the task after it completes successfully.
JSON representation |
---|
{
"finalState": enum ( |
Fields | |
---|---|
final |
State to which the execution snapshot status will be set if the task succeeds. |
FinalState
The state of execution.
Enums | |
---|---|
FINAL_STATE_UNSPECIFIED |
UNSPECIFIED. |
SUCCEEDED |
The default behavior, where successful tasks will be marked as SUCCEEDED. |
SUSPENDED |
Sets the state to SUSPENDED after executing. This is required for SuspensionTask; event execution will continue once the user calls ResolveSuspensions with the eventExecutionInfoId and the task number. |
JsonValidationOption
Options for how to validate json schemas.
Enums | |
---|---|
JSON_VALIDATION_OPTION_UNSPECIFIED |
As per the default behavior, no validation will be run. Will not override any option set in a Task. |
SKIP |
Do not run any validation against JSON schemas. |
PRE_EXECUTION |
Validate all potential input JSON parameters against schemas specified in IntegrationParameter. |
POST_EXECUTION |
Validate all potential output JSON parameters against schemas specified in IntegrationParameter. |
PRE_POST_EXECUTION |
Perform both PRE_EXECUTION and POST_EXECUTION validations. |
ExternalTaskType
Defines the type of the task for external customer
Enums | |
---|---|
EXTERNAL_TASK_TYPE_UNSPECIFIED |
Default value. External task type is not specified |
NORMAL_TASK |
Tasks belongs to the normal task flows |
ERROR_TASK |
Task belongs to the error catch task flows |