Pāriet uz galveno saturu

Triggers for data workflows

Triggers for data workflows

Triggers automate the execution of your data workflows.

note

To control the access to triggers, use the access capabilities workflow orchestration:read and workflow orchestration:write.

A data workflow can have one or more triggers associated with it. Each trigger is uniquely identified by an externalId.

Trigger rule

When you create a trigger, specify a triggerRule that defines the conditions that must be met to run the trigger. The triggerRule consists of a trigger type and its associated parameters.

Schedule

Use the schedule trigger type to run a data workflow at regular intervals. The interval is specified by a cron expression.

For example, to run the trigger every day at 12:00 AM, use the cron expression "0 0 * * *". The time zone for the cron expression is UTC.

Trigger target

The trigger targets a data workflow, defined by a workflowExternalId and workflowVersion.

Input and authentication

You can define an input data object as part of the trigger. When the trigger starts executing the target data workflow, this input object will be provided as input to the workflow.

For authentication, the trigger requires a nonce. This is a temporary token that is used for authentication when the data workflow execution starts. A nonce can be retrieved from the Sessions API when creating a session.

Trigger run history

You can retrieve a trigger's run history. This gives you detailed information about each run, such as when it happened, which data workflow it successfully started, or why the trigger run failed.

note

You can't change a trigger once you have created it. You must delete it and create a new trigger. Deleting a data workflow also deletes the associated triggers.