Configuring Triggers

Updated in 8.4

Triggers are non-interactive system responses to events in Alloy Navigator.

You configure Triggers for a particular object class in the Workflow and Business Logic > [Module] > [Object Class] > Workflow > Triggers section.

There are three types of Triggers:

  • "On Condition" Triggers fire when existing objects satisfy a specified condition. Alloy Navigator checks this condition at specific times. You may set a schedule to determine when or how often the condition is checked or configure Alloy Navigator to check the condition whenever an object is created or modified. These Triggers do not run on inactive objects, i.e. objects in "Closed," "Retired," or "Inactive" status.

  • "On Created/Modified" Triggers fire when an object is created or modified. Unlike "On Condition" Triggers, that check their condition after the object has been saved, "On Created/Modified" Triggers fire before the new data is saved into the database.

  • "On Delete" Triggers fire when an object is deleted.

    NOTE:: Alternatively, you can create and modify Triggers assigned to a specific Process in the Workflow and Business Logic > Advanced > Processes > [Process] section. For details, see Grouping Actions and Triggers into Processes.

To configure a Trigger:

  1. In the list of Triggers of a particular type, click New. The Trigger [Type] [ID] window opens. If you want to base the new Trigger on an existing one, select the source Trigger and click Copy Item.

  2. ClosedOn the General tab, specify the general Trigger properties:

    • ClosedFor "On Condition" Trigger:

      • Object Class (read-only) - the object class for which the Trigger is created.

      • ID (read-only) - the identification number of the Trigger that uniquely identifies it from other workflow items.

      • Name - the Trigger name.

      • Description - the description of the Trigger.

      • Enabled - enables the Trigger.

      • Check Condition - specifies when the system checks the condition:

        • After the object has been saved - the condition is checked upon saving the object.

        • Every ... minute(s) - the condition is checked regularly, with the specified frequency.

        • Use advanced schedule - the condition is checked regularly, on the specified schedule:

          • Change - opens the Schedule window, where you set the schedule.

      • For regularly checked conditions:

          Repeat Actuation - specifies whether the Trigger fires repeatedly on the same object:

        • Do not repeat - the Trigger fires only once on the same object.

        • Each time the condition is checked - the Trigger fires repeatedly on the same object each time the system checks the condition and the condition is true.

        • No more than once in ... hour(s)/day(s)/month(s) - the Trigger fires repeatedly on the same object, but no more than once in the specified period.

      • For regularly checked conditions, if the Trigger fires repeatedly on the same object:

        Stop Actuation - specifies when the Trigger’s actuation on the same object stops:

        • Never - the Trigger fires repeatedly as long as the condition remains true.

        • After... actuations - the Trigger can repeat on the same object no more than the specified number of times.

          • Resume if the object was modified - configures Alloy Navigator to automatically resume the stopped Trigger if the target object was modified.

        • Resume - allows you to manually reset the actuation counter and clear the Trigger history for all previously processed objects. The button appears as soon as the Trigger fires for the first time.

    • For "On Created/Modified" or "On Delete" Trigger:

      • Object Class (read-only) - the object class for which the Trigger is created.

      • ID (read-only) - the identification number of the Trigger that uniquely identifies it from other workflow items.

      • Name - the Trigger name.

      • Description - the description of the Trigger.

      • Enabled - enables the Trigger.

      • Execute when - specifies the event for firing the Trigger:

        • Object is created - Trigger fires when a created object is being saved.

        • Object is modified - the Trigger fires when a modified object is being saved.

        • Object is created or modified - the Trigger fires when a modified or created object is being saved.

          NOTE: "On Created/Modified" Triggers fire before the new data is saved in the database.

      • Run this trigger only from the object Full Form - specifies whether this trigger is run only when the object is created or modified using the object's Full Form.

  3. ClosedOn the Condition tab, build the condition:

    • ClosedFor "On Condition: Trigger:

      Alloy Navigator checks this condition in accordance to the settings specified on the General tab, the fires the Trigger if the condition evaluates to TRUE.

      • Edit - opens the Criteria window where you build the Trigger condition.

      • IMPORTANT: "On Condition" Triggers do not run on inactive objects, i.e. Alloy Navigator does not check the Trigger condition on objects having Closed, Retired, or Inactive status.

    • ClosedFor "On Created/Modified" or "On Delete" Trigger:

      If you want the Trigger to fire only when a certain condition is satisfied, build the condition. Alloy Navigator checks this condition whenever the triggering event occurs, and fires the Trigger if only the condition evaluates to TRUE.

  4. ClosedOn the Programming tab, specify the operations to be executed when this Trigger fires:

    • New - adds a new operation or a conditional block:

      • Update Field

      • TIP: If you want Alloy Navigator to add a record to the Activity Log when the Trigger is completed, configure Update Field operations for Activity fields. For details, see Updating Activity fields.

      • E-mail Notification

      • Push Notification

      • Execute Function

      • Create Object

      • Act on Related Object

      • Relate To

      • External Command

      • Message Box

      • Execute SQL

      • Add Attachments

      • Abort

      • "IF" Group - inserts an IF...ELSE IF...ELSE...END IF construct. For details, see Building conditional statements.

      • "ELSE IF" Group - inserts an ELSE IF statement into IF...ELSE IF...ELSE...END IF construct. For details, see Building conditional statements.

      • "ELSE" Group - inserts an ELSE statement into an IF...ELSE IF...ELSE...END IF construct. For details, see Building conditional statements.

        NOTE: Operations are executed in the order they appear in the list, with some exceptions:
        1. If the list of operations includes E-mail Notification operations or Functions containing E-mail Notification operations, the placeholders in those E-mail Notifications will be replaced with the values that are actual after the whole Trigger is executed.
        2. If the list of operations includes Execute SQL operations or Functions containing Execute SQL operations, the Trigger will run Execute SQL operations last, after saving all changes made by Update Field and Create Object operations.

    • Edit - allows you to modify the selected operation or a conditional block

    • Delete - removes the selected operation or a conditional block.

    • Move Up - moves up the selected operation or a conditional block and changes the execution order.

    • Move Down - moves down the selected operation or a conditional block and changes the execution order.

    • TIP: By default, all operations are added as enabled. You can temporarily disable unneeded operations by right-clicking them in the list and selecting Disable Operation and then enable them again. Also, you can use disabling and enabling operations to test and debug the Trigger.

  5. ClosedOn the Processes tab, you can assign the Trigger to Processes based on its usage:

    • Add - opens the Select Process window, where you can select an existing Process or create a new one.

      NOTE: You view workflow items grouped by Process and manage the list of Processes in the Workflow and Business Logic > Advanced > Processes section. For details, see Grouping Actions and Triggers into Processes.

    • Remove - removes the Trigger from the selected Process.

  6. Click OK.

TIP:For On Condition Triggers that check the condition regularly:
You can view statistics on competed Trigger sessions on the Sessions tab. For details, see Viewing On Condition Trigger sessions.