Wednesday Jan 22, 2014

Batch Processor in Oracle Policy Automation (OPA)

Adeolu Owokade | Monad Solutions

In this article, we will be exploring the Batch Processor in Oracle Policy Modeling. The Batch Processor allows a large number of cases to be processed in batch. It can take input from comma separated files or from a database and can output to the same.

Let me give an example of where the batch processor may come in handy. Imagine a Telecommunications organization that recently implemented OPA for its customers to check what mobile phone packages they can apply for. However, that organization already has data about its existing customers in a database and will also want to know which packages are applicable to its existing client base. The best way to do this will be by running this data in a batch rather than conducting an interview for each existing customer.

The Batch Processor sees its usefulness in other areas like conducting what-if analysis and generating test scripts from existing Excel data. We will explore input from and output to CSV files. This article assumes you have working knowledge of OPA; I will make it as practical as possible so let us begin by modeling a simple rulebase.

Sample Policy

  • The customer is eligible to apply for the Gold Plan if the customer has been a registered customer for at least 3 years and the total amount spent by the customer is above £3,000.
  • The customer is eligible to apply for the Silver Plan if the customer has been a registered customer for at least 2 years and the total amount spent by the customer is above £2,000.
  • Any registered customer is eligible to apply for the Basic Plan.

The OPA rules for this policy are as shown below:

The data model is as shown below:

Batch Processor Zero-configuration

If you are using CSV files as the input to the Batch Processor, much of the mapping from CSV data to OPA data can be done automatically through the Zero-configuration, by following a few simple guidelines which we will discuss in this section.

Entities

The CSV file name should be the public name of the entity. In our example, we will use two CSV files: "global" and "customer". "customer" is the public name of 'the customer' entity as shown below:

The CSV files are as shown below:

Input Attributes

The columns on the first row in the CSV files should be named with the attribute public names.

Identifier

By default, a column with the heading "#" is assumed to be a unique identifier for that entity.

Output attributes

To represent output attributes, enclose such public names in brackets.

One-to-Many Relationships

One-to-many relationships can also be represented in CSV files by using the public name of the relationship as the column title. For example, the relationship between global and 'the customer' entity is a one-to-many relationship which I can represent  in the customer.csv as shown below:

In the diagram above, customer instances #1 to #4 are instances under global instance #1 while customer instances #5 to #7 are instances under global instance #2.

The full content of the CSV files are shown below. The global.csv file has two instances of 'global'. You can think of this like two separate interviews (or 2 test cases). The customer.csv file has 7 instances representing 7 customers.

Running the Batch Processor

The batch processor is a standalone application that is run from the command line using the parameters listed below:

  • java -jar determinations-batch.jar <command line parameters> (JAVA)
  • Determinations.Batch.exe <command line parameters> (.NET)
To make running the Batch Processor easier especially when using Zero-configuration, I recommend placing all your files and rulebase in one folder. For example, take the rulebase ZIP file (found in the output folder in the Development folder of your OPA project) and place it in a separate folder. In that same folder, create another sub-folder to hold your CSV input files (name it "csv" so you don't have to specify the name of the folder in the CLI parameters).

Then, you can open a command prompt, navigate to this folder and run the batch processor from this location.

Note: If you are not running the Batch Processor from its default location, you must specify the full path e.g. "C:\Program Files (x86)\Oracle\Policy Modeling\bin\determinations-batch.jar"

Batch Processor Output

When the Batch process is complete, a folder (called "csv.out") is automatically created. This folder used to be named "output" in earlier versions of OPA (I'm using version 10.4.4). This folder contains the same CSV files in the input folder but with the generated output values.

Let's view the content of these CSV files. First, the customer.csv:

Notice that the output field – out_cust_years-reg – has been filled out. This is just the number of years between the current date (January 08, 2014) and the dates the customer registered.

Let's also view the global.csv file, where the output should count the number of customers that are eligible for each plan.

Summary

In this article, we have seen how to use CSV as input to the Batch Processor. We have also seen how to ensure that our csv files are properly formatted so that zero-configuration can take place. There are move advanced topics like writing a configuration file to be used for running the batch process and also database connections but this gives a good overview of the Batch processor.

I hope you have found this article insightful.


This article originally appeared on Monad's Commentary on Oracle Policy Automation (OPA) blog on 10 January 2014. Republished with permission.  

Wednesday Jan 08, 2014

Building an Oracle Policy Automation Center of Excellence

Matthew Bickham | OPA Implementation Manager (Europe) & Center of Excellence Facilitator

Introduction

We all know Oracle Policy Automation (OPA) enables business experts to be able to create sophisticated rulebase applications directly without the need to have a background or qualification in software development. The diagram below provides an overview of the steps that are normally conducted to build an OPA rulebase:  

Business rule authors are critical to every project and to wrap them into a structure, I always encourage customers to establish a Center of Excellence (CoE) where talent, skills, processes and disciplines are centrally governed within a business. Whilst business experts may not initially have the skills to build software, the CoE approach provides everything needed to grow capability and confidence in authoring rules and systems that significantly outweighs any nervousness that may have existed at the outset. This is very important because initially not all organizations are ready to take the leap of faith needed for business experts to play a more development role. For those that do, there are significant rewards. Just some quotes from our CoEs:

“OPA is the most innovative technology on our estate”

“OPA has paid for itself 7 times over and that is just with our first project!”

“OPA is a game changer. We would never have been able to achieve what we have done using any other method or technology”

OPA Projects

Any project is often born through a business need to build a system to meet a brand-new requirement. In terms of OPA this will mean that a project will include a requirement for a system to automatically make a complex decision on behalf of the organization using rules and building a customer experience friendly interview that will include assessment screens, smooth screen-flow, data validation, look-ups (of known data) and documented outputs of the rulebase determinations that are made.

Projects are normally resourced to meet the needs of the project and formed based on the availability of key people, timelines to deliver and scope of the project work. Given these variables, a lot is left to chance and luck. Rulebase resources may require initial training but there is a tension to deliver in an agile way and this needs the team to be properly trained, experienced and ready to start creating rulebase components from day one. Forming a brand new project team for every project is very difficult given issues with availability of key experts. A much better approach is to build a Center of Excellence that maintains skills and grows capability so that with every new project the team grows in strength.

The Benefits

An OPA CoE addresses start-up issues because every project is safely delivered within a structure that already has the capability and skills to deliver a project from the beginning. It will contain a pool of resources at various skills levels. Senior members of the team will evolve through experience and lead areas of work including rules architecture, test management, project management and technical architecture. The CoE is special in that it is business centric but includes IT team members who must connect and manage the integration between OPA and other systems. This enables the business authors to remain focused on delivering projects using their skills to the full.

So why is an OPA Center of Excellence any different to any other CoE? The key difference is that the CoE is business focused with more Subject Matter Experts involved more directly with building and testing rulebase components than ever before. This is not only limited to rule authoring. Those involved in testing utilize tools within OPA itself (regression tester, what-if analysis, test coverage reporting etc) to verify rules directly, safely navigating rules and components at a read-only level. Powerful test suites are developed by business experts directly into a rulebase and each key outcome is tested against manually created expected outcomes. The business expert has responsibility for this work and has proven to significantly reduce the time to develop and test solutions, not leaving all the testing effort until the end. In addition, our customers report that defect-free systems are commonplace with OPA after initial implementation because the experts in that area of the business were more intimately involved in the authoring and testing process throughout. Due to OPA’s unique natural language capability, rules are easily read and understood by testers and other members of the team and this is one of the key factors in its success.

Becoming an OPA CoE

There is a process to becoming an OPA CoE. Oracle has assisted many organizations build their structure and capability which establishes a robust model for the successful delivery of projects that utilizes OPA in the future. To start, a Center of Excellence requires management and governance to control, direct and prioritize the work that is conducted. For most, this is led by a business manager with skills to manage resources across projects and business areas. Next, there is organization and structure to the Center of Excellence. For the resource teams, training and a qualification in OPA is achieved to an advanced level to ensure that the team members are fully skilled to successfully deliver projects with the product. A skills matrix is formed and a detailed record is kept of the skills attained as the experience of each member of the team grows. A CoE will also want to be known within the business and a communication plan is created to inform internal and external stakeholders about its purpose and vision. Other criteria exist to achieve recognition and includes adherence to best practices design standards, rule authoring guidelines and the control of rules within a configuration management system.

For all OPA CoEs there is now access to an exclusive online Oracle work-group that allows for greater sharing of knowledge, promotes decision of OPA related topics and provides valuable information about forthcoming events.

Summary

The OPA CoE approach has provided many OPA customers with a valuable structure and focus that has truly maximized the use of the technology and has built a strong team around it. ‘Growing your own’ OPA capability is part of the whole ethos behind the application and true value has been achieved when our customers have taken this best practice approach.  

Please get in touch if you would like to find out more.

Thursday Oct 10, 2013

Can OPA be used to improve draft legislation?

Fiona Guy | Product Manager Oracle Policy Automation

Last week I had the pleasure of presenting at the UK Cross Government Business Rules Group meeting on whether technology generally, and Oracle Policy Automation specifically, can help improve draft policy and legislation. I thought it might be worthwhile to share some of those thoughts here.

1. Improving the Structure and Accuracy of the Draft Itself

Logical and Structural Coherence

The process of transforming natural language text into OPA’s constrained rule format involves understanding the logical structure of the material you are working with, identifying the conclusions and conditions of each rule, and how each of these link to other sections of the policy material. In doing so, the process naturally highlights any logical and structural errors and ambiguities which may not be immediately apparent to the reader. From my experience, even well written policy and legislation usually contains a logical error or ambiguity that requires clarification from a policy expert every 2-5 pages.

In the early days of modeling rules, we started keeping a list of errors we found, and ended up with ~30 common legislative errors uncovered by modeling legislation in this format. For example, if a section mixes and/or logic, links to another section that no longer exists, or contains a loop between sections, OPA will immediately identify this on modeling, and in many cases insist that the error be corrected before continuing.

Many people don’t realize that the structure and principles behind modeling rules in OPA were developed in consultation with a senior legislative drafter to help avoid many of these logical errors. It was important to the development team, that by allowing the rules to be modeled in a natural language format (Microsoft Word and Excel), we did not also encourage the rule modeler to create rules that failed to deliver clear and correct outcomes. In other words, the design of OPA’s constrained rule format is specifically aimed at identifying and avoiding logical and structural errors or uncertainty.

Policy Effect

Once rules have been modeled in OPA, there are a few techniques for identifying whether the draft policy or legislation achieves the desired policy outcome.

The OPA Debugger allows you to run through a single scenario to see which questions are asked, and how the outcome is determined for a single user. I’ve found that simply running through an OPA interview quickly identifies information that is poorly worded, unreasonable to collect from the target audience, or is simply too onerous as a whole. An OPA interview is also useful to assess whether the policy calculates the desired outcome for any given scenario. The decision report is automatically generated to show the reasons for the decision, so errors can be directly traced back to the exact section of draft policy or legislation.

The Coverage tools (version 10.x) allow you to check that your test cases execute every rule in the policy model. This is particularly useful for checking that every section of your policy or legislation has substantive effect. For example, I’ve seen draft legislation which categorized claimants in order to apply one of several formulas for calculating compensation, but one of the categories was worded so broadly that another category would never be applied.

The What-If Analysis (version 10.x) and Excel Testing (cloud) features allow the policy modeler to create a series of test cases to see the effect of the rules on various scenarios. The data is entered into Excel, and the values automatically calculated by OPA appear in Excel column(s), allowing the tester to use Excel’s charting, highlighting and sorting capabilities to identify and analyze the effect of the policy on a range of scenarios, including highlighting unusual outcomes/payments.

2. Improvement Through Internal Consultation/Review

While these techniques can provide some insight into the quality of the draft itself, they are limited in their ability to assess the overall policy impact on the draft’s target audience. The announcement earlier this year of Oracle In-Memory Policy Analytics, signals a significant leap in capability. The key difference here is twofold:

1 - The analysis applies to real-world data, so you can see the actual effect and budget outcomes of the draft policy. For example, you could identify that changes to a disability care scheme would cost the government an additional $1.1 million but disproportionally impact families in a particular region.

2 – The dashboard interface allows people unfamiliar with OPA to analyze and tweak the policy to compare policy options without changing the rules. Policy experts, management, committees etc within an organization could use the dashboard interface to produce charts comparing policy options using real data and real legislative rules, without installing or modeling in OPA themselves.

The experts within your own organization are often the key brains that identify when the policy is likely to go awry. I’ve demoed a prototype to a few organizations and the feedback I’ve received is that it has great potential to improve both the quality of review and speed of the internal review process itself.

3. Improvement Through Public Consultation

Numerous studies have looked at whether public consultation can contribute to the quality of draft legislation in a meaningful way. Some countries (eg Canada, UK, US, Australia and New Zealand) have actively involved citizen participation in reviewing draft policy and legislation, with varying success. With OPA, governments now have the option to quickly and accurately expose the legislation as an interactive questionnaire, allowing citizens or targeted interest groups to assess their own scenarios against the draft legislation and leave their comments on the outcome and experience. The average citizen may not have the time or inclination to read though dense legislation to determine how the changes will affect their circumstances, but I believe many would have the curiosity to answer a few questions to see how they are likely to be affected by a legislative change. An OPA interview can therefore serve to inform as well as elicit public feedback on the draft policy itself.

Final Thoughts

So can OPA help improve draft legislation? Absolutely. It’s not going to tell you that your draft is a masterpiece or award you a gold star for effort, it’s not even going to look for every error you could possibly introduce, but it is another tool in your armory for improving the policy and laws that govern determinations, and therefore to ultimately improve your overall customer experience.

Fiona Guy is an expert in advanced Oracle Policy Automation rule design and implementation topics. She has been working with the OPA product line for over 10 years, as a lead consultant and now a product manager in the OPA development team. She is also a non-practising lawyer and lectures in Legislative Drafting and Technology at the Australian National University.

Wednesday Sep 25, 2013

Welcome to the Oracle Policy Automation Blog

Welcome to the OPA blog where we aim to give you a range of perspectives on everything OPA. If you have any topics you would like to see addressed, please leave a comment here or post them to the OPA Community Forum

Happy reading! 


About

Welcome to the OPA blog where Oracle's Policy Automation experts share their views on everything OPA.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today