Tag: Default Value

Whats New in Oracle Policy Automation November 2017 #2

Whats New in Oracle Policy Automation November 2017 #2

As in the previous post in this series, the OPA Hub Website is concentrating on the new features, or “Whats New in Oracle Policy Automation November 2017” to be more precise. This is the second in the series. In this post we will explore two different functionalities that have been improved. Firstly, we have all probably at some point found ourselves creating attributes, and thinking about default values : setting them on the different screens of our Interview and so on. We probably also have then spent time creating Rule Tables to handle what happens when we have to default values based on the certainty of other information.

Default Values in Web Service inbound attributes

These days, managing default values in a Web Service environment just got easier. Consider the following simple example. The insurance premium is inbound in a data Connection. It is copied into an attribute called the baseline annual premium. If the inbound value is uncertain, then the default value (in this case £500) will be used. If the inbound value is different to £500, then that value will be used instead. If the inbound value is unknown, then the value of the baseline annual premium will be unknown.

Whats New in Oracle Policy Automation November 2017

Set True and False values in one shot

Another feature from the Whats New in Oracle Policy Automation November 2017 collection : in the same vein, you can now use the If function to set values for a true or false result of a condition, like you would for example in Microsoft Excel formulae. Think of it as “If(expression, value if true, value if false)”.

Whats New in Oracle Policy Automation November 2017

If the baseline annual premium is greater than 500, then the percentage of legal fees will be 100. Otherwise it will be 50. The documentation refers to “condition” but in different places it refers to Boolean attributes or conditions. In any case, it seems to work with both.

Both of these will provide decent shortcuts to existing workflow for developers looking to create cleaner rules. You can find the details in the online documentation here. Catch up with more “Whats New in Oracle Policy Automation November 2017” in the upcoming third post, where we will look at cool new features in the Interview.

PS : Note that my example assumes a Project using the English United Kingdom regional settings.

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.

Worldwide
Logo by Southpaw Projects LLC