rbv_api.runTrigger()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This Object Script method runs a trigger on the specified object. This method will invoke a trigger regardless of timing options, such as On After Update. For HTTP calls, consider using sendHttpGet() or setHttpPost() instead. This API forces the trigger to run immediately. Any delay timings or large job attribute set on the trigger definition is ignored unless specified explicitly via API parameters.

Formulas used in Object Script triggers can include other API methods and regular Platform template functionality, such as loops. Object Script methods have no effect if called outside of update triggers.

Syntax

rbv_api.runTrigger(objName, Id, triggerOrigId, checkValidation, runRecursions, runAsync, runAsJob)

Mandatory Parameters

objName

Integration name of the object

Id

ID of the record on which to run the trigger

triggerOrigId

Integration name (string) or original ID (string) of the trigger

Optional Parameters

checkValidation

Can be true or false. If set to true, check validation formula before running trigger, otherwise ignore validation formula. The default value is false.

runRecursions

Can be true or false. When runRecursions is set to true, configures the trigger to run recursively, assuming recursive properties are set on the trigger definition page. The default value is false.

runAsync

If true, forces the trigger to run with a 5-second delay regardless of whether or not delay timing options, such as Run Relative To, Run At, etc. are set for the trigger. This is an optional parameter and its default value is false.

runDelay

When set with any value in milliseconds, the trigger is scheduled to run asynchronously with the given delay from the current time.

runAsJob

If true, the trigger is scheduled to run as large job with an enhanced monitoring and cancellation capabilities. If false value, the trigger is not set to run as large job. See Run as Large Job, for more information.

Note: If this parameter is skipped, then it's value is considered as false. Trigger definition values are not considered for this run.

Return value

None

Permissions required

Edit permission for the selected object type. 

Examples

Example 1:

All the optional parameters have a default value, hence need not be specified. Only the mandatory parameters are specified.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA")

Example 2:

checkValidation is True (non-default value), while the other optional parameters have default values.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", true)

Example 3:

runRecursions is True, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, true)

Example 4:

runAsync is True, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, false, true)

Example 5:

runAsJob is True, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, false, false, true)

Example 6:

runAsJob is Not Provided, while the other optional parameters have default values.

Note: If at least one of the optional parameters has a non-default value, then all optional parameter values up to that parameter must be specified sequentially, even if they are default values. runAsJob parameter is considered as false for this example.

rbv_api.runTrigger("Query", {!id}, "TaC4hpbwSDmjSPOHavRqJA", false, false, false)