Using Triggers with Workflows
Triggers are actions that run when your data is updated. Triggers are not part of the Publishing & Workflow System but can be integrated in a number of ways. This topic explains how integration with triggers can be accomplished.
On This Page
- Triggering an Action via the Row Action Widget
- Triggering an Action on Multiple Records Using Table Tools
- Using the Form Display Mode Rule to Isolate Trigger Actions
- Trigger Actions via a Record Update
- Triggering an Action via the Row Action Widget
Triggering an Action via the Row Action Widget
The Row Action Widget can be inserted into any Data Page and used to directly call a trigger when the button is clicked. The benefit of this method is you can elect to skip processing of the initial and change state rules and can also select to call an individual child Trigger Action without running ALL of the Trigger Actions (running all of a Triggers child Trigger Actions is the default behavior). In addition, you can also show a prompt to confirm that the end user wants to run the trigger.
Learn more about how to insert a Row Action Widget into your Workflow Page here.
Triggering an Action on Multiple Records Using Table Tools
Using the Table Tools option on Bootstrap themes, you can execute a trigger for a selection of multiple records.
Learn more about executing a trigger on multiple records
Using the Form Display Mode Rule to Isolate Trigger Actions
First, let's see how to configure Trigger Action Rules to recognize that the triggered event is coming from a workflow. This is important, as it allows us to only fire a trigger when a record is updated via Workflow as opposed to being updated via the Submission Bin.
When setting up a trigger, you define an initial state & change state rule (see About Triggers) and a series of actions to execute when those initial & change state rules match. Each trigger action that runs can also have a rule to determine if it should execute. This is where you can use the 'Form Display Mode' to check if the record's update/insert is being initiated via a workflow.
The screen shot below shows how to set up a rule to check if the update is via a Workflow Edit Page.
Trigger Actions via a Record Update
The easiest way to fire a trigger is to simply set up a trigger and let it run whenever a record is updated via an Edit Page, or via an Edit Field Widget or a new entry is submitted via an Integrated Form
Triggering an Action via the Row Action Widget
The Row Action Widget can be inserted into any Data Page and used to directly call a trigger when the button is clicked. The benefit of this method is you can elect to skip processing of the initial and change state rules and can also select to call an individual child Trigger Action without running ALL of the Trigger Actions (running all of a Triggers child Trigger Actions is the default behavior). In addition, you can also show a prompt to confirm that the end user wants to run the trigger.
Learn more about how to insert a Row Action Widget into your Workflow Page here.
-
George Christian The link to Row Action Widget is broken
1 Comments