Back Forward More about Declare Trigger rules
 

  1. About 
  2. New 
  3. Triggers 
  4. Pages & Classes 
  5. History 
  6. More... 

Trigger activities

The primary page passed to Trigger activities is the top-level page corresponding to the Applies To class of the rule.

An activity of type Trigger may alter properties, call functions and execute other rules, but do not perform database commits. Take care in declarative processing not to specify processing that produces infinite looping.

R-12547 3/4/04 ERNSG When you choose In Background on Copy in the Execute field, the triggered activity runs in a child requestor in parallel to the current requestor. This means that:

Primary page

During execution of a Declare Trigger rule, the page on which the rule operates temporarily becomes the primary page. The page keyword PRIMARY and the results of the tools.getPrimaryPage() PublicAPI method reflect this change.

When the Declare Trigger rule execution completes, the primary page of the calling activity resumes as primary. ERSNG 10/30/07

Testing and debugging

C-446 Using the Tracer, you can watch the evaluation of a Declare Trigger rule if the Execute field value is Immediate:

  1. Start the Tracer and select a requestor session.
  2. Click the Options button (Options) and check the Declare Trigger box in the Event Types to Trace section.
  3. Select the RuleSet that contains the rule to be traced.

History change auditing

Declare Trigger rules can automatically update the history of a work item, rule, or data object when certain properties change.

For work item change tracking, use the Field Auditing gadget, on the Work History landing page. See Process and Rules category — Work History page.

For data or rule tracking, see PDN article How to audit field-level changes to security rule and data instances.

Java code display

When you save a declare trigger rule, the system converts the rule to Java source code. As a learning or debugging aid, you can review this Java code.

C-1665Click the Show Java toolbar button (Show Java) to see the system-generated Java code that implements the rule. The window presents a read-only preview of the Java that implements this rule instance. This Java code is not identical to the Java that is executed at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's RuleSet list.

Definitions declarative rules, forward chaining, top-level page
Related topics Declarative processing — Concepts and terms
Debugging with the Tracer
Standard rules Atlas — Standard Declare Trigger rules

UpAbout Declare Trigger rules