Support Article
PegaUnit test case for flow that creates child case fails
SA-65673
Summary
PegaUnit test case created for a flow that creates child cases, fails.
Error Messages
On screen:
This is a singleton exception object and the stack trace below does NOT reflect the actual point of failure. To see the actual trace, set Initialization/UniqueActivityTerminateExceptions = true
![](https://gcsprdsa.lab.pega.com/articles/datacontent/Image/rteImages/UserUpload_15381329603511538132960433.png)
PRRuntimeError is displays when the Dynamic System Settings (DSS) Initialization or UniqueActivityTerminateExceptions is set to true.
![](https://gcsprdsa.lab.pega.com/articles/datacontent/Image/rteImages/UserUpload_15381333211681538133321271.png)
Tracer Error:
** Violation of PRIMARY KEY constraint 'XX_XX_XXXXX_WORK_PK'. Cannot insert duplicate key in object 'PegaDATA.pc_XX_XXXXX_Work'. The duplicate key value is (XX-XXXXX-WORK ID-48).
Steps to Reproduce
Run a test case for a flow which creates child case.
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Apply HFix-47344.
Published October 13, 2018 - 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.