Tag: Levels

OPA Word Rules – Level Up!

OPA Word Rules  – Level Up!

As the summer lethargy begins to bite (at least if you are in the Northern Hemisphere) I find my colleagues are missing from their desk – vacations long planned are finally here! It is with this in mind that today I am sharing a lighthearted post about Word rule levels. But there is a nice payoff in the end of the post, which some of you will might already know but it might be useful for some, occasionally.

Let’s look at the following document snippet and ask ourselves a question (this screenshot comes from the RetailDiscounts example project).

OPA Word Rules - Level Up!

The picture above shows a fairly typical nested level structure, which improves clarity and helps both the rule author and the rule validator / subject matter expert because it makes the goal and conditions clear. And we can see in this case, there are 2 levels used (level one is yellow, level two is salmon pink).

How low can you go?

The question is, how many levels can you have? Note, that this question is not “how many levels should you have?” which is altogether more nuanced and more in the domain of best practices – and if you are in doubt about that, I strongly suggest you read Jasmine’s famous PDF here.

So, how many can you have? Well, let’s look a the Word Ribbon  – there is a drop-down to help us:

OPA Word Rules - Level Up!

So that’s the answer, right? Five levels, each with their own color.  Or is it?

It’s not Summer, it’s Easter! OPA Word Rules – Level Up!

Some might qualify this as an Easter Egg in computer geek-vocabulary. It’s an unexpected feature – but there are actually SIX levels. Not five.

Take a look at the following screenshot, notice the styles have been displayed for clarity.

OPA Word Rules - Level Up!

In the (albeit very infrequent) case of needing a sixth level, you can access it by pressing the Increase Indent button on the toolbar, while the cursor is on the fifth level (or you can press F12 on your keyboard).

Have a nice day!

Back to Basics 4 – Levels in Oracle Policy Modeler

 Back to Basics 4 – Levels in Oracle Policy Modeler

One of the things that students struggle with in the Oracle Policy Automation Essentials class which was offered by Oracle University for OPA version 10, but never upgraded to version 12 (something which I struggle to understand, and I will freely admit so do the customers I meet, to the point where I am obliged to deliver version 12 Essentials using custom environments and complicated workarounds from an administrative perspective) is the concept of Levels in Oracle Policy Modeler in writing rules.

Perhaps the term “levels” is the problem. Anyway, here we go

Basic Idea #4 – Rules written in Word can express logic in a hierarchical fashion, for example

Levels in Oracle Policy Modeler

If it helps get a grip on this hierarchical layout, consider the following alternative :

Levels in Oracle Policy Modeler Alternative

In both cases the structure of the rule is hierarchical, in the second case each subordinate conclusion is presented separately. In the first instance they are all included in the first premise, as nested levels. Notice the “OR” in the first example, and how it is yellow in color, because it relates to the comparison between the two yellow components – more correctly, it compares two level one conditions, which themselves have level two conditions. It is a common issue for beginners to misplace the “OR” or to color it with the wrong level of nesting.

There are upsides and downsides to both approaches, and there are plenty of other criteria (mapping to source documentation, readability, ease of location and display in interviews to name just a few) that may drive how you write these nested structures. But as a new starter, considering that Levels in Oracle Policy Modeler show the proof needed to prove the higher level, can provide an easy to remember way to correctly nest your Word text in your Rule Projects in Oracle Policy Modeler.

Have a nice day.

Worldwide
Logo by Southpaw Projects LLC