-
Notifications
You must be signed in to change notification settings - Fork 5
Creating Workflow
A workflow is a sequence of tasks necessary to complete a job on a regular basis. Tasks can be dependant on other tasks. Each task is defined independently of the workflow to enable reuse. These definitions are then referred in the workflow as part of workflow tasks.
Task Definition: A task definition is composed of a set of attributes required by the Kronos during execution.
Workflow Task: A workflow task is an extension of task definition containing execution properties like the policy to apply in case of timeout, max execution time etc.
A task definition in Kronos is defined as
KEY | DESCRIPTION | TYPE | DEFAULT | MANDATORY |
---|---|---|---|---|
name | name of the task definition (used while defining workflow task) | string | None | yes |
type | type of task (the task of the same type are handled by the same handler) | string | None | yes |
properties | properties required by the task handler to execute the task | map | None | no |
A workflow task in Kronos is defined as
KEY | DESCRIPTION | TYPE | DEFAULT | MANDATORY |
---|---|---|---|---|
name | name of the task (should be same as task definition) | string | None | yes |
properties | properties required by the task handler to execute the task | map | None | no |
dependsOn | list of tasks current task depends on (check Task Dependency for more detail) | list | None | no |
schedule | cron string representing the task schedule | string | None | no |
maxExecutionTime | max allowed time for the task to finish execution | string | 1d | no |
timeoutPolicy | policy to apply in case of timeout | string | None | no |
isEnabled | enable/ disable a task, disabled tasks won’t be picked for execution | boolean | true | no |
Dependency between tasks is defined as
KEY | DESCRIPTION | TYPE | DEFAULT | MANDATORY |
---|---|---|---|---|
name | name of the task it depends on | string | None | yes |
mode | whether it depends on the first, last or all tasks in the workflow with given name | enum | all | no |
A workflow in Kronos is defined as
KEY | DESCRIPTION | TYPE | DEFAULT | MANDATORY |
---|---|---|---|---|
name | name of the workflow | string | None | yes |
namespace | namespace the workflow belongs to (used in multi-tenancy) | map | default | no |
description | a short description about workflow | map | None | no |
tasks | list of tasks part of the workflow defined as workflow task | boolean | true | no |
schedule | cron string representing the task schedule | string | None | yes |
isEnabled | enable/ disable a workflow, disabled workflow won’t be picked for execution | boolean | true | no |
Sample task definitions and workflow definitions is available here in yaml format for reference.