Timeout while processing workitems through API

Which IIQ version are you inquiring about?

8.4p2

Share all details about your problem, including any error messages you may have received.

We are approving IIQ requests via a custom end point and this seems to work fine until there are ginormous access requests (20+ items) which are not getting actioned.

The error that we are receiving is: -

**An unexpected error occurred: sailpoint.tools.GeneralException: The application script threw an exception: sailpoint.api.ObjectAlreadyLockedException: Timeout waiting for lock on object: sailpoint.object.WorkflowCase:0aba063299cd16048199ce9021970507 from ??? BSF info: script at line: 0 column: columnNo **

After enabling logs, I have isolated this to a line of code which is: -

**flower.process(workItem, true);**

I have attached the function.
Object locked issue.java (9.3 KB)

Following is API request body: -

{
   "workflowArgs":
   {
       "approvalAction":
       {
           "WorkItemUniqueId" : "0aba063299cd16048199ceaa687c096f",
           "ApproverEmployeeId" : "29020348",
           "Action" : "approve",
           "EntitlementId": "0a3dd8767e321aaa817e328e3f117460",
           "Reason" : "testing approval from oneview lockout error"
       }
   }
}

Apart from introducing some wait time in the code, are there any other remedies we can apply?

Object locking in IIQ is used so that only one process can modify an object at the same time. Occasionally it’s possible that there could ba a failure during processing and the lock may stay on the object. Even though these locks should expire but I saw in the code that there are places which ignore that and not work.

Having said that in your situation it could be 2 states.

  1. Accidental failure. You could start with this. To resolve remove value from iiq_locked column in spt_workflowcase table using sql. Your could should start working.
  2. Your code and data is trying to access the same object in multiple threads. If this error keeps happening again you need to look that maybe you are trying to approve the same approval twice in parallel which could cause such error.

Alek

Hi @aleksander_jachowicz ,
Thank you for looking into this.
This issue is happening even when a work item is approved by a single user and after hitting the API for a second time the issue is resolved.

What are the possible implications if we do a flower.process(workItem, false); which asynchronously updates the item?