-
1. Re: How to model human-task with sub-employees
swiderski.maciej Mar 9, 2012 6:33 AM (in response to rrpeterson)1 of 1 people found this helpfulHi Ryan,
Have you considered to build arbitrary loop in your process?
You would have gateways that will control if there is a need to continue looping and if so additional task responsible for assigning new reviewers. If needed you can combine it with multiinstance capability for Perform Review task if there are number of reviewers that can to their work in parallel.
What do you think about it?
Cheers
-
2. Re: How to model human-task with sub-employees
rrpeterson Mar 9, 2012 8:26 AM (in response to swiderski.maciej)Thank you for your reply Maciej!
That's sounds very close to solving my issue, my only point of concern is the behavior at "Assign New Reviewers": Will jBPM spawn off new processInstances for each sub-employee? For example if a manager has two employees, and they each have three employees:
1. The manager performs the review of his employees
2. Somewhere a check is made to see if the manager's employees have employees
3. Yes they do, Assign the new reviewers
At this point here, how does the processInstance go from a single instance for the manager, to two instances for the manager's employees? This is necessary because each sub-employee will complete a review on different schedules, and each needs to be checked individually for sub-employees after the manager's reviewing is complete.
Is it possible to start a new process, or call an external process from a previously started process?
From the examples I've read it seems like a sub-process might be the key here, I'm just not quite sure how to get the behavior I'm looking for.
Thanks again!
-
3. Re: How to model human-task with sub-employees
swiderski.maciej Mar 9, 2012 8:57 AM (in response to rrpeterson)I meant to have single process instance but multiple instances of human task that is assigned to review. So, in that case iteration of the loop will be for a level in a hierarchy of employees. That could mean there will be only one employee responsible for review (at CEO level) or there could be number of employees (at lower levels).
In first case (CEO), there will be single instance of Perform Review human task that will prevent of going further unless review was completed. Next assign new reviewers will be responsible for looking into some service to get list of downstream employees responsible for review (and that could be more than one) and will start new iteration. Perform review should be multipleinstance node that can create any number of instances of that human task and assign to every reviewer from given collection. Again all employees on the same level can work in parallel with their tasks. I think process instance will wait for all employees on given level to finish their tasks before new iteration will start - is that acceptable in your case?
HTH
-
4. Re: How to model human-task with sub-employees
rrpeterson Mar 9, 2012 9:49 AM (in response to swiderski.maciej)Thanks Maciej, that sounds like the way to go. For anyone else that finds this, Esteban has an example of multiple-instance nodes made up already: https://github.com/esteban-aliverti/JBPM-Samples/tree/master/Multiple-Instance-Node-Samples
I'll report back with the solution once I get it all figured out.