Skip to main content

Parallel processing is easy in K2 - you add multiple exit lines to an activity, then eventually combine the process instances at an activity with a preceding rule.

We have a case where the number of parallel paths is variable. At activity A, the user will specify (in a data field) the number of temporary manufacturing items created by a physical process. Following that, each temporary item needs to be processed in parallel. Activity C (combine) needs to wait for all items to finish processing; it will have a single exit line for the combined manufacturing item. (The items are liquid in this case.)

Can K2 handle this? If so, how?

Thanks!
 

Do you have a pre-determined maximum number of parallel activities through each route line, or is Activity B going to be re-used repeatedly (which you would just use multiple slots)?

Or is this system activity (no client events)?
 

Are you using sub-processes?

 


We don't have a pre-set maximum currently. We could if necessary, but it would be more than 10.

Activity A will be a client activity (user specifies number of temporary items/paths).

Activity B (parallel) will be an IPC call to a sub-process. This will have multiple client activities.

Activity C will be a client activity that should not start until all parallel B's have completed.

We can do this by having B make multiple async IPC calls to start the sub-processes, then drop into a client activity that will decrement a counter and loop if nonzero when completed. The IPC sub-processes can each call a web service when they complete to connect via the K2ROM and complete the counter-decrement activity. This is rather complex, and I was hoping there was a simpler alternative.

Thanks,
Bill

 

icon-quote.gifPeter Yao:

Do you have a pre-determined maximum number of parallel activities through each route line, or is Activity B going to be re-used repeatedly (which you would just use multiple slots)?

Or is this system activity (no client events)?
 

Are you using sub-processes?

 


Reply