TaskConfig

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 (EventParameter)
    },
    ...
  },
  "failurePolicy": {
    object (FailurePolicy)
  },
  "synchronousCallFailurePolicy": {
    object (FailurePolicy)
  },
  "conditionalFailurePolicies": {
    object (ConditionalFailurePolicies)
  },
  "nextTasks": [
    {
      object (NextTask)
    }
  ],
  "nextTasksExecutionPolicy": enum (NextTasksExecutionPolicy),
  "taskExecutionStrategy": enum (TaskExecutionStrategy),
  "displayName": string,
  "successPolicy": {
    object (SuccessPolicy)
  },
  "jsonValidationOption": enum (JsonValidationOption),
  "description": string,
  "taskTemplate": string,
  "errorCatcherId": string,
  "externalTaskType": enum (ExternalTaskType),
  "position": {
    object (Coordinate)
  }
}
Fields
task

string

Optional. The name for the task.

taskId

string

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 nextTasks.task_id).

parameters

map (key: string, value: object (EventParameter))

Optional. The customized parameters the user can pass to this task.

failurePolicy

object (FailurePolicy)

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.).

synchronousCallFailurePolicy

object (FailurePolicy)

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).

conditionalFailurePolicies

object (ConditionalFailurePolicies)

Optional. The list of conditional failure policies that will be applied to the task in order.

nextTasks[]

object (NextTask)

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 eventConfigId. Each of these next tasks are executed only if the condition associated with them evaluates to true.

nextTasksExecutionPolicy

enum (NextTasksExecutionPolicy)

Optional. The policy dictating the execution of the next set of tasks for the current task.

taskExecutionStrategy

enum (TaskExecutionStrategy)

Optional. The policy dictating the execution strategy of this task.

displayName

string

Optional. User-provided label that is attached to this TaskConfig in the UI.

successPolicy

object (SuccessPolicy)

Optional. Determines what action to take upon successful task completion.

jsonValidationOption

enum (JsonValidationOption)

Optional. If set, overrides the option configured in the Task implementation class.

description

string

Optional. User-provided description intended to give additional business context about the task.

taskTemplate

string

Optional. Used to define task-template name if task is of type task-template

errorCatcherId

string

Optional. Optional Error catcher id of the error catch flow which will be executed when execution error happens in the task

externalTaskType

enum (ExternalTaskType)

Optional. External task type of the task

position

object (Coordinate)

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 (RetryStrategy),
  "maxRetries": integer,
  "intervalTime": string,
  "condition": string
}
Fields
retryStrategy

enum (RetryStrategy)

Defines what happens to the task upon failure.

maxRetries

integer

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.

intervalTime

string (Timestamp format)

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: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

condition

string

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 (FailurePolicy)
    }
  ],
  "defaultFailurePolicy": {
    object (FailurePolicy)
  }
}
Fields
failurePolicies[]

object (FailurePolicy)

The list of failure policies that will be applied to the task in order.

defaultFailurePolicy

object (FailurePolicy)

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 (FinalState)
}
Fields
finalState

enum (FinalState)

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