Category: The OPA Hub Website

Intelligent Advisor – COVID19 – Can We Help Job Seekers?

Intelligent Advisor – COVID19 – Can We Help Job Seekers?

The world is in a very different place to where it was only 5 months ago. Here at the OPA Hub we are very aware that some our community might be in difficulty right now – some jobs have ended, projects have changed objectives and people find themselves suddenly without a role or with a drastically reduced work scope. Combine this with the difficulty of working from home, worrying about family members and it’s a very tough time, especially for Job Seekers.

So, if anyone is currently looking for a new job / or a new project, what we would like to propose is this:

  1. Leave your name in the Comments. as a registered user we have already your LinkedIn Profile URL so you don’t need to post it
  2. In 7 days we will blast our newsletter with your name and LinkedIn details asking the community to endorse, recommend (if they know you) or follow and promote your profile.
  3. We will promote these on LinkedIn as well as Twitter and elsewhere.

Remember to make sure you include the following, at a minimum:

  1. Your location, and where you can work
  2. Your level and experience and specific skills
  3. Your availability (immediate, 1 month or whatever)

We cannot promise anything but every little helps. We recently started offering this service on the sister website siebelhub.com so it seems a natural progression to do it here as well. If you have any other ideas about how we can help Job Seekers in this difficult time then please feel free to comment as well – we’re open to any ideas that can help.

Likewise if you or someone you know works in Siebel CRM and is in the same situation then please tell them to visit the post on the Siebel Hub here.

The OPA Hub Website

Job Seekers
Job Seekers

The Consultant’s Guide to Oracle Intelligent Advisor

Well, it has taken a bit longer than originally intended (the current lockdown kind of slowed things down) but I’m happy to say that the new book is available for preorder now. It’s been retitled and significantly reworked, in the new book we have thirty four chapters and lots of examples in Zip Archives to play with. We’ve really tried to create the Consultant’s Guide to Oracle Intelligent Advisor.

It has been reviewed and many chapters rewritten to be bang up-to-date for Intelligent Advisor latest release 20B. Of course it covers all the things a new starter needs to know, and should be a useful reference to anyone working with Intelligent Advisor. We even fixed all the URLs to match the new standards of Oracle documentation (as I am sure you have noticed, Intelligent Advisor is now in the URLs).

This kind of book of course can only be possible when so many people help out – the Oracle team have been absolutely fantastic, as always, and provided lots of ideas and help. And the readers of this website have also provided so many things for the book, the community really stepped up.

In the next 10 days or so, we will also be releasing the complete set of videos (there are about another fifteen or so to finish in the studio) and they will be available as a package with the book. I’ll let you know as soon as that is done.

For the time being however, you can read all about the Consultant’s Guide to Oracle Intelligent Advisor over on P8 Tech (the Publisher’s Website). The book will be the OPA Hub Shop as well.

And the Training Survey Prize Draw Winner Is…

And the Training Survey Prize Draw Winner Is…

So, the results of our Training Survey Snap Poll have been collated, and we are ready to announce the winner in just a moment. First, let’s get the results off our chests and see what the community thinks about Oracle Intelligent Advisor (see what we did there?) and Training Requirements. So the OPA Hub Training & Documentation Survey started with the following question:

Q1: Which of the following training products would you consider the most suitable training format for OPA?

 

Training Survey 1

Interested in the Training Survey data breakdown? OPA Hub Website supporters can download the PDF here. You can get a quick glimpse of the latest results on this public dashboard.

The two “in class” options beat the other answers hands-down. Consultants and users, in contrast (often) to their employers, still regard in class training as the premium format. Then comes interactive online training, finally we have recorded / non-interactive online training. Managers, Training Departments, take note! We’ve been in the training business for 30 years, and the answers were the same 30 years ago (albeit with CD-ROM or computer based training instead of on-line). At some point, the value for money equation became focused on the cost rather than the benefit. And it all went wrong from there :).

Training Survey Q2: Which of the following have you personally used most recently in relation to Policy Automation?

 

Training Survey 2

And so we come to the reality on the ground. If question one represented what you wanted, this is what you got! Very low numbers for in class training, and much higher for online. The Other option revealed that a fair number of you don’t even get that option, instead you have to read the documentation, forums, websites like this one, or just asking colleagues. What does that say about the availability and cost of training in your area, or the unwillingness of employers to pay for training? Some might blame the Salesforce Effect “Trailhead means I don’t have to buy any training for my staff ever again”. Yeah, right.

Training Survey Q6: In which region are you based?

S0 does Oracle Policy Automation only exist in your area?

Training Survey 4

These are only 3 of the Training Survey questions – we don’t want to bore you with all this unless you are interested in the full data breakdown? OPA Hub Website supporters can download the data here. You can get a quick glimpse of the latest results on this public dashboard.

So who the heck is the winner?

The OPA Hub Website is pleased to announce three winners (yes, we came over all “Holiday Season”).

Mr O.Rodrigues (France)

Mr Manohar Veeraiah (India)

Miss A.Fisher (Australia)

The winners should leave their details in a message using the Contact Form of this website.

A New Job?

A New Job?

I’m always surprised by the buoyancy of the Oracle Policy Automation job market. The product has come on leaps and bounds in terms of market penetration and acceptance, and Oracle Policy Automation skills are very much in demand. Most of the jobs listed below are in the United States of America, but I also know that the markets in Canada, Europe and Asia-Pacific are all very positive.

Multiples Jobs?

I do know that whenever a job is posted, there are about 4 different versions that are immediately posted afterwards, with each one being posted by a different recruitment agency, so you need to select the best one – or sometimes work out who the customer really is and contact them directly (I probably shouldn’t say that given the number of agencies that post here).

A Mystery Job

What surprises me (and no doubt, many of you) is that Oracle Policy Automation is often mentioned in the same phrase as “Oracle Fusion Middleware Developer”, or “Oracle Java Programmer”. It’s clear that there is still a large degree of confusion as to what Oracle Policy Automation is, and what it does. So it is our job, so to speak, to evangelize and communicate what Oracle Policy Automation actually is.

Tell us about your Job

With that in mind, we’re happy to hear from anyone who has a good story to tell about how they have used Oracle Policy Automation in their company or organization. As always, there will be a prize or two for the best story. Screenshots, Videos, interviews – they are all welcome and we hope that they will help the wider world understand what we do, and what we do it with!







Don’t hesitate to look at the complete list of jobs on the OPA Hub Website, which you can find at the usual web address. Or visit our job source website.

Have a nice day!

We’ve Updated our Free Challenge

We’ve Updated our Free Challenge

When you register for the OPA Hub Website, you land on a Thank You page. That page includes a Free Challenge , where you can win an OPA Hub T-Shirt just for answering a simple one question quiz.

Free Challenge QuizSo many people have answered the free challenge quiz but nobody has given the correct answer yet. We have now added a new Section “Hints to Help You“.

We have added various remarks culled from previous answers. So we are helping you get closer to the answer. We hope that the new hints help eliminate some of the common answers and save you time.

Enter As Many Times as You Want

The winner will get a free OPA Hub T-Shirt in the size of their choice. It’s free to enter, you can enter multiple times and we will keep the Challenge open until somebody wins.

Yes : You can enter the  Challenge as many times as you want, there are no limits.

So what have you got to lose? Nothing, so get over there and try your luck – can you crack the Challenge? Do you have an idea for another Challenge – get in touch, leave a comment or reach out on LinkedIn. We’re always happy to hear from our readers.

Good luck and see you soon on the OPA Hub Website!

Guest Post : Time Based Reasoning Worked Example

Guest Post : Time Based Reasoning Worked Example

It’s with great pleasure that I introduce you to Evert Fernandes, CTO at Magia Consulting UK Ltd. A self-confessed OPA geek, Evert has stepped up and written this article about Time Based Reasoning (and hopefully some more ) for the OPA Hub Website. Thank you Evert and…over to you!

Time Based Reasoning (TBR) – also known as Temporal Reasoning – is one of those subjects that new OPA developers tend to struggle with. It’s a more advanced subject that – once mastered – can provide huge benefits to your project.

In this article I will try to explain what TBR is, present a use case and provide a walk-through on turning the use case into rules.

So, what exactly is Time Based Reasoning?

Time Based Reasoning allows the rule developer to create rules that include attributes which contain values that are subject to change over time.

It is able to conclude rules like:

  • What’s the amount of daily benefit the citizen was entitled to on June 26th, 2017?

Time Based Reasoning Worked Example

Let’s have a look at the following use case:

“How much benefit is the citizen entitled to between 01-01-2017 and 31-12-2017 (inclusive)”

The following rules apply:

  • If the person is not married, the daily allowance is $10. If the person is married the allowance is $14
  • The person can only claim benefit if the daily income is less than $200.

For the sake of simplicity, we will only look at a binary relationship status, married and single. The real world is more nuanced and complicated, but feel free to expand on this example. 😉

As you can see, the mix of variables already creates quite a complex and fluid situation, especially considering that any of the variables are subject to change over the period in question (01/01/2017 – 31-12-2017).

So, let’s start by looking at the first element and create some rules:

OPA 12 - Time Based Reasoning Worked Example 1

There are a number of things happening in these rules, let’s take a closer look.

First of all, a rule table has been created (ALT + Z) to determine the daily allowance amount based on marriage status, $14 when married and $10 when single. The single status is implied by the ‘otherwise’ conclusion, i.e. the person is single because the person is not married.

The second rule calculates the total allowance over the time period, starting on January 1st 2017 and ending on January 1st 2018. The reason the end date is January 1st 2018 and not December 31st 2017 is because the end date is not included, so we simply add a day.

The function is called IntervalDailySum and takes in three parameters:

  • The start date (inclusive) of the period over which the calculation needs to take place;
  • the end date (exclusive) of the period over which the calculation needs to take place;
  • the rule text of the attribute over which the total daily allowance over the period needs to be calculated.

In this example, we provide hard coded values for the start and end dates. In the real world, the start and end dates will most likely come from date attributes.

We now need to test the rules. In order to do this, we start the OPM debugger and head to the data tab:

OPA 12 - Time Based Reasoning Worked Example

As you can see, not a lot is happening here. Let’s give the citizen a marital status by setting the value of ‘The citizen is married’ to ‘True’.

OPA 12 - Time Based Reasoning Worked Example

So far, so good. We have a marital status and OPA is able to work out the total allowance (365 days x $14 = $5110).

Let’s now assume that the person was single at the start of 2017, got married on March 1st 2017 and was single again on September 1st 2017 (don’t worry, they’re still friends! 😉).

How do we enter that data? OPA provides a handy feature called ‘Change Points’ to handle this.

Let’s reset the value for the citizen marital status:

OPA 12 - Time Based Reasoning Worked Example

Click on ‘Change Points’:

OPA 12 - Time Based Reasoning Worked Example

What this allows us to do is to take the attribute and set different values for different slices of time.

You can use ‘Add’ to add a new change point. Once a new point is created, you can set the date and value at that point in time.

Let’s add two change points. One on March 1st 2017 with a value of True and the other on September 1st 2017 with a value of False. Use the Date picker below the change point list to pick the dates.

OPA 12 - Time Based Reasoning Worked Example

The eagle eyed among you may have spotted that I’ve set the value at the top to ‘False’.

What this is saying is:

  • Until March 1st 2017, the value is False.
  • Between March 1st 2017 (inclusive and August 31st 2017 (inclusive), the value is ‘True’.
  • From September 1st 2017 and after, the value is ‘False’.

So, click ‘OK’ and let’s inspect the effect of our handiwork in the debugger:

OPA 12 - Time Based Reasoning Worked Example

There’s a lot more information here and one of the first things you’ll notice is that the total allowance has changed from $5110 to $4386.

If we break down the individual periods, you will see why:

  • January 1st – February 28th = 59 days x $10 (Single rate) = $590.
  • March 1st – August 31st = 184 days x $14 (Married rate) = $2576.
  • September 1st – December 31st = 122 days x $10 = $1220.

$590 + $2576 + $1220 = $4386!

Have a play with different dates and change points and you will find OPA is very good at working this stuff out for you.

OPA also offers a way to visualize this data. Right click the ‘the daily allowance for the citizen’ attribute and select ‘Show in Temporal Visualization’:

OPA 12 - Time Based Reasoning Worked Example

A new tab will appear top left named ‘Temporal Visualization’. If you click it, you will see:

OPA 12 - Time Based Reasoning Worked Example

This visualization confirms that we start off with $10/day, changing to $14/day from March 1st and changing back to $10/day on September 1st.

Time to complicate things a little by adding another variable to the mix in the shape of the daily income.

Let’s assume that the citizen started 2017 with a daily income of $150. Then later in the year the income rose to $250 and later yet, the income dropped to $180.

In order to deal with this new variable, we will change the rule that calculates the daily allowance to include the daily income for the citizen:

OPA 12 - Time Based Reasoning Worked Example

Remember that OPA will evaluate top down, so first it will check to see if the person is married and whether the daily income is less than $200. If this is false, it will check to see if the income is less than $200 and finally, if the citizen is not married and the daily income is greater or equal to $200, the ‘otherwise’ clause will apply.

Make sure the updated rule validates by pressing the ‘Validate’ button.

Now let’s start a debug session and have a look at the outcomes.

Start your debug session and navigate to the ‘data’ tab.

Supply the exact same values as the first example, making sure to set up the change points correctly.

Fun fact: Chances are that OPA still has your previous values in memory, saving you the need to re-enter them!

Check to see that you’re still getting the correct values.

You should see something like this:

OPA 12 - Time Based Reasoning Worked Example

Let’s set the value and change points for the daily income:

OPA 12 - Time Based Reasoning Worked Example

Click ‘OK’ and inspect the values in the data screen:

OPA 12 - Time Based Reasoning Worked Example

As you can see, the total allowance has now been set to $1926 (down from $4386).

We can have a look at what’s been happening in the Temporal Visualization tab.

Make sure the following attributes are shown by going to the debug data tab and right-clicking and selecting ‘Show in Temporal Visualization‘:

  • the daily income for the citizen
  • the citizen is married
  • the daily allowance for the citizen

Go to the ‘Temporal Visualization’ tab. You should see something like this:

OPA 12 - Time Based Reasoning Worked ExampleOPA 12 - Time Based Reasoning Worked Example

As you can see, there’s quite a bit going on here and the daily allowance for the citizen will vary based on marital status and income.

What you will hopefully be able to see is that, when it comes to dealing with changing circumstances, things can get quite complicated quite quickly. In the example we only dealt with two variables but throw in more variables and working out the right amounts would become very complex! Utilizing the out-of-the-box OPA temporal reasoning functionality allows you to manage the complexity of dealing with changing circumstances over time.

More information on Temporal Reasoning can be found in the OPA documentation:

https://documentation.custhelp.com/euf/assets/devdocs/cloud18c/PolicyAutomation/en/Default.htm#Guides/Policy_Modeling_User_Guide/Temporal_reasoning/Temporal_reasoning.htm

or in the Function Reference:

https://documentation.custhelp.com/euf/assets/devdocs/cloud18c/PolicyAutomation/en/Default.htm#Guides/Policy_Modeling_User_Guide/Work_with_rules/Function_references/FunctionReference.en-US.html

Finally for those who were wondering, the daily amount that the user is entitled to on June 26th is…

OPA 12 - Temporal Reasoning Worked Example

OPA 12 - Temporal Reasoning Worked Examplewhich is $14!

Thanks to Evert for his time and excellent article abut Time Based Reasoning. Readers who what to look at more Time Based Reasoning articles can search here.

Until the next time. If you want to write for the OPA Hub Website, reach out via our Contact Page.

Article Survey : The OPA Hub Website

Article Survey : The OPA Hub Website

Article Survey : The OPA Hub Website

OPA Hub Logo for Article Survey 2018Here at the OPA Hub Website, we want to provide articles that are of benefit to our readers. As such we would like to better understand what articles are of most interest. Although we have data from analytics providers like Google Analytics and Facebook to name only two, it is always in our opinion simpler and more effective to ask questions directly to our audience. So this is the justification for asking you to spend just a few moments filling out our Article Survey.

If there are items that are not visible in the list proposed, we would encourage you to add comments at the bottom of the Article Survey using the Comment feature, as normal.

Coming Up : New Content

Whilst on the subject of what you would like to see in the future we can already reveal what is coming up in the next quarter, aside from the usual content:

  1. A report from any Oracle Policy Automation sessions in Oracle OpenWorld 2018
  2. A series about the mysterious RuleScript
  3. A look at another Example Project : the Travel Compensation Project and how it works
  4. Getting Started with Oracle Policy Automation Book Edition 4 : in the works already

Coming Up : Training Available

We will be looking to run another session of our Workshop in the final quarter of the year. So while you are doing the Article Survey, feel free to comment / add information about a location or team that needs a training event (anywhere in the World). The standard content is shown here.

Article Survey : Q4 2018

So without further ado, here is the survey. Thank you very much for taking the time to participate in the survey. All the results will simply be used to better orient our writing and creative energy, and we will not contact you unless you specifically request it in the comments.

Oracle Policy Automation and Siebel

Oracle Policy Automation and Siebel

My co-writers over on the Siebel Hub participated in a recent successful online event with OnTheMove Software, who provide mobility solutions for Siebel and other CRM systems. They are good friends of the Siebel and OPA Hub Websites, and it was a pleasure to take part in their popular event. You may recall last year’s event.

Although the subject of the day was very much Siebel, The OPA Hub Website was able to deliver a presentation about the ability of Oracle Policy Automation to “fill some gaps” left by Siebel. To be more specific, Siebel 2018 has recently been released and is a fantastic, elastic modern application with a fully Cloud-aware architecture. All the old legacy artefacts (files like the compiled SRF, web templates and so on) have been removed and the proprietary elements of the architecture replaced with more modern, open-source, cloud-friendly elements.

But the development tools are, at the moment, not keeping pace with this move to the Cloud. And as the Cloud is perceived as more accessible, more friendly (more fun!), the users and developers in the Cloud have a hard time keeping up with the need to provide modern platforms for developing, deploying and using the CRM.

That’s where Oracle Policy Automation steps in. With it’s incredibly easy, business-friendly natural language approach to putting business policy online and available to any application, with it’s drag and drop no-code user interface, with it’s built-in BI Publisher, with it’s agnostic approach to data model integration – Oracle Policy Automation is the solution. When I meet Siebel customers shaking their head at their thousands of lines of eScript code, when I see them wondering how to accelerate these aspects of development, make them more accessible and more efficient all at the same time, I just want to shout out “Oracle Policy Automation”.

Unusually for me, this presentation also manages to squeeze in three quotes from William Shakespeare. So if you are interested in how Oracle Policy Automation can help accelerate your Siebel CRM deployments, just watch this video.

Thanks as always to David at OnTheMove for his impeccable organisational skills.

video

The OPA Hub Snap Poll Results

The OPA Hub Snap Poll Results

As you know, the OPA Hub Website runs short-term polls or “Snap Polls” in an effort to collect and share information about Oracle Policy Automation that may hopefully be of value to the Community. The OPA Hub Snap Poll Results concern the question we asked in March 2018, specifically “Are you going to be using the new JavaScript Extension in your OPA Interviews?”.

The most recent versions of Oracle Policy Automation have pretty much consolidated JavaScript as the client-side platform for delivering just about any visual changes you might wish for. Many of us are also pretty hopeful that the JavaScript library in interviews.js is a forerunner of a future REST client, and hopefully the basis for some sophisticated integrations as well.

Of course there are other avenues of development of Oracle Policy Automation, notably the experimental RuleScript, based on the output of the Oracle Labs and the graal library. Anyway, The OPA Hub Snap Poll Results were quite definitely in favour of the JavaScript extensions. You can find the results below, and I have included a link to a dynamic version of the graphic hosted by our friends at easel.ly.

 New OPA Snap Poll

As the Snap Poll on the subject of JavaScript has now closed, a new Snap Poll has been opened, this time in an effort to get more information about the needs of the Community in respect of training and advanced workshops. Please take a moment to answer the OPA Hub Snap Poll on this subject.

You’ve got to be in it, to win it

A reminder : when we close this Snap Poll, one lucky voter will get a free copy of Getting Started with Oracle Policy Automation 2018 Edition, so don’t hesitate to vote today. The Snap Poll will close on the 31st April 2018, and results will be published on this website soon afterwards.

 

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation #2

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation #2

In a previous post by our guest writer Dr Jason Sender, he investigated improvements in Oracle Policy Automation rules by applying some of the principles of refactoring, and then he began to discuss Object-Oriented Design Patterns and Oracle Policy Automation, and their application in real-world contexts.

As before, this third article draws on the work and publications of Martin Fowler, which we discussed in the previous post, those of Joshua Kerievsky from his highly regarded book “Refactoring to Patterns”, and the ground-breaking work on design patterns called “Design Patterns: Elements of Reusable Object-Oriented Software”, which had four authors known collectively as the Gang of Four (GoF).

Before studying some further examples of patterns and their application to Oracle Policy Automation, it is probably wise to step back and take a broad view of the context. Computer science is often defined as dealing in abstraction, and software engineering as managing complexity, and the connection is that only by considering different parts of programs and systems as abstract concepts are we better able to manage complexity.

Design Patterns and Oracle Policy Automation in Context

To put it in terms more related to our daily jobs, Oracle Policy Automation is often integrated with other systems that the Oracle Policy Automation developer does not need to understand, and can think of in abstract terms. A good example would be the Siebel CRM or Oracle Service Cloud database that Oracle Policy Automation may interact with, but about which the Oracle Policy Automation developer may not need to know anything – beyond understanding the available attributes for mapping and having a brief overview of the context. Abstraction is about ignoring irrelevant details, and this is often accomplished by what is a theme running through many design patterns, which is to: “encapsulate the concept that varies” (GoF, p. 54).

We often obtain abstraction in Oracle Policy Automation by using indirection (interposing an intermediate attribute) to encapsulate the attribute that varies. This allows us to “Program to an interface, not an implementation“, as the GoF (p. 18) term it, the rationale for which is that the implementation can be changed if other parts of the program only depend on the interface.

If you come, like some of us here on the OPA Hub Website, from a CRM background, you will be familiar with the concept whereby access to a CRM Object is provided through an interface, and the interface does not change even if the Object undergoes modifications (such as when using the GetMetadata Operation of the Oracle Policy Automation Connector Framework).

Although design patterns and refactoring techniques should serve the goals of reduced duplication, reduced complexity, and increased clarity, these goals can be in conflict, not just with each other, but with certain Oracle Policy Automation-specific goals. Take for example one of the stand-out benefits of Oracle Policy Automation: Policy Isomorphism. This means having the same form (i.e., you can copy and paste legislation or other source material directly into Microsoft Word, and base your rules on this and compare them side-by-side) and this is in tension with the concept of intermediate attributes (adding more attributes to increase clarity).

Design Patterns and Oracle Policy Automation : Strategy and Template Patterns

With that in mind we return to another example of how Object-Oriented Design patterns can be applied to Oracle Policy Automation. The following extended example will be given to demonstrate how useful the Strategy and Template Method design patterns (which we adapt from the GoF book) could be in reducing the number of tables and increasing the flexibility of calculations. We show this extended example to demonstrate the size of the reduction in rules from applying these design patterns to Oracle Policy Automation. We start with an information collection screen and associated Boolean rules to derive values from the drop down list items:

Example Model and Interview

We then look at the top level goals for determining the total profit of the company, which is our main goal:

Design Patterns and Oracle Policy Automation

These are then derived from three very similar tables of calculations, which are listed in succession below:

Table of Conclusions

Object-Oriented Design Patterns and Oracle Policy Automation 4

Object-Oriented Design Patterns and Oracle Policy Automation 5

Design Patterns with OPA : Implementing the Design Pattern

We can now alter this to implement our design pattern. We first create a main rule to determine the total profit:

Object-Oriented Design Patterns and Oracle Policy Automation 6

This is the Template Method pattern since it delegates a part of the algorithm – the tax factor, a newly created attribute. Then, we employ the Strategy pattern to effectively split up the tax factor into one of three algorithms (in effect, we are treating the tax factor as an algorithm and then applying Strategy to it). We do this by parameterising, based on type of company, using a feature called Apply Sheet that avoids multiply proven attributes by letting the parameter determine which Excel Worksheet applies:

Object-Oriented Design Patterns and Oracle Policy Automation 7

Then each of the subsequent tabs has a small table. As an example, here is the mining sheet. The others have identical structure and adjusted values for the tax factor.

Object-Oriented Design Patterns Example

For the Strategy and Template Method patterns, applying these design patterns has transformed our example rulebase into something much more easily extensible.

Improved Maintenance and Clarity

If we were to create another sector (e.g., oil), it would be very easy to add on another sheet in the Excel Workbook and add it to the Apply Sheet. In fact, we could easily add another 20 sectors, whereas there would be a lot of time-consuming ‘find and replace’ work to do in the original, and we would have ended up with dozens of pages of rules. Moreover, the original algorithm had a lot of code duplication, as the same Boolean attributes were repeated in row after row in table after table.

Furthermore, if we had needed to add or remove conditions from the tables it would have taken extensive work in order to verify that each and every table was updated correctly. In the reformed algorithm, the conditions were written only once and these are easily changeable. And, we were able to eliminate three (possibly confusing) and unnecessary sub-totals relating to each of the company types. The unvarying part of the algorithm (the total revenue – the total cost) is now written once, rather than 15 times, and so it is easily changeable.

Finally, our new algorithm mentions only the tax factor. This means that if all tax rates were harmonised, a single tax rate declared, or a new formula implemented that did not depend on the company type, since we have encapsulated the part of the algorithm that varies, we could just delete the Excel table and introduce a new table for the tax factor that did not mention the type of company. This would not have been so easy to do with the original algorithm.

Once again, even from a very simple set of examples, it should be clear that Oracle Policy Automation rules will benefit from the targeted application of principles from programming – in this case, the Strategy and Template Method design patterns. For more information about the ideas discussed in this article, Dr Sender can be reached using his LinkedIn profile, at the end of this article.

Design Patterns and Oracle Policy Automation : Going Further

The OPA Hub and Dr Sender are currently working towards the launch of advanced training based on his work. If you are interested, please take a moment to answer the 1 question survey below (if you have not already registered for the OPA Hub you can do that here before you answer). Thank you!

What kind of advanced OPA training would you be interested in attending?

Worldwide
Logo by Southpaw Projects LLC