Task: Develop Rules |  |
This task is about developing each rule in the rule project.
Disciplines: Rule Authoring
Relationships
Roles | Primary Performer: Rule Writer | Additional Performers:
Outputs | Ruleset
Main Description
Programming using rule approach enforces to know how a rule engine is working. This is not a complex skill, rue author needs to understand the concepts of asserting, retracting object into working memory and modifying them. It is recommended to read what a Rule engine is to get those concepts. Rule development can follow a test driven development approach: the developer can develop the test cases to trigger the rule execution and then write the rules. Once done the new rules are extracted with the other rules in the rule set, deployed to the unit test environment and the test executes. When designing with interface the unit test uses the facade to access the rule engine for the execution. When rules are complex and include a lot of conditions it may make sense to add condition by steps. It may be easy to make error by using a wrong boolean operator. When the rue language support navigating into collection the testing may include test around the presence and not presence of element in the collection. It is always interesting once the rule is developed to perform rule analysis if the BRMS product has this capability. The analysis helps to see if the current rule is in conflict with existing rules.
Steps
Develop Business Rules
Using template or not, the rule writer write the rule as described during the rule discovery and analysis.
Develop Decision Tables
See also Decision table
Develop Decision Tree
See Decision tree
Develop Technical Rules
Technical rules are not exposed to the business user, but are needed for rule execution efficiency. Part of this categories are rules that loop on a collection and assert all the object in the working memory. Technical rules leverage the full power of the rule language and the programming language
Develop external helper functions
To improve performance, or accessibility or to simplify rule writing, it may make sense to implement some reusable logic in helper classes and methods instead of rules. Example of such methods are logger of trace, or sorting policies, or delegate the call to more complex reusable services.
This program and the accompanying materials are made available under the Eclipse Public License V1.0, which accompanies this distribution. EPF Copyright.