Configure automatic enrolment of records from a data model to your workflow
Once a workflow is published and enabled, records can be automatically enroled the data model to execute the execution logic is the latest published version of your workflow. In this tutorial we learn how to configure the frequency and duplicate runs rules for these records.
Before you begin
Ensure you have a data model within the Data
module in Cargo that is connected to your workflow.
Once you've defined the execution logic of your workflow and enabled it, your workflow will start searching for changes in the underlying data model for suitable records to enrol.
To setup the schedule as per which this tracking is carried out, navigate to the Runs
view within the workflow and choose the Manual
button
to switch to automatic mode. This will allow you to set the frequency of the tracking, i.e. how often the workflow should check for changes in
the data model.
Choosing any of intervals for launching the 'cron' jobs in the previous step will display a new set of options for filtering records in the data model as well as defining the suitable kinds of changes to track for.
In this step, you can choose which filters to apply on the different columns in the model to ensure that only records that meet the criteria are included
in the scheduled change tracking, defined in the step above. You can add as many filters as you like in an 'AND' or 'OR' combination by choosing the
Add filter
or +
AND
buttons respectively.
Additionally, you can add a sort order using any of the model's column to the records that are enroled into the workflow by choosing the Add sort +
button.
You can also add a limit to the number of records that are enroled into the workflow by configuring the Limit
input.
Manage duplicate runs
In this view you can choose the rules for handling duplicate runs, i.e. whether to allow multiple runs or only one run per record. Here, choosing 'if not already enroled' will ensure that a record is always permitted to enter the workflow if it is not already present in the execution flow.
Finish line
By now, you have successfully configured how records will be imported systematically into your enabled workflow in Cargo. The data model can now feed into your workflow whenever the criteria set above are met.