views:

816

answers:

5

in JBPM, can I have (technically) multiple transitions going out from a Task Node?

If Yes, is it a good practice?

Any help would be useful.

A: 

Yes, it's possible.

Why not. You have two ways for a process and you can't define algorithmic way for choose one.

FoxyBOA
+1  A: 

It is possible, but if you propagate execution of you process by callign token.signal() or taskInstance.end(), the transition choosen will be the first(in .xml file), no matter what conditions there will be on that transitions. If that condition evaluates to false exception will be thrown.

Out of the box only decision node supports choosing transition by evaluating conditions on them and the first transition with condition that evaluates to true will be choosen (or the first if no conditions evaluates to true).

But it is very simple to write custom actionhandler that propagates execution by hand (token.signal("transitionname")), and choosing the Right transition (tm).

Sorry for my English.

A: 

I think what he wants is Fork, Fork is a type of node that helps you with multiple transitions, more likely multi-flows, the best example this way is MC Donald's, if you are buying anything they're doing it in the same time you're paying, so when you finish the payment you have like a 'join' so it delivery and you can be happy or not.

If that's the point of question go to 'Fork' and 'Join' you can easily find answers in the JBPM Docs

A: 

Hello, In the BPM there are a possibility. The task have 2 or more transictions and the user can choose 1, 2 or more transictions (or all transictions).

How can I implement this in jBPM ?

A: 

you have to use a fork node after task node.