User development, A new message was posted in the thread "Creating tasks in a loop with JBPM 4.3":
http://community.jboss.org/message/529655#529655 Author : null null Profile : http://community.jboss.org/people/ustone Message: -------------------------------------------------------------- hmmm..ok...that's not the thing i want to hear ;-) so i played around and tried something... Here is my xml ..(java classes are omitted because calls are selfdescribing): ------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <process key="LOOP" name="Loop" xmlns="http://jbpm.org/4.0/jpdl"> <start g="274,7,48,48" name="startNode"> <transition g="-45,-18" name="to initialdecideForkAgain" to="decideForkAgain"/> </start> <end g="281,755,48,48" name="endNode"/> <java class="my.jbpm.loop.TestActivity" g="63,316,92,52" method="sayHello" name="sayHello"> <transition g="-61,-18" name="to joinHello" to="joinHello"/> </java> <java class="my.jbpm.loop.TestActivity" g="78,155,92,52" method="decreaseForkCounter" name="decreaseForkCounter" var="request"> <arg> <object expr="#{request}"/> </arg> <transition g="-43,-18" name="to forkHello" to="forkHello"/> </java> <decision g="279,118,48,48" name="decideForkAgain"> <handler class="my.jbpm.loop.ForkAgainHandler" /> <transition g="-37,-18" name="FORK_AGAIN" to="decreaseForkCounter"/> <transition g="746,372:-58,-18" name="FORK_NOT_AGAIN" to="decideJoinAgain"/> </decision> <fork g="280,213,48,48" name="forkHello"> <transition g="-45,-18" name="to sayHello" to="sayHello"/> <transition g="-77,-18" name="to decideForkAgain" to="decideForkAgain"/> </fork> <join g="278,399,48,48" name="joinHello"> <transition g="-61,-18" name="to increaseJoinCounter" to="increaseJoinCounter"/> </join> <java class="my.jbpm.loop.TestActivity" g="66,474,92,52" method="increaseJoinCounter" name="increaseJoinCounter" var="request"> <arg> <object expr="#{request}"/> </arg> <transition g="-68,-18" name="to decideJoinAgain" to="decideJoinAgain"/> </java> <decision g="277,606,48,48" name="decideJoinAgain"> <handler class="my.jbpm.loop.JoinAgainHandler" /> <transition g="-61,-18" name="JOIN_NOT_AGAIN" to="endNode"/> <transition g="-58,-18" name="JOIN_AGAIN" to="joinHello"/> </decision> </process> ------------------------------------------------------ The main idea behind this is to count the number of forks and joins to know how often i have to fork and i have to join. Values are saved in the workflow object itself..... [Join|Fork]AgainHandler do evaluate the values to decide if antother fork/join has to do.... TestAactivity only in/decrease the counter and do some "Hello" output.... I can attach a little zip with the whole project if somebody is interested... What do you think? Are there any problems with this kind of problem solution..... -------------------------------------------------------------- To reply to this message visit the message page: http://community.jboss.org/message/529655#529655
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
