In this blog post I will transform a Decision Table step-by-step into the new Verbal Rules. As a starting point I created a composite with a BPM, a BPEL and a Rules component. Both BPM and BPEL components use the same Rules component. See the following three screenshots. You can download the sample application with this starting point from here.
Open the sample application in JDeveloper 12c to follow the step-by-step example for a hands-on experience.
This blog is divided into the following four part:
- Explore the sample Business Rule
- Why Verbal Rules?
- Creating Business Phrases
- Creating Verbal Rules
Explore the sample Business Rule
Open the Business Rules file. You have access to it from two different places. From the BPM branch and the SOA branch.
The excel integration is implemented for Decision Tables. As you can see in the image above there is a decision table ‘PensionDT’ available. Open this table by double clicking on it’s name. The table has the following content:
The input payload for this rule is information about a pension participant. The following information is supplied:
- dateOfDeath (filled if participant past away)
- dateOfJobEnd (when participant is not being productive anymore)
- applicable Pension Products (OP: Old-age pension, WP: Orphan pension, PP: Widow’s pension)
- Partner information
- DateOfDeath (filled if partner past away)
- Child(ren) information (for simplicity of the example, the rule currently supports only one child)
- DateOfDeath (filled if child past away)
The output payload of this rule is a statement about the current pension status. Possible outcomes are:
- Contributor (participant is productive and is paying contribution).
- Sleeper (participant is not productive in this trust and is not paying contribution).
- Notified contributor (participant is productive, but get’s retired within a year).
- Retired (participant has ended his working career and receives an old-age pension).
- Widow and / or Orphan (participant has died. The widow and / or orphan’s receive a pension).
- Out Of Scope (e.g. participant and relatives all died).
Why Verbal Rules?
Usually procedural knowledge can be communicated only by demonstrating its application in specific cases. The concise, linguistic form of verbal rules permits the communication of general procedural knowledge in a relatively easy manner; the linguistic form may also be easier to memorize and retrieve than sequences of actions. Thus, verbal rules may be a useful instructional method for procedural tasks. For example, that the rule “a before b, except after c” is easy to communicate, memorize and retrieve is probably verified by the reader’s experience with this rule. Traditional (before 12c) Business Rules and Decision Tables point out to be difficult to understand for Business Analysts and Users. The possibility to formulate them in a more natural way was lacking. Verbal Rules potentially might bridge this cap.
Creating Business Phrases
A verbal rules can be constructed by concatenating several phrases in business language. Depending on the rules input and output data a number of default phrases are available, but it is also possible to define custom phrases. In this paragraph I will show how to do this.
To create verbal rules as a substitute for the PensionDT decision table the phrases required is somewhat arbitrary. Select the Business Phrases tab to start creating phrases. Click the green plus sign in the right upper corner to start creating a new phrase. You have the possibility to create a test phrase and an action phrase. First lets start with a test phrase.
The Business Phrase editor appears.
Now lets define a phrase for a living old-age pension participant. First define a parameter of type ‘member’. The member contains information about the participant which was defined as the input payload of the business rule. After that specify the phrase in the value field. In here define the position of the parameter by entering it’s name between parenthesis. Finally define the mapping as a general rule.
Besides this test phrase I defined eight other test phrases (listed below) and one action phrase (pension status) for the outcome of the rule.
- participant has beneficiary relatives –> indicated whether the participant has a living beneficiary partner or children
- participants age between .. and ..
- participant is living
- participant is not living
- participant is older than ..
- participant is younger than ..
- participant is working
- participant is not working
Creating Verbal Rules
After creating these phrases it’s time to start defining the verbal rules. For this select the Verbal Rules tab and then click the create Verbal Rule button.
We will start to define the ‘Relatives Pension Payment’ rule. This rule check whether the pension participant past away and has beneficiary relatives. When this is the case the pension status is set to ‘Widow and/or Orphan’. First select the field. From here it is possible to construct the rule by entering the required business phrases. We want to know if the participant is not living anymore. When you type the letter ‘l’ a wizard will show all business phrases containing this letter. Select the phrase ‘member is not living’ we earlier defined.
Continue to construct the rest of the rule. Play a little around with the phrase selector to get a good feeling of how it works. After creating all five rule you should have some basic understanding of the new verbal rules feature.
The overview tab shows the final result.