This documentation supports the 22.1 version of BMC Helix Innovation Studio.To view an earlier version, select the version 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

Initiates a rule when any of the following events takes place on the record definition.

  • Record Event—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.
    For 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.
  • Execution Order—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

Initiates a rule when you specify one of the following time-specific events:

  • Timer Type—Select the timer type you want to use to trigger the rule. You can select from one of the following options:
    • Interval
    • Schedule
  • Interval Definition—Specify the required duration to trigger a rule.
    This field is displayed only if you select the Interval option in the Timer Type field.
    221_Interval Definition.png
  • Schedule Definition—Specify the required schedule time to trigger a rule.
    This field is displayed only if you select the Schedule option in the Timer Type field.
    221_Schedule Definition.png
  • Available Pools—The number of pools that should be available to distribute the load. You can configure the number of available pools by configuring the Private-RPC-Socket setting from the Centralized Configuration form. For more information, see Configuration settings N-R. Or you can define the maximum threads for Escalation queue from Ports and Queues tab in the Server Information form. For more information, see Setting ports and RPC numbers.
  • Pool Number—Select the pool number to distribute the load. The pool number should be between 1 and the number of threads configured for the rule queue. If the pool number is blank or outside the valid range, the rule is assigned to pool number 1.

After you trigger the rule by using the Timer Event trigger, the rule is displayed in a pool in the Rule pool management UI.

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

System Event

Initiates a rule when the following events takes place:

  • EmailReceiveEvent—Select 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—Select 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.
  • Execution Order—You can use execution order to set the precedence for the rules when more than one rule is associated with the same record definition.

Important: You can use only the Start Process, Cancel Process, Connector, and Signal Process actions with the System Event 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 and an assigned escalation pool number:

221_Trigger rule on Timer event.png

 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*