This documentation supports the 20.08 version of BMC Helix Platform.  To view an earlier version, select 20.02 from the Product version menu.

Defining a trigger for a rule


In Rule designer, the Trigger element is used to create a trigger that defines the conditions under which a rule is initiated.

This topic describes the types of triggers, provides the procedure to define the trigger in a rule, and examples of using each trigger type in a rule. 

Trigger types

 The following trigger types are available in BMC Helix Innovation Studio:

Trigger type

Description

Record Event

The Record Event trigger type initiates a rule when any of the following events takes place on the record definition:

  • When the record definition is created, updated, deleted, or imported.
    You can use rules to trigger workflows on On Create, On Update, On Delete, and On Import record events.
  • After the record definitions are created, updated, deleted, or imported. When you want a rule to be initiated after record definitions are saved in the system, you can use the After Create, After Update, After Delete, and After Import record events.
    Example: If you want to automatically start an approval process after a purchase request is saved, you can use the After Create record event.
    However, actions that run after the record transaction cannot update the transaction record.
    You can use execution order to set the precedence for the rules when more than one rule is associated with the same record definition.

For an example of using the Record Event trigger in a rule, see Trigger a rule on the On Create Record event.

Timer Event

The Timer Event trigger type initiates a rule when you specify one of the following time-specific events:

  • Interval—You can specify the required duration to trigger a rule in the Interval Definition field.
  • Schedule—You can specify the required schedule time to trigger a rule in the Schedule Definition field.
  • Pool Number—You can use escalation pools to distribute the load. The pool number should be between 1 and the number of threads configured for the escalation queue. If the Pool Number is blank or outside the valid range, the escalation is assigned to Pool Number 1 and is run by the first escalation thread.

For an example of using the Timer Event trigger in a rule, see Trigger a rule on a Timer Event.

System Event

The System Event trigger type initiates a rule when the following events takes place:

  • EmailReceiveEvent—You can specify this trigger to initiate a rule after an email is received.

For an example of using the EmailReceiveEvent trigger in a rule, see Trigger a rule on the System Event.

  • WebhookCallbackSystemEvent—You can specify this trigger to initiate a rule after a webhook callback is received. 
    For an example of using the WebhookCallbackSystemEvent trigger for the JSON format of the request body, see Example:Trigger a rule on WebhookCallbackSystemEvent.

Note: You can use only the Start Process, Cancel Process, Connector, and Signal Process actions with the System Events trigger type. You cannot configure Output Map for the System Event trigger type.


To define a trigger in a rule

  1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
  2. Select the application in which you want to create a new rule.
  3. In the application, click the Rules tab.
  4. Click New. 
    The system opens the Rule designer and displays the rule diagram on the canvas.
  5. Select the Trigger element and in the Element Properties Element properties tab.png tab, select the appropriate trigger type.
  6. Define the properties of the selected trigger type.
  7. Save the rule.

Examples of trigger types

 Example: Trigger a rule on the OnCreateRecord event

The following image illustrates a sample rule that starts a process when a new task is created:

Trigger a rule.png

 Example: Trigger a rule on the Timer event

The following image illustrates a sample rule that triggers a process based on a schedule specified in a timer:

Trigger rule on timer event.jpg

 Example: Trigger a rule on EmailReceiveEvent

The following image illustrates a sample rule that triggers a process to create a service request when a new email is received:

Trigger rule on receive email.png

Example: Trigger a rule on WebhookCallbackSystemEvent

If there are multiple rules associated with one WebhookCallbackSystemEvent, you must add the Webhook callback configuration name in the qualification.

The following image illustrates a sample rule that triggers a process to update a service request when a new webhook callback is received:

       
Example_DocuSignWebhook callback.png

Tip

If the original response is in the JSON format, the response is stored in the requestBody field. An example of a JSON response can be seen when you use Adobe Sign.

If the original response is in the XML format, the response is converted to the JSON format and stored in the jsonrequestBody field. An example of a converted XML response can be seen when you use DocuSign.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*