Skip to main content
Version: v5.0

Properties and errors

Overview#

When defining a workflow, it is necessary to understand the following sets of properties:

Click on each property set for a detailed description.

Workflow properties and error handling#

The Workflow Service handles errors according to the property values set in TaskDef properties.

For error handling, the main properties to consider are:

  • _retryCount
  • _retryLogic
  • _retryDelaySeconds

RetryCount#

The _retryCount property is an integer value which specifies the number of retries to attempt when a task is marked as failed. This defaults to the value of 3. The maximum value which it can be set is 10.

RetryLogic#

The _retryLogic property is a string which sets the mechanism for performing retries of a task.

The possible values for _retryLogic are:

  • FIXED - Reschedule the task after retryDelaySeconds
  • EXPONENTIAL_BACKOFF - Reschedule the task after retryDelaySeconds * (2 ^ attemptNumber).
  • LINEAR BACK - Reschedule after retryDelaySeconds * backoffRate * attemptNumber.

RetryDelaySeconds#

The _retryDelaySeconds property is an integer value which specifies the time to wait before retries of a task. This defaults to 60 seconds.

For more information, refer to TaskDef properties below.

WorkflowDef properties#

FieldTypeDescriptionNotes
_idUUIDUnique identifier for workflow defintion
_nameStringName of the workflow
_descriptionStringDescription of the workflow
_userTypeStringIdentifies class of user
_namespacesArray of stringList of namespaces
_taskDefsArray of task defsList of tasks associated with the workflow
_timeoutSecondsIntegerThe amount of time after which the workflow will be masked as TIMED_OUT.The value is in seconds.
_timeoutPolicyStringWorkflow's timeout policy.Defaults to TIMED_OUT_WF. If set to TIME_OUT_WF then the workflow is marked as TIMED_OUT and terminated. If set to ALERT_ONLY, then a counter is registered - workflow_failure, with status tag set to TIMED_OUT.
_updatedByStringUser ID of the user who last updated the workflow
_createdByStringUser ID of the user who created the workflow

Workflow properties#

FieldTypeDescriptionNotes
_idUUIDUnique identifier for the workflow
_workflow_def_idUUIDUnique identifier for the workflow definition
_nameStringName of the workflowThis name needs to be in the class_reference_mapping table (_name field)
_descriptionStringDescription of the workflow
_userTypeStringA way to identify a group to workflows.
_namespacesArray of stringList of namespaces
_resultJSONResult of the workflow
_contextJSONContains the Auth token
_statusStringStatus of the workflow.Possible values include: RUNNING, COMPLETED, FAILED, TIMED-OUT, PAUSED and CANCELED
_timeoutSecondsIntegerThe amount of time after which the workflow will be marked as TIMED_OUTThe value is in seconds.
_timeoutPolicyStringWorkflow's timeout policyDefaults to TIMED_OUT_WF. If set to TIME_OUT_WF then the workflow is marked as TIMED_OUT and terminated. If set to ALERT_ONLY, then a counter is registered - workflow_failure, with status tag set to TIMED_OUT.
_created_atIntegerTime at which the workflow was created
_updated_atIntegerTime at which the workflow was updated
_updated_byStringUser ID of the user who last updated the workflow
_createdByStringUser ID of the user who created the workflow

TaskDef properties#

FieldTypeDescriptionNotes
_idUUIDUnique identifier
_workflow_def_idUUIDWorkflow definition ID
_nameStringName of the task
_descriptionStringDescription of the task
_sequencenoIntegerSequence number to define the execution order of tasks
_typeStringType of the taskExample values: SCRIPT_EXECUTION, USER_INPUT
_inputParamsJSONInput parameters of the task
_retryCountIntegerNumber of retries to attempt which a task is marked as failed.Defaults to 3. The maximum allowed value is capped at 10.
_retryLogicStringMechanism for the retriesValues are: FIXED - reschedule the task after retryDelaySeconds, EXPONENTIAL_BACKOFF - Reschedule the task after retryDelaySeconds * (2 ^ attemptNumber), and LINEAR BACK - reschedule after retryDelaySeconds * backoffRate * attemptNumber
_retryDelaySecondsIntegerTime to wait before retries.Defaults to 60 seconds
_timeoutSecondsIntegerTime in seconds, after which the task is marked as TIMED_OUT if it has not reached a terminal state after transitioning to IN_PROGRESS status for the first time.No timeout if set to 0
_timeoutPolicyStringTask's timeout policyDefaults to TIME_OUT_WF. If set to RETRY then it retries the task again. If set to TIME_OUT_WF then the workflow is marked as TIMED_OUT and terminated. This is the default value. If set to ALERT_ONLY then it registers a counter - (task_timeout)
_responseTimeoutSecondsIntegerIf greater than 0, the task is rescheduled. If it is not greater than 0, it is updated with a status after this time (heartbeat mechanism). Useful when the worker polls for the task but fails to complete due to errors/network failure.Defaults to 600
_resultJSONOutput of the task
_decisionCasesArrayMap where the keys are the possible cases with values being lists of tasks to be executed.Used for SWITCH task
_forkTasksJSONA list of lists of tasks. Each of the outer list will be invoked in parallel.Used for FORK JOIN task