Skip to Content
0
Nov 25, 2011 at 01:59 PM

Workitem locked by user WF-Batch (enqueue error)

868 Views

Hi all,

We had a problem that 2 or more workflow instances (of the same custom workflow) were created simultaneously (almost parallel) because of a batch program. We thought of a solution involving the event queue.

We added the starting events of the WF to the event queue so when 2 or more instances of the same WF were created or changed, all of them will go to the event queue and then they were going to be released sequentially from there.

In order to finish all the "old" workflow instances that are in the event queue (we only need to keep the last one created) we are triggering an event at the beginning of the workflow and waiting for the same event in one of the branches of the workflow, so when the next WF instace is released from the event queue, it will trigger the event and the previous WF intance will be finished (because it's waiting for that event to ocurr to logically delete the WF).

The problem is that when the first WF instance receives the event triggered from the second WF instance, it's

showing an error in that wait step and the WF won't finish (ir remains in process).

The error is the following:

Work item 000001508048 locked by user WF-BATCH (enqueue error)

Message no. WL605

After 20 minutes the first workflow instance is finished, but it should have been finished 20 minutes earlier.

Do you know where could be the problem here?

Thanks!