Create a trigger

You can create a new trigger and then add conditions and actions using the settings grouped on three tabs (General, Conditions, and Actions) on the Triggers page.

To create a trigger:

  1. On the menu bar, click Manage Manage icon, and then click Triggers.

  2. In the upper-right corner of the application window, click New trigger.

  3. On the General tab, fill in the following fields:

    Column name

    Description

    Name

    A name for your trigger.

    Description

    A description of what the trigger does.

    Objective

    The event to which the trigger reacts. Content Hub supports three types of trigger events:

    • Entity creation - an entity is created.

    • Entity modification - an entity is modified.

    • Entity deletion - an entity is deleted.

    Execution type

    The method to execute the trigger's actions. Content Hub supports two execution types:

    • In Background - trigger actions execute using an asynchronous background job. With this execution type, trigger actions can only execute during the post phase (that is, after the trigger's event takes place).

    • In Process - trigger actions execute in real time in a synchronous way. With this execution type, trigger actions can execute during any of these five phases:

      • Pre-commit - before the execution of the triggering event.

      • Validation - when the application validates the data of the triggering event.

      • Security - when the application asserts the triggering user's permissions.

      • Audit - after the data of the triggering event is finalized.

      • Post - after the triggering event is finalized.

      Warning

      Do not use the In Process execution type for UI-related interactions or any time-consuming operations.

  4. To add trigger conditions, on the Conditions tab, under the name of the definition, click Plus icon Condition.

  5. If you don't see the entity definition you want to evaluate, click Add definition and, in the drop-down list, select the entity definition. Alternatively, if you want to add a condition that observes all available entity definitions, from the drop-down list, click Any definition.

  6. For the new entry, use the fields provided to choose the property you want to evaluate and the conditional clauses you want to check for. The available fields change depending on the selected entity definition, property, and clause. Click Plus icon Condition to add more conditions as needed.

    For certain properties and operations (for example, the Contains operation), you can specify in the condition operation that case is important by selecting Match case.

  7. If an entity definition has more than one condition:

    • You can change the logical operator on the left of those conditions to either AND (all conditions must be true) or OR (at least one condition must be true). The default is AND for all entity definitions.

    • You can click Plus icon Make group to convert a single condition into a group containing one or more additional conditions. Each group has its own logical operator used to evaluate its conditions, allowing you to create advanced nesting logic. You can also create groups within groups.

    Important

    If you create a trigger with the objective Entity deleted set to execute In background, it will not execute the associated actions. This happens because the trigger is invoked after the entity is deleted, so that the necessary data is unavailable for condition evaluation.

  8. To add trigger actions, on the Actions tab, in the desired phase (for example, Post actions), click Add action and, in the Search box, enter the name of the desired action and then select it.

  9. To delete or edit the actions available for a trigger, click Manage actions.

  10. When you have finished adding the actions and conditions you want, to activate the new trigger, click Save.

When you have configured a valid set of entity definitions and conditions, to view a JSON representation of the full conditional logic for your trigger, on the Conditions tab, click Advanced mode. You can then make any required changes to the logic by modifying the JSON.

Do you have some feedback for us?

If you have suggestions for improving this article,