AM also looking for something similar. Want to route based on a DRL file. Do you have any examples ?. Please share. Thanks
1 of 1 people found this helpful
Here is an example for executing rule base syntax on sequence flow condition:
<sequenceFlow id="_9-_10" sourceRef="_9" targetRef="_10" name="sq-name"> <conditionExpression xsi:type="tFormalExpression" language="http://www.jboss.org/drools/rule" >eval(false)</conditionExpression> </sequenceFlow>
where eval(false) is rule syntax to be executed, please keep in mind that it must return boolean.
To use a rule constraint in a gateway you must think in LHS of a drools rule, i.e, the constraint is a drools condition, an example:
There is a class "Person" with a attribute "age", and we would like know if a person is majority, then...
-> First Constraint
Person(age >= 18)
-> Second Constraint
Person(age < 18)
Excuse my english.