-
1. Re: How to model a loop with GPD?
romeufigueira Jan 30, 2007 11:23 AM (in response to morpheus_jboss)Yes, you can program a loop in the GPD.
Depending on the complexity of your loop, you may need to add some more logic through a programatic way.
I think you need to include an end state, but you can specify a way in wich the transaction to that state is never taken. -
2. Re: How to model a loop with GPD?
morpheus_jboss Feb 1, 2007 8:04 AM (in response to morpheus_jboss)Hi Romeu,
Tks for your reply. I don't quite understand this yet:
"I think you need to include an end state, but you can specify a way in wich the transaction to that state is never taken."
I posted this question to make sure this is not yet implemented in jbpm before I start coding it in my own way.
Many thanks again. -
3. Re: How to model a loop with GPD?
romeufigueira Feb 1, 2007 8:36 AM (in response to morpheus_jboss)To put it in a programatic way:
Let's say you have a 4 state cenario:
1 - Start State
2 - State A
3 - State B
4 - End State
The following transitions exist:
1 to 2
2 to 3
*2 to 4
3 to 2
The "2 to 4" transition should never been taken, therefore making a 2-3-2 loop for ever.
You could force this through an ActionHandler (check docs if you don't know what it is).
by forcing the "2 to 3" transitioncontext.leaveNode("2 to 3");
You could also hard code your transistions in the JPDL (xml source of the process) by placing conditions on the transactions (again see docs for this).