Support Article

Declare trigger is giving runtime error



Users observe that Declare triggers configured to run in the background are causing a runtime error.

Error Messages

2017-05-18 06:32:04,543 [ PegaRULES-Batch-5] [ STANDARD] [ ] [ PegaRULES:07.10] (ernal.async.BatchRequestorTask) ERROR - Batch activity "WorkClass.DeclareTriggerName" threw: PRRuntimeError
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivities(

Steps to Reproduce

  1. Create a Declare Trigger which applies to a class associated to a work object.
  2. On a work object resolution or cancellation (when flow end) invoke the trigger on commit.
  3. Configure trigger execution mode to run in back ground.
  4. Review the Pega logs.

Root Cause

The root cause of this problem is a defect in Pegasystems’ code/rules.

The declare trigger takes in the ruleset stack of the access group for the batch requestor instead of the operator that creates the work object.


This issue is resolved through the following local-change:

1. Go to the activity that the declare trigger calls.
2. Add a parameter pzUseCurrentAccessGroupForChild. An example here, the activity name is PrintToLog:

2) Go to the declare trigger and set the parameter to true.

Published May 26, 2017 - Updated July 10, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.