This content has been marked as final.
Show 2 replies
-
1. Re: Simple workflow for newbie
kukeltje Jan 31, 2007 9:40 AM (in response to enpx)look at the second topic in this forum. After you have studied that, experimented a little, failed a lot, please come back with a more detaild question about a problem
-
2. Re: Simple workflow for newbie
enpx Feb 1, 2007 2:32 AM (in response to enpx)After reading manual I write this jPDL code:
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="recursion"> <start-state name="start"> <transition name="find contract" to="find contract"></transition> </start-state> <node name="find contract"> <action class="org.jbpm.tutorial.mytest.FindContract"/> <transition name="is contract exists" to="is contract exists"></transition> </node> <decision name="is contract exists"> <handler class="org.jbpm.tutorial.mytest.IsContractExists"/> <transition name="create contract" to="create contract"/> <transition name="create account" to="create account"></transition> <transition name="end" to="end"></transition> </decision> <node name="create contract"> <action class="org.jbpm.tutorial.mytest.CreateContract"/> <transition name="find contract" to="find contract"></transition> </node> <node name="create account"> <action class="org.jbpm.tutorial.mytest.CreateAccount"/> <transition name="end" to="end"></transition> </node> <end-state name="end"></end-state> </process-definition>
FindContract, IsContractExists, CreateContract and CreateAccount are my own classes. FindContract class wites search result to context variable, IsContractExists reads this variable to decide which transition will be selected
Is this approach optimal or can be refactored?