OOTB svcAddWorkObject is intermittently not working as expected.
svcAddWorkObject is invoked to create a case from an Agent.
After Calling this activity rule an error is reported, Which affects the case creation and reportedly the cases are not getting created in the Pega environment.
After tracing, We found that the lock is getting released in the mid of the case lifecycle due to which the lifecycle of the case is not getting completed, and hence then it results in a broken process.
This is an intermittent issue That occurs at particular intervals. Try to reprocess a notification from the agent activity rule, svcAddWorkObject is invoked with the required parameters. Parent case is created, child case is not created with DB error of duplicate key being logged. Please find the error below:
svcAddWorkObject is invoked to create a case from an Agent.
After Calling this activity rule an error is reported, Which affects the case creation and reportedly the cases are not getting created in the Pega environment.
After tracing, We found that the lock is getting released in the mid of the case lifecycle due to which the lifecycle of the case is not getting completed, and hence then it results in a broken process.
This is an intermittent issue That occurs at particular intervals. Try to reprocess a notification from the agent activity rule, svcAddWorkObject is invoked with the required parameters. Parent case is created, child case is not created with DB error of duplicate key being logged. Please find the error below:
"2022-02-23 07:35:39,457 [ PegaRULES-Batch-2] [ STANDARD] [ ] [ DiagFW:01.01.01] (WithErrorHandling.Work_.Action) ERROR - Error in commit();com.pega.pegarules.pub.database.DuplicateKeyException: Database-Saver-Insertfail;DatabaseException caused by prior exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint ""Class_Name_XXXX""; Detail: Key (pzinskey)=(XXX-FW-XXXX-WORK XXX-XXXX) already exists.; | SQL Code: 0 | SQL State: 23505;; at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:438) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.DeferredOperationResult.throwInsertfailException(DeferredOperationResult.java:71) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:944) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:833) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.UpdateProcessor.performOps(UpdateProcessor.java:1580) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.UpdateProcessor.action(UpdateProcessor.java:283) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.UpdateProcessor.action(UpdateProcessor.java:89) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.store.DataStoreManager.doInTransaction(DataStoreManager.java:271) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.UpdateProcessor.processUpdates(UpdateProcessor.java:213) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.DatabaseImpl.commit(DatabaseImpl.java:2123) ~[prprivate.jar:?]; at com.pega.pegarules.data.internal.access.DatabaseImpl.commit(DatabaseImpl.java:2085) ~[prprivate.jar:?]; at com.pegarules.generated.activity.ra_action_commitwitherrorhandling_663a578384fcc69efadf2473d5dbfc39.step4_circum0(ra_action_commitwitherrorhandling_663a578384fcc69efadf2473d5dbfc39.java:510) ~[?:?]; at com.pegarules.generated.activity.ra_action_commitwitherrorhandling_663a578384fcc69efadf2473d5dbfc39.perform(ra_action_commitwitherrorhandling_663a578384fcc69efadf2473d5dbfc39.java:121) ~[?:?]; at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3556) ~[prprivate.jar:?]; at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10878) ~[prprivate.jar:?]; at com.pegarules.generated.activity.ra_action_svcaddworkobject_c0b52e7d84b00b63bb4ef7a38417b973.step7_circum0(ra_action_svcaddworkobject_c0b52e7d84b00b63bb4
***Edited by Moderator Marissa to add Support Case Details***