Skip to main content Skip to complementary content

Defining an action in the THEN statement

About this task

To define an action in the THEN statement, do the following:

Procedure

  1. Click the green + button next to THEN to open the Add a new action dialog box.

    Example

  2. Select Modify customer from the list and click OK.
    The action is displayed in the THEN part.

    Example

  3. 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

  4. 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

  5. Click show options... and then click the green + button to open the Add an option to the rule dialog box.

    Example

  6. Select no-loop from the Attribute list. Then, select the no-loop check box in the editor to avoid infinite loop.

    Example

  7. If required, in the date-effective and date-expires fields set a start and end dates, time range, for the rule to be executable.
  8. Save the rule.
    You can test the rule to ensure that it meets the requirements. For more information, see How to test a rule.
  9. Build and deploy the rule.
    For further information, see Building and deploying business rules.

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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!