Trigger actions are the tasks that are executed each time the trigger's event occurs and the trigger's conditions are met. Trigger actions have an execution type and an execution phase.
Trigger actions have 2 execution types (configured in the trigger's general configuration):
In Background : The In Background execution type means the trigger's actions are executed via a background job in an asynchronous way.
In Process : The In Process execution type means the trigger's actions are executed in real-time in a synchronous way.
Depending on the trigger's execution type, triggers actions can be executed during different phases.
In Background execution phase
For the InBackground execution type, the trigger actions can only be executed during the post phase.
Post phase means the actions are executed after the trigger's event takes place.
In Process execution phases
For the InProcess execution type, the trigger actions can be executed in 5 different phases.
The different execution phases are useful for different use cases:
Pre-commit : In this phase, actions are executed before the triggering event's execution.
Validation : In this phase, actions are executed when the application validates the triggering event's data.
Security : In this phase, actions are executed when the application asserts the triggering user's permissions.
Audit : In this phase, Action scripts are executed after the triggering event's data is finalized.
Post : In this phase, Action scripts are executed after the triggering event is finalized.
Add a trigger action
To add trigger actions, users can create new actions or use an existing action.
Sitecore Content Hub supports 5 types of actions :
- Action scripts
- API call
- Azure Event Hub
- Azure Service Bus
- Reporting channel
For more information about actions, please refer to the Actions section.
For action scripts, only actions using restricted scripts can be used as a trigger's In Process action. While adding a new action to an In Process trigger, actions using non-restricted scripts are not displayed in the list.