Tag: Boolean

Boolean Values – Getting Started with Oracle Policy Modeling

Boolean Values – Getting Started with Oracle Policy Modeling

Working with new starters to the wonderful world of Oracle Policy Modeling, I often come across interviews that have lots of Boolean attributes. Of course, deciding whether you need a Boolean or something else instead is part of the challenge for new learners : lots of “simple” ideas using Booleans turn into something more complicated and interesting later on.

The main challenges I want to focus on today are those related to the display of the Boolean attribute in the Interview : how to make it more appealing, useful and above all more efficient for the user. Let’s look at some interesting stuff :

Default Values in Oracle Policy Modeling

The simplest and often the most efficient approach is to ensure that the Boolean attributes have appropriate default values : both static and dynamic can be useful. The new input controls from the November 2016 version give us more flexibility (and less messing with CSS) to make things easier to use / view. Below for example is a Switch control, and a defaulted value.

Remember however that these are default values for the interview control, not for the attribute. As some of my colleagues this week found out, this can lead to a bit of a mix-up in trying to create dynamic display of values. Let’s investigate.

Oracle Policy Modeling - Switch Boolean and DefaultGetting Mixed Up with Boolean display

In the image above you can see the checkbox has been checked. This is because we added a default value to the control.

Oracle Policy Modeling - Setting Default

Earlier in this article I mentioned that the default value was (as you can see above) for the input control, not for the attribute. You can see this has a side-effect : when you try and set a second Boolean attribute to use the first one as a Dynamic Default, the perhaps expected behavior is not present. The second Boolean attribute does not register the value.

For example, in the following case, the image “200 Euros” is actually a Boolean Image Control. The colleague in question had changed the type of the Boolean input control to Image. The “clicked” and “unclicked” images had been added to the input as follows:

Oracle Policy Modeling - Images

The default value for the input control had been set as follows:

The Dynamic Default is based on a Boolean attribute which is true, if the customer has spent a value greater than 200 Euros. But the image will not be shown as checked, since the attribute underlying the image does not have a default value – the default value is on the input control. So the effect does not work. The attribute that should have made it work, does not have the value needed:

Oracle Policy Modeling - Boolean Not Dynamic

I have been seeing this quite a lot recently, perhaps because people have been experimenting with the Image control and the new exciting configuration options in November 2016 release. But the approach is not going to work, and the better, simpler (and working) approach is as follows:

  1. Add three images to your Screen. One blank, One for the “TRUE” and One for the “FALSE”. You might want  a third one to use in cases of uncertainty to ensure that the layout of the page does not shift too much when the “true” or “false” images are displayed.
  2. Set the display logic to use the value of the Boolean so that the blank is displayed when the value is uncertain, the “TRUE” image is displayed when the attribute is true and so on.

The Interview Screen looks something like this during the preparation. The first three bullets are three images. The final is an example of setting the display behavior.

Oracle Policy Modeling - Final Boolean Image Display

Now the overall effect is what you would expect : changing the value of the threshold (here, 201) to a value where the Boolean is true, triggers the display of the image in Oracle Policy Modeling debug.


I hope this clears up some things for some of my colleagues this week.

Back to Basics 3 – Writing a boolean in Oracle Policy Modeler

Back to Basics 3 – Writing a boolean in Oracle Policy Modeler

Back to Basics 3 – Writing a boolean in Oracle Policy Modeler

Many times whilst delivering workshops or the official Oracle University training courses on Oracle Policy Automation, the group in front of me is a wide mix of skills and backgrounds. Those who come from the business side tend to, for obvious reasons, not have had large amounts of exposure to writing with constrained natural language or indeed for that matter maybe they have never actually written rules themselves. Instead they have been delivering detailed explanations, specifications and so on and then testing them for pertinence.

With Oracle Policy Automation, or Oracle Policy Modeler to be precise, some of these team members are now actually writing the rules. Maybe not all of them, maybe not completely, but the blended team has gotten a lot closer. One of the things that comes up regularly in the early part of their learning curve, and thus a good candidate for the Back to Basics posts – is how to write and not write Boolean statements in Oracle Policy Modeler.

Basic Idea #3 Boolean statements need a verb

Yes they do, and without a verb you are pretty much assured that Oracle Policy Modeler will validate the rule but will not interpret it in the way you had hoped. Consider the following example rule. I have clicked the (bizarrely named in my humble opinion) Go To button on the Ribbon to display the details. Notice I am about to click on the Edit Attribute… button.


The Edit Attribute dialog will show me the Attribute is a Boolean. Fine I hear you say, so what. I could write it like this instead. Look, it has even underlined it like it does with the other stuff – it must be working, right?


It depends what you mean by working of course :). Let’s take it step by step.

  1. For a Boolean to be acceptable to Oracle Policy Modeler, it must be negatable. Or, it must be written in the negative, and be able to be expressed in the positive also.  For example, the following is a perfectly acceptable Boolean conclusion, being just the negative version of the initial conclusion I showed you a minute ago.

2. For a Boolean to be acceptable to Oracle Policy Modeler, it must use a verb that is in the list of verbs.

3. When you open the Edit Attribute dialog in Oracle Policy Modeler for a Boolean attribute, you should see four different phrases in total that will look like the following


They are, the positive, the interrogative, the negative and the uncertain. These are the states that your Boolean can have. If you look at an attribute and you see this instead:

Then you are not looking at a Boolean. In this case you can see the interrogative, the assertion, the uncertain and the unknown. Of course the little icon saying “Text” also shows you something is amiss.

It is absolutely critical to get in the habit of checking your attributes before you launch Word. Picking up issues early will save heartache later.

Logo by Southpaw Projects LLC