JBoss Community

Re: Invoking rules

created by Kris Verlaenen in jBPM - View the full discussion

In jBPM5, use a rule task and give your set of rules a name (i.e. ruleflow groupattribute).

Next, use Drools to define your rules and add these rules to the group you selected (using ruleflow-group attribute).

Your rules should now be executed when you reach that node.

 

Example can be found here:

https://github.com/krisv/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-RuleTask.bpmn2

https://github.com/krisv/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-RuleTask.drl

https://github.com/krisv/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/SimpleBPMNProcessTest.java (method testRuleTask())

 

Kris

Reply to this message by going to Community

Start a new discussion in jBPM at Community