[rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected
Drools Version: 5.1 (We are looking into upgrading, but not an option at this time) I have need of a rule flow that will allow a diverge on one-to-many paths and then converge and continue on only once the paths that were executed have all finish. Say I have path A, B, C. The constraints on the diverge node indicate that A C should be executed simultaneously, but B should not. Then the converge node should wait for A and C to finish, but not care about B as it was not executed by the diverge. Initial attempt was to use Diverge(OR) and Converge(AND). The problem is that the Converge (I think) waits on B indefinitely and so the process exits out with no error message. It looks like n-of-m is kind of what I want, except I have no way to know how many paths the Diverge kicked off. Any thoughts on how this could be done? Much Appreciated! -- View this message in context: http://drools.46999.n3.nabble.com/Rule-Flow-Diverge-Converge-Issue-with-one-to-many-paths-being-exected-tp3493775p3493775.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected
Can you split it into two separate diverges? Diverge to B first and always follow the other path which then does the A C, Similarly at the other end wait for A C and then a second wait to add in the condition for B. Thomas -Original Message- From: rules-users-boun...@lists.jboss.org [mailto:rules-users- boun...@lists.jboss.org] On Behalf Of dcrissman Sent: 09 November 2011 15:05 To: rules-users@lists.jboss.org Subject: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected Drools Version: 5.1 (We are looking into upgrading, but not an option at this time) I have need of a rule flow that will allow a diverge on one-to-many paths and then converge and continue on only once the paths that were executed have all finish. Say I have path A, B, C. The constraints on the diverge node indicate that A C should be executed simultaneously, but B should not. Then the converge node should wait for A and C to finish, but not care about B as it was not executed by the diverge. Initial attempt was to use Diverge(OR) and Converge(AND). The problem is that the Converge (I think) waits on B indefinitely and so the process exits out with no error message. It looks like n-of-m is kind of what I want, except I have no way to know how many paths the Diverge kicked off. Any thoughts on how this could be done? Much Appreciated! -- View this message in context: http://drools.46999.n3.nabble.com/Rule-Flow- Diverge-Converge-Issue-with-one-to-many-paths-being-exected- tp3493775p3493775.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ** This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmas...@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary. NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00 ** ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected
Swindells, Thomas wrote: Can you split it into two separate diverges? Diverge to B first and always follow the other path which then does the A C, Similarly at the other end wait for A C and then a second wait to add in the condition for B. Thomas I am not sure I entirely follow your suggestion. A, B, C could fire in any combination, but always at least one. -- View this message in context: http://drools.46999.n3.nabble.com/Rule-Flow-Diverge-Converge-Issue-with-one-to-many-paths-being-exected-tp3493775p3493884.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule Flow: Diverge/Converge Issue with one-to-many paths being exected
Hi, I do not reallt know whether there is a native way in jBPM to implement the m out of n-case you are describing. Anyway, imho, the easiest way to roundtrip this is probably this: Create a series of simple decision gateways: If(A has to execute), fire A; else do nothing; If (B has to execute); fire B; else do nothing;... Each time a task is not to be execute, the token will follow an empty path. You can use the or convergence to join the branches together again and lead them to the next divergence. Hope this helps. Regards, Frank dcrissman wrote: Swindells, Thomas wrote: Can you split it into two separate diverges? Diverge to B first and always follow the other path which then does the A C, Similarly at the other end wait for A C and then a second wait to add in the condition for B. Thomas I am not sure I entirely follow your suggestion. A, B, C could fire in any combination, but always at least one. -- View this message in context: http://drools.46999.n3.nabble.com/Rule-Flow-Diverge-Converge-Issue-with-one-to-many-paths-being-exected-tp3493775p3493922.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users