[rules-users] Drools Flow: Decide which subflow to call at runtime

Kris Verlaenen Kris.Verlaenen at cs.kuleuven.be
Fri Mar 26 21:04:21 EDT 2010


Anatoly,

Dynamic process id: use processId=#{variableName}
Mapping of variables: specify in the Eclipse IDE properties, looks
something like this in xml:
<subProcess id="1" name="SubProcess" processId="com.sample.#{var}">
  <mapping type="in" from="x" to="sub-y" />
  <mapping type="out" from="sub-z" to="x" />
</subProcess>

Check out this junit test file for working examples:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/ProcessSubProcessTest.java

Kris

Quoting tolitius <webakaunt at gmail.com>:

> 
> Hi Flow People,
> 
>     Need to understand if the following is possible:
> 
>     Have a main flow, that can possibly call multiple subflows. Can I
> use a
> variable that will be substituted instead of the sub-flow processId:
> 
>     <subProcess name="Some Child Flow" processId="<variable>" >
>       <mapping type="in" from="parentVariable" to="childVariable" />
>       <mapping type="out" from="childVariable" to="parentVariable"
> />
>     </subProcess>
> 
> Thank you,
> /Anatoly
> -- 
> View this message in context:
>
http://n3.nabble.com/Drools-Flow-Decide-which-subflow-to-call-at-runtime-tp676995p676995.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the rules-users mailing list