6.2. Adding Business Rule Task
A Business Rule Task is a task which fires rules that belong to a certain ruleflow group.
To add a Business Rule Task to your process, do the following:
Open your Business Process in Process Designer: in Project Explorer, select the
HelloWorld
project, theorg.bpms.helloworld
package, click on BUSINESS PROCESSES and choose theHelloWorld
process.Package SelectionMake sure to select the
org.bpms.helloworld
package. Selection of an incorrect package causes the deployment to fail.- In the displayed Business Process Designer with the Hello World process, expand the Object Library palette with Process Elements: click the double-arrow button ( ) in the upper left hand corner of the Business Process Designer tab.
Expand the Tasks menu and drag-and-drop the Business Rule Task to the canvas on the right.
Adjust flow connections so as to integrate the task into the workflow.
Select the Business Rule Task and define its properties in the Properties panel:
-
Name:
BusinessRule
Ruleflow Group:
helloworldgroup
The Ruleflow Group property defines the group of rules that should be fired when the task is being executed. In this example, only one rule, the
helloworldrule
rule defined in thehelloworldrule.drl
file, is present in thehelloworldgroup
group.
Figure 6.1. The HelloWorld Process with the Business Rule Task and Its Properties
-
Name:
- Click the save button to save the changes.