Skip to main content

Can someone point me to some information on how K2 processes parallel paths at run time? I seem to recall reading something a while ago, but can't put my finger on it.

 

I need to understand what is happening when multiple line rules exit an activity and all are taken.. How concurrent are the subsequent activities along the lines? Does the K2 engine follow one line until it comes to a stopping point? Does it multi-thread, so different activities can be running at the same time? What's going on under the hood.

 

Thanks,

Doug

Hi Doug

Yes the workflow instance will execute multiple paths concurrently if there are multiple lines that exit an activity (providing the line rules evaluate to true). So effectively it does "multi-threading" by executing multiple activities at the same time.

Its a bit hard to find any detailed info but the following might help.

 

http://help.k2.com/en/K2LS-QRS011.aspx

 

http://help.k2.com/onlinehelp/k2forsharepoint/UserGuide/current/default.htm#Outcomes.htm#tracksearch=parallel


Hi Doug,

 

I would log a support call to get an official answer from Labs, but below is what I remember. It might have changed.

 

A process will not span differen threads when executing.

The thread will start with one of the routes and execute everything on that one route until it hits a stopping point.

Stopping points are any rules evaluating to False, Start Rules which start in the future, IPC events and client events.

When the stopping point is hit it will then start processing the next route.

This will continue until all routes are exhausted.

 

Again, please check with K2 labs, but I think this is what is going on.

It is probably not hard to build a small process to test this out.

Have a parallel activity writing to smartobjects with the timestamp.

Might give some insights.

 

Regards,

JohanL


Reply