Triggers
A trigger is a part of a business rule component that controls if and when that business rule component is run.
Best Practice
Use priority values to control the execution order of business rule components. Additionally, within a business rule it is recommended that you list peer business rule components in execution order so that the business rule will be easier for others to understand.
The following is the syntax for a trigger.
Important! Content in a business rule is case sensitive. This includes business rule component names, attributes, and values.
About the syntax documentation
Vertical bars indicate that you must choose one of the options shown. Italicized items can be named or specified by you.
<triggers>
<trigger eventTrigger="ENQUEUE|PRINTJOBDETAIL|LABEL|Custom_Event" priority="integer" propagation="NONE|BEFORE|AFTER"/>
</triggers>
Syntax Tips
Additional information is available about the following items.
eventTrigger
Required. The name of an event associated with a business rule component that determines when during the processing of the business rule that business rule component is run.
You can use built-in events (ENQUEUE, PRINTJOBDETAIL, or LABEL) or custom events as triggers. Built-in events refer to points in time during processing and do not need to be created. Custom events must be defined and named before they can be used as triggers. For more information, see Events.
Note: If a business rule component includes both a global Conditional and a trigger Conditional, then the business rule component is run only if both Conditionals are true. That is, a logical AND operation is performed on the two Conditionals.
priority
Required. An integer that serves as a prioritization number for a business rule component. If the triggers for two business rule components use the same event, then the business rule component with the lower priority value is run first.
Important! If multiple business rule components use the same eventTrigger, you must specify a unique priority for the trigger in each of these business rule components to ensure the intended prioritization.
propagation
Optional. If the event specified in the trigger of a business rule component occurs and if the business rule component has children, the event can be automatically applied to the children. This attribute of a trigger controls whether the event is applied to the children. Additionally, this attribute controls whether the event is applied to the children before or after the business rule component is run, which affects whether data provided by the business rule component is available to its children. If propagation is not specified, the default value NONE is used.
Tip: For a securityInfo business rule component that includes children, it is typically recommended that you set propagation to AFTER so that the data added to the data map by the business rule component is available to its children.
NONE
|
The event is not automatically applied to children.
|
BEFORE
|
Before the business rule component is run, the event is automatically applied to any children. Data provided by this business rule component is not available to its children.
|
AFTER
|
After the business rule component is run, the event is automatically applied to any children. Data provided by this business rule component is available to its children.
|
Tip: For assistance with a business rule that you have created or to have Loftware create business rules for you, contact Loftware's Professional Services Group.