Error executing a long running process

  • 20 July 2010
  • 2 replies
  • 2 views

Badge +2

I get the following exception, when running a K2 process that contains a long running (15min+) section of server side code


 


Object '/492a0074_4310_42c0_929a_854e043441f6/vk+ugikyjx0kn4by3hcbyabx_831.rem' has been disconnected or does not exist at the server.


 


I am guessing the k2 server has a timeout value, where it kills the remoting object. Is there a workaround to keep this from happening? This process is known to take some time. The only other solution would be to create a windows service, command line program, or forms app where i call the k2 objects directly


2 replies

Badge +10

Typically to handle the type of scenario that you describe you would use an async server event.  The async server event would typically call the external system or a web service that executes the code and pass or store the events serial number.  The workflow would then wait (just like a client event) for the external system to call back into the workflow to say its done using the serial number to call back into the correct instance.


This technique and sample code is described here:  http://help.k2.com/en/KB000272.aspx


Hope this helps.


Tim

Badge +2

thanks timkn. I created a quick solution today with a forms app, I will have to look further into this idea.

Reply