Skip to main content
The K2 server hangs when calling Finish(true) on a worklist item that is in an IPC created process. The conditions are: the worklist item is called near the end of the sub process. The sub process shows that it has completed. But the IPC event on the main process shows that it's still Active. Only restarting the K2 Server gets the IPC event to complete and continue.

Another interesting workaround is to add an activity to the sub-process (one called from the IPC event). The activity has no client events but has a start rule that waits one minute. This time delay gives the previous synchronous call to the worklistitem.Finish(true) method some time to complete. Sure enough, after giving a one minute delay, the process finished and then the calling IPC event finishes and the main process continues.

As I understand, calling the worklistitem.Finish(true) means that the call is made synchronously - meaning the worklist item has been completed by the time the call returns. Otherwise, calling just worklistitem.Finish() means that the call returns before the worklist item is actually finished because the worklistitem is actually finished in a separate thread.

So the question really is, why does calling finish synchronously cause the process to get stuck when in an IPC initiated process.

I believe there is probably a race-condition between calling the Finish() synchronously and the IPC Event trying to complete. I havn't seen any K2 documentation that says to NOT use the worklistItem.Finish method synchronously from an IPC started process.

FYI, this is when running SP4 version. I'm attaching files to reproduce this error (K2 Solution and console app to start process and approve worklist items). The sample solution set the IPC process activities destination users to the originator, so it will show up as whatever account the k2server is running under. Run the console app as the same user account.
Hi iabdi,

You are correct in your observations as well as the work-arounds. We are aware of the problem and the development team will have a look at it. Exactly why this happens, I'm not sure but I suspect it has got something to do with threading as well as SQL record locks.

Regards,
Ockert
Thanks Ockert, I appreciate it.

Hi ockert,

we have ran into the same issue several days ago. Is there already a patch available for this? If not when could we expect it?

Peter
 


Hi ockert,


 I too encountered the same problem today. Is there any patch available for it ?


Pls guide.


Thanks and Regards


Reply