About this task
To define an action in the THEN
statement, do the following:
Procedure
-
Click the green + button
next to
THEN
to open the Add a new action dialog box.
Example
-
Select Modify customer
from the list and click OK.
The action is displayed in the THEN
part.
Example
-
Click the small pencil icon to open the Add a field dialog box, select rejected from the list to add the rejected field
to the
THEN
part.
Example
-
Click the pencil icon next the rejected field to open the
Field value dialog box, click
Formula to add formula list next to
the rejected field, and select true from the list.
Following the same procedure, add a reason field and give it a literal value of AGE.
Example
-
Click show options...
and then click the green + button to open
the Add an option to the rule dialog box.
Example
-
Select no-loop from the
Attribute list. Then, select the
no-loop check box in the editor to
avoid infinite loop.
Example
-
If required, in the date-effective and date-expires fields set a start and end dates, time range, for
the rule to be executable.
-
Save the rule.
You can test the rule to ensure that it meets the
requirements. For more information, see
How to test a rule.
-
Build and deploy the rule.
Results
The new rule is now ready to be used in a production environment to
trigger a specific action based on the set conditions. For example, use your studio to
create a Job with the
tBRMS component, set the
connection between the studio and the Drools repository from which you want to retrieve
a business rule and apply it to the data flow in the Job.