Skip to main content

Hi,


 


In my C# application, I'm calling K2 to start a process instance and passing the sync parameter as 'true'. The reason is I'm starting multiple workflow process instances and one of them is the main process. I want to make sure the main process instance has completed before the remaining ones will be started.


My questions are


Is this a good design? I'm thinking of what if the main process instance takes far too long to complete, is there a timeout error thrown back by K2 and is there any way to configure the timeout period?


I read that the sync call will return only once process reaches a stable state (client event, process completes, or encounters exception in one of the activities). The flow does not involve any client event and hence what I can expect is either complete or exception in the flow. If there is an exception, I should check via the API, processinstance.status1 ? What will be the different return status code strings I can expect?


 


Thanks,


lyf


 


 

Your main process can kick off other processes calling a webservice in server event.


Your main process can also writes out to a table when it's properly started.


Have a Service that polls/notify when data changed to launch subsequent processes.


Why not have the main process be responsible for starting the other processes with an IPC event at the appropriate point in the flow?  That would eliminate the guesswork.


Reply