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

pxAddChildWork doesn't use unique page name

SA-18440

Summary



The user reports that the pxAddChildWork activity does not create multiple covered work objects using the same class. This is happening after the migration from PRPC 6.2SP2 to Pega 7.1.8. The user wants to use the standard Pega rule pxAddChildWork but the standard Pega rules uses a page name for the childPage with the class name and error.

Error Messages



Error in Tracer: Flow_NullWorkPage on primary page
Error in log:
(WithErrorHandling.Work_.Action) ERROR - Error in commit()
(WithErrorHandling.Work_.Action) FATAL - .pyCommitError: ** A commit cannot be performed because a deferred save of instance XYZ-WORK-YY AAA-150 failed : code : <none> SQLState : <none> Message : <none>


Steps to Reproduce

  1. Create One work object called AAA - Work object created by external application
  2. Create Two covered work objects called BBB - Covered work object created by an activity during AAA flow. These work objects are created individually.
  3. Create Several covered work object called CCC - Covered work object created by declare onChange and activity during AAA and BBB flow.
  4. Observe: CCC work objects ("grand-child") are created in the same transaction that is, they must use the same class but unique page name.
  5. Observe: pxAddChildWork does not use a unique page name and the logic fails in this case.


Root Cause



Tracer shows "Workpage not found" and Fails at the time of creation of CCC for the second BBB object. A simple local-change is to do a save-as of the pxAddChildWork final activity (rename) and append pgID to the page name to make it unique. This works on PRPC 6.2 SP2 and the same works on Pega 7.1.8 as well. However, this is a final rule and proves futile in the long run. When multiple child workitems are created using pxAddChildWork in one transaction, same page name is used and this causes the issue. The java code in pxAddChildWork must be modified to use a unique page id for creating covered work objects in the case of recursive call.

Resolution



Apply HFix-25425.

Published April 1, 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