Workflow Definition
Creating a Workflow
To create a Workflow, visit the Workflows
tab on the left-hand sidebar and press Create
. This will request a workflow name and description.
Workflows are defined as a directed acyclic graph (DAG). Kaspian allows users to build these DAGs through a simple graphical user interface.
Defining the Graph
Workflows can be assembled under the Graph
tab in the Workflows
page. On the right-hand side, all available Jobs are defined. To add to the graph, simply click on the Add
button for a specific Job. Then drag it to a specific location in the graph builder frame. To define Job dependencies, simply draw arrows between the dots on the left and right-hand sides of the Jobs. Press Save
inside the graph builder frame to save your changes; if the graph is invalid, an error message will pop up on saving.
Note
Once a Workflow has been executed, it is generally recommended that any further changes are made to a cloned version of that Workflow. Deleting or rearranging elements of the graph can result in an invalid view of prior graph executions.Configuring graph nodes
Individual graph nodes also expose some additional configuration options. By selecting a node in the graph builder frame and clicking on Configure
, the following parameters can be adjusted:
- Number of Retries: This takes an integer value representing the number of times a node’s underlying Job is allowed to re-run. For example, a Job that can only be run a single time should have this set to 0.
- Timeout: This takes an integer value that represents the number of minutes a node’s underlying Job Run can last. This timeout is configured per Job Run, meaning if retries are configured, the timer is reset each time the Job re-runs.
Scheduling Workflows
The workflow schedule can be defined in the Configuration
tab of the Workflows
page. The field accepts cron strings as well as some common intervals. A handy tool for constructing cron strings can be found here.
Workflow failures can also be configured to trigger notifications. Clicking on the dropdown will show all connected integrations, e.g., Slack, MS Teams channels. Select one to receive a message upon the Workflow failing.
To save, go back to the Graph
tab and press the Save
button inside the graph builder frame. Once a workflow is saved, scheduling it to run at the specified cadence requires that it be activated in the Overview > Workflows
page. Only activated Workflows will be run at the specified cadence. Conversely, any scheduled Workflow can be deactivated to pause its scheduler and prevent future invocations.