Question

12
Views
Close popover
Cloe Walker (CloeW938)
IT Solution Service

IT Solution Service
SG
CloeW938 Member since 2018 154 posts
IT Solution Service
Posted: January 20, 2021
Last activity: January 20, 2021

Update other case type during case processing

Let's say, there are two case types in your application - W- and C-.

In the W- case processing, we want to update C- case in real time. For this, I have created an activity that does Obj-Open C- with a lock, Property-Set, Obj-Save and Commit and placed this activity in the post processing in Flow Action of W- case type.

It works fine most of the times, but I just noticed it throws an error as below when C- case is actually locked by someone else.

Commit Error

This error makes sense because C- is a different case type and it could happen - someone else may have it opened for an update. What would be the best practice to handle such situation? Should I implement some logic to loop and check if lock is held with a certain time? If so, can someone show me a sample code?

Thanks, 

Pega Platform 8.5.1 Case Management