Chapter 7. Advanced topics for decision authoring 213
You can change the default Java to COBOL mapping in the Default COBOL Type Setting tab
on the COBOL Code Generation property page.
The following classes are unsupported Java types:
򐂰 Any Java classes, except the classes that are listed in Table 7-3 on page 212
򐂰 The java.lang.Object class
򐂰 Classes that are defined in another BOM entry
7.4 Extending the capability of the rule execution with BOM
The Business Action Language (BAL) that is used to define rules is flexible and extensible.
Generally, business rules are written from a vocabulary that is based on the structure of the
data that is passed in, for example:
If the age of the borrower is less than 18
then ……
It is also possible to verbalize methods to be invoked from rules, as well. These methods can
come from either methods from the imported Java XOM classes or defined directly in the
BOM as virtual methods, for example:
public void rejectTheLoan()
this.approved = false;
The method in this example can be verbalized as reject the loan and then used for rule
If the age of the borrower is less than 18
then reject the loan ;
Here, the method ‘reject the loan’ can be used in place of the BAL statement:
make it false that the loan is approved ;
This approach greatly simplifies the rule authoring experience.
Although BOM methods are useful, ensure that the business decision can still be managed by
the business and that the decision is still reusable across multiple platforms. In this section,
we describe several of the preferred practices for BOM methods and show you an example of
using them.
7.4.1 Preferred practices for using virtual methods
To the IT-focused decision developer, the BOM methods might appear to be an attractive way
to augment the capabilities of a business decision. However, you can negate the value of
externalizing a business decision into a business rule engine if you do not use the BOM
methods correctly. We describe a few of the preferred practices to help you avoid misusing
the BOM methods.
Do not bury business logic in the business decision
When we realize that we can access custom Java code from within a business decision call, it
can be tempting to add business logic to the decision. Adding business logic to the decision is

Get Flexible Decision Automation for Your zEnterprise with Business Rules and Events now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.