Parallel process creating multiple WorkList items

  • 31 March 2005
  • 2 replies
  • 3 views

Badge +3
I have a parallel process as described in Help under Preceding Rule.
When both my legs complete, the "Validate" event creates 2 WorkList entries.
This does not seem correct to me.

Anyone seen this before?
Any advice?

Thanks
C

2 replies

Badge +3
It turns out this was caused by the fact that I had multiple users assigned to the Validate step.
Changing that to a single user and limiting the slots to 1 solved the problem, but it still doesn't explain why I got 2 items in the WorkList when I had 3 users set for approval... mmm...

Anyone have any ideas on that?

Thanks
C
Badge +4
I toyed with parallel processing in a workflow once.... once. I couldn't get it to work correctly so I must have been doing something wrong.

However, after using K2 for a while now, I tend to think that trying to parallel process in a workflow is risky. The client events copy the Process Instance XML to the ActivityInstanceDestination XML and then back again after the client event. But there's only 1 copy of the ProcessInstance XML and it get's overwritten by each branch as client events are completed.

Suppose a process branches off into two directions (Management approvals and Purchsing dept. approvals). The moment the split occurs and each branch hits a client event, both branches have roughly the same data. When a Management approval occurs, the ProcessInstance is updated with the Management approval information (information not present in the Purchasing approval's XML) and proceeds through the process until it hits the next client event. When the Purchasing approval occurs and it's ActivityInstanceDestination is copied back to the ProcessInstance data, it overwrites the Management approval data!

The only way I can think of to get around this is to write your own code for the Succeding rule in the activity that contains the client event. That way, you could "merge" the changes into the ProcessInstance rather than simply overwriting it.

This assumes you need to change the XML in each branch. If you are only changing the XML in one branch, you will probably be okay.

Reply