Support Article
Declare Trigger background process using wrong access group
SA-30041
Summary
A Declare Trigger configured to execute in the background is not using the correct access group of the user so a RuleNotFoundException is occurring. User tried setting the pzUseCurrentAccessGroupForChild parameter to true as described in the below Support Article but then an error occurred trying to set the javascript shrink settings.
https://pdn.pega.com/support-articles/declare-trigger-activity-not-found-when-used-standard-agent
Error Messages
Error message before setting the pzUseCurrentAccessGroupForChild to true.
com.pega.pegarules.pub.generator.RuleNotFoundException: Failed to find a 'RULE-OBJ-ACTIVITY' with the name 'TRIGGERACTIVITY' that applies to 'ORG-Work-Request'. There were 2 rules with this name in the rulebase, but none matched this request. The 2 rules named 'TRIGGERACTIVITY' defined in the rulebase are:
2 related to applies-to class 'ORG-Work-Request', but were defined in rulesets which are not in your rulesetlist
Error message after setting the pzUseCurrentAccessGroupForChild to true.
Caused by:
java.lang.IllegalStateException: Attempting to set javascript shrink settings for an unavailable access group
at com.pega.pegarules.internal.priv.authorization.RequestorHashInformation.setShrinkJavaScriptEnabled(RequestorHashInformation.java:180)
Steps to Reproduce
- Configure the SSO process so the user's access group is set dynamically when logging into the application.
- Log into two different applications.
- Process a work object so the Declare Trigger is executed.
Root Cause
An issue in the custom application code or rules. The access groups need to be present on the Operator record for the batch process to switch access groups when the pzUseCurrentAccessGroupForChild is set to true.
Resolution
To resolve the issue, the pzUseCurrentAccessGroupForChild should be set to true and the access group will need to be present on the Operator record.
Enhancement Request FDBK-17223 has been entered to review the functionality in a future release.
Published November 5, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.