202 Flexible Decision Automation for Your zEnterprise with Business Rules and Events
7.1 Designing the decision interface
The starting point for any successful decision project is to design the decision interface
correctly. Often, we have an existing copybook that is used by the application that we are
enabling to access WebSphere Operational Decision Management. The natural starting point
seems to be to reuse this data structure as the interface to the decision. Although this
approach might seem to be the easiest, there are benefits to be gained by giving the interface
more consideration.
When designing the decision interface, consider why we are externalizing business rules into
an external decision server. One of the main reasons is that the business decisions change
on a shorter lifecycle than the applications that invoke them. Therefore, we want to isolate the
application from changes to the business rules in the decision. However, we also want to
isolate the business decision from maintenance changes that occur in the application, as well.
Changes in the application can alter the copybook that the application uses. Application
changes result in the need to import the copybook again to update the BOM that is used in
the rules. The changes potentially disrupt rules that are already authored.
Also, the data in the copybook might not be suitable for use with rule authoring. Application
copybooks in COBOL are often a mix between a representation of the business data and its
specific entries. For example, we often put COBOL FILLER statements in to align data, or we
create fields to hold return codes or other diagnostic information. These fields have no
business relevance to the decision and are confusing if included in the BOM.
It is also important to ensure that the data passed across to the business decision contains all
the required information to successfully make the decision. When thinking about the data,
consider information that might not be used in the business rules that are embedded in the
application today. This information might be useful to develop a better business decision after
it is externalized. It is far easier to pass more data across when designing the decision
interface from the outset than to re-engineer the interface at a later date or add code into the
decision to retrieve external data.
It is a preferred practice to design the interface to a business decision in the same way that
you design a service interface. Look at the data that is used in the decision today. Look at the
data that is easily available to the application. Look at the data that is required today and
potentially in the future to maintain the decision after it is externalized. Then, create a
copybook to hold that information specifically for the decision interface that can be versioned
for that purpose. The additional cost of a few COBOL MOVE statements is outweighed by the
flexibility that this approach provides in isolating changes in both the decision and the calling
application.
7.2 Mapping from the COBOL copybook
This section contains the following sections:
򐂰 Structure of a COBOL-based rule project
򐂰 Supported COBOL data types
򐂰 Creating custom converters
򐂰 Mapping level-88 constructs into BOM domain types

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.