Re: [BPMN Forum] about the execution of multiple parallel subprocess

3 views
Skip to first unread message

Thomas Hildebrandt

unread,
Mar 14, 2013, 12:41:07 AM3/14/13
to BPMN...@googlegroups.com, BPMN...@googlegroups.com
Hi,

I hope there is indeed a nice solution to this simple problem, by nice I mean in particular not relying on throwing errors or exceptions which seems not to be a nice way to model something which is not an exception?

I assume this is an example where setting the MultiInstanceBehavior to Complex could be the solution - and specifying that an event should only send for the first successful candidate.. However, I did not find (but not look very carefully either) in the spec a precise indication of how this could be specified, which leads to a doubt wether, if at all possible, it will be very dependent of the BPMN engine used if and how it can be specified?

Best
Thomas Hildebrandt
http://www.itu.dk/people/hilde

Sendt fra min iPhone

Den 13/03/2013 kl. 15.38 skrev Stefano Tranquillini <stefano.tr...@gmail.com>:


Hi all. 
i'm having trouble with the understanding of subprocesses that have parallel execution. 
at the link (http://disi.unitn.it/~tranquillini/misc/hiring.pdf) you can see a very simple example (i made it up just for having a model for reference). 

what i want to model is the fact that interview processes (the subprocess) is executed many times in parallel but when the right person is found he is hired. What i want is that the subprocess loop ends when the first person passes the task "is he ok for the job?" 

right now, to me, this model does not show this. 
the main point is: when does the multiple loop end? as far as i understood the loop ends when all the instances are completed, this value (number of instances) has to be set at modelling time. is this right? 
if so, is there a why to loop until the task "is he ok for the job" ends correctly, so not when the subprocess ends via the boundary event ? i can change the end for the boundary event if it make the whole thing working. 
or what can i do? 

thanks

--
--
You received this message because you are subscribed to the Google
Groups "BPMN Forum" group.
Public website: http://www.bpmnforum.com
To post to this group, send email to BPMN...@googlegroups.com
To unsubscribe from this group, send email to
BPMNforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/BPMNforum?hl=en_US?hl=en
 
---
You received this message because you are subscribed to the Google Groups "BPMN Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to BPMNforum+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas Hildebrandt

unread,
Mar 15, 2013, 10:47:43 AM3/15/13
to BPMN...@googlegroups.com, BPMN...@googlegroups.com
Oh, yes, that is right, I forgot about that attribute, this seems indeed as the nice solution when modelling.


Sendt fra min iPhone

Den 15/03/2013 kl. 11.03 skrev Stefano Tranquillini <stefano.tr...@gmail.com>:

Thanks for the reply.
Actually the loop has an attribute completionCondition: Expression [0..1]: "This attribute defines a boolean Expression that when evaluated to true, cancels the remaining Activity instances and produces a token."

but now, about "Expression":
"The Expression class is used to specify an Expression using natural-language text. These Expressions are not executable. "

I don't know if engines support expressions that can be understood by machine (activiti does something in this direction, as far as i remember), but from a modeling prospective, using the expression as completion condition is the right way to do it.

thanks
ciao

Neal McWhorter

unread,
Mar 17, 2013, 7:19:59 PM3/17/13
to bpmnforum
Stefano,

I don't think you really want to use the multi-instance activity because it pre-supposes that all the instances are known up-front. If you're really saying that interviews will continue until someone is hired and you don't know how many interviews there will be then I'd suggest you consider breaking this into two processes. The first process is the actual hiring process and it waits until the interviewing process identifies a potential hire. Each interview process is associated with both an interviewee and a hiring process. So when the interviewing process finds a hire it sends a message to out that the position has been filled. From that all other instances of the interviewing process will catch the message as an interrupting message and terminate. The hiring process itself will then take the person identified in the message and continue the rest of the hiring process. 

Inline image 1

I hope this helps!

Neal McWhorter
image.png
Reply all
Reply to author
Forward
0 new messages