Hi all,
Using a Java Agent/POJO in EPS 10.2.1 I'm searching for active workitems and setting them to ABORT. The flow of events is:
1. ps.getObject to get the process attributes of the Agent
2. ps.executePMQLStr to find active workings in other processes
3. for every workitem retrieved, execute: ps.setWorkItemStatus( accessContents, workItemId, Constants.WI_STATUS_ABORT );
The first item in step #3 aborts fine, but the second results in an exception: The object with id 'PIxxxxxxx-xxxxx-xxxxx-xxxxx' is already locked (the second workitem is part of the same process instance as the first). I've tried using a 60 second timeout between calls, but that doesn't help.
Note that I'm getting similar locking messages when I try to route a set of workitems using ps.routeWorkItem, so it may be something different which causes the locking.
I've submitted the issue below to OT Support, but it is classified as a development issue. I'm hoping someone from product support can confirm whether this is the case or not.
Any suggestions are much appreciated!