JBoss Community

threadsafety of workitems

created by Jürgen Schmied in jBPM - View the full discussion

      Hi!

I have a process with two workitems in parallel.

In executeWorkItem() I start a callable and execute completeWorkItem from a worker thread. When the flow runns for a while it blocks randomly. It seems the completeWorkItem() is not threadsafe and if different threads call it concurrently sometimes the acknowledging of the workitem gets lost.

If I warp the ksession in a object and synchronize all calls it runns fine.

I is told to do it this way in chapter  5.8.7.1. of the manual. Isn't the completeWorkItem call not supposed to be threadsafe?

Thanks!

juergen
   

Reply to this message by going to Community

Start a new discussion in jBPM at Community