Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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 July 10, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us