Tag: Interview

Video : Label Extension Overview

Video : Label Extension Overview

Here at the OPA Hub Website we always like to think that we are able to listen to our readers. Recently, one of the growing population of developers being asked to implement extensions came to us with a series of questions about a Label Extension.

And it became clear that a video was probably the most efficient way to address these queries. To be honest the OPA Hub Website finds that Video is over-used today in learning. I’ve nearly 30 years as an educator and consultant, I find it frustrating that education is constantly the target of cost-cutting and it means that even really large software providers think they can get away with selling poorly recorded slides with a soundtrack and call this a “learning program”. It’s definitely not a program, it’s an excuse.

Living in Europe and having worked in the States and elsewhere, I know how difficult it is to solve the equation of large distances, different languages and multiple timezones. But I still believe that face to face training is the best answer.

And I feel that although many other benefits exist for video training – immediacy, repeatability and accessibility – sometimes I find that companies push video or recorded training as another way to save money, while still expecting the same level of recall and interest from the students.

In a way, I see it also in the Covid phenomenon – how much video we have been consuming and how many of my colleagues have reached saturation point but are expected to be watching and doing video 7 or 8 hours a day. Of course I get that this is a necessity – but no allowance is made for just how hard it is to watch or deliver. Employers love the productivity it generates.

So this is why, the OPA Hub Website tries to keep the videos, where possible, to a maximum of 45 minutes at a time. Our Online Learning Program is based on that concept.

Anyway, enough mindless chatter : Here is a video introducing the concept of a Label Extension for Interviews, using the Intelligent Advisor Extensions API. The video talks about the basics, and shows lots of examples. We’ve got a few more videos in the pipeline, so watch this space.


If you want to watch the video in a new window on Youtube (yes, for once this is on Youtube) then just click the image below:


Intelligent Advisor as Lightning Web Component (LWC)

Intelligent Advisor as Lightning Web Component (LWC)

This post discusses two ways to embed Intelligent Advisor as an LWC into Salesforce Lightning applications. It is a good opportunity to review the two ways to embed an Interview into any modern web application, and to revisit the specifics of passing parameters to the Interview.

The two options are as follows:

  • Embed the Interview using an IFRAME
  • Embed the Interview using the OraclePolicyAutomationInterview object and either the Start or the BatchStartOrResume method

Both are implemented as Lightning Web Components. In Salesforce, it is not possible to execute external JavaScript, even if the location has been added to the Content Security Policy Trusted Sites. The JavaScript file (in this case Interviews.js) needs to be uploaded as a Static Resource and loaded into the component. The same is true for any styles or other resources (images and so forth) that your Interview might need – for example if you have implemented extensions.

The content of a LWC is essentially three different files – a template for the HTML, a JavaScript file for the code and a manifest file for the details of the deployment and where it can be used. In scenario one, the IFRAME, the code is very short and simple. The HTML template uses variable in the source attribute, and the detail is defined in the JavaScript. The following screenshots assume you have created an SFDX Project in Visual Studio Code, added a LWC and authorised the Org so that you can upload the files. For the demonstration we used a trailhead instance.

The simple HTML Template for the IFRAME embed

Then the JavaScript for the fullURL() code.

The JavaScript file with the fullUrl() code.

Note how the selector uses this.template.querySelector() rather than the traditional document (or jQuery for that matter) .

Once that is up and running, the manifest file is a doddle and looks like this.

In our case the LWC is available on App, Record and Home pages.

The result is as ugly or as pretty as you want it to be, within the constraints of the IFRAME which nobody really wants to see any more!

We made it ugly so you wouldn’t want to use it

Let’s face it, spending all that time and money on modern web components and ace software like Intelligent Advisor, it feels a bit disappointing to end up with an IFRAME. So the other option is more enticing. Let’s use the JavaScript lbrary to launch the Interview!

Another LWC is needed and the difference should be immediately visible. In the first instance, the HTML template is a tiny bit more complicated, but not much.

Note the lwc:dom attribute.

So that the LWC framework leaves us alone and doesn’t start to steamroller over the embedded Interview, we add a blank DIV and ensure it is marked as lwc:dom manual so that we can add child content to this DIV without getting an error.

As prerequisite we need to ensure that the interviews.js library and any styles we use have been added to the Org as Static Resources. Then we can import them into our code. So we make sure we’ve done that in Setup first.

Interview and InterviewStyle. We didn’t use jQuery for this demonstration.

Now that we have set that up, we can add the relevant Whitelist Sites to Intelligent Advisor and our Org in the Access List (Intelligent Advisor) or the CSR List (the Org) to ensure we don’t get any CORS errors or Security errors. For the record, it’s probably obvious, but you cannot use mixed mode here (everything has to be HTTPS).

Our LWC looks a little like this, with the static resources loaded (and a couple of other things needed to get our extension up and running.

OpenIA() will be the code that actually calls Intelligent Advisor

The interview is called using the BatchStartOrResume method of the Oracle PolicyAutomationInterview object – for no reason other than the ability to package parameters, seedData and anything else into a tidy object. Recall that this method can be used to launch multiple Interviews on a single page which is not our case here. For this demonstration we used an Interview that calculates the travel time between stations in the Paris metro.

Open IA

Much of it will look very familiar since it is the standard embedding method. The end result, once deployed to the Org and added to the Home Page (for example, looks much nicer than the IFRAME and plays well in the space allocated, with the Intelligent Advisor styles adapting so that I can see the Screen even with a small view window.

And so, Intelligent Advisor lives in a Salesforce Lightning Web Component. Have a nice day! If you are interested in seeing the Zip of the code, just leave a comment.

Links : Setting Up Development Tools / LWC QuickStart

Back to Basics : Extensions #2

Back to Basics : Extensions #2

Following on from the previous post, we delve more deeply into the JavaScript Extensions world.

Interview Execution in a Browser

So how does an Interview Extension work? Let’s begin with some basic information about how your Oracle Policy Automation Interview runs in your Browser. If you happened to be viewing an Interview right now, and you were to open the Console (F12 in Google Chrome, or Microsoft Edge. Check your Browser documentation for the equivalent key or menu option), you might be able to view something like the following screenshot. Check the steps under the image as you may need to refer to them in your own case.


In this screenshot I have launched a Project using the Debugger. Remember that if you hold down F5 while clicking the Debug button, you will open the Interview in the Debugger and in your default Browser.

  1. Your web server may of course be a different address.
  2. The web-determinations folder will not have the same numeric suffix as in this screenshot, indeed will most likely not have a suffix at all. This is a feature of the Debugging session.
  3. The js file is most likely in the staticresource folder, however if you are in a more integrated environment it may be in a different subfolder, or a different folder altogether. But it will be present.
  4. The contents of the js file can be read more easily by selecting (in Google Chrome in this case) the option to pretty print the code.


This file is the foundation of the Interview experience provided by Oracle Policy Automation. It contains all the code necessary to make the user experience function correctly. Inside this file, however, there is a built-in capacity to accept extensions that change the behaviour of the Interview.

In your Console, search in the file for the following text – “customLabel:” (without the quotation marks, but with the colon). You should find one instance of that text, as shown in the screenshot below.


  1. Search for the text
  2. Find the text in the file.

Take a moment to perform a second search in the same file, for the text shown below. Use the screenshot as your guide.

  1. Ensure you are looking at interviews.js
  2. Search for this text
  3. View the style definition for textInputStyle.

Accepted Extension Types

Notice in the first example, that customLabel is only one of a series of items in the first list. These are the recognized types of Control extension that we, as Oracle Policy Automation Project workers, are permitted to develop.

In the second search you found that there was a style defined for controls called textInputs. Although not quite as obvious perhaps as the first example, an Oracle Policy Automation Project might want to override the Style(s) used in a Project, in order to comply with corporate guidelines for example: and this system will help us do just that. Style Extensions use keywords in the same way to indicate which elements you wish to style.

About Extensions

It is not important at this stage to understand how these extensions are created or used. It is, however fundamentally important to understand that you will be extending Oracle Policy Automation Interviews by adding one or more of these acceptable extensions, and that they will be run in the browser in the same way as the standard JavaScript is already. These interviews can then be better adapted to your IT environment. As an example, read how Styling Extensions enable integration visually with Oracle Content & Experience Cloud.

More on this subject, with some worked examples, shortly.

Custom JavaScript Extension Places and Custom Options List

Custom JavaScript Extension Places and Custom Options List

This is the last in the series of posts about Google Maps and Oracle Policy Modelling for now. I’m conscious of the fact that there are lots of people out there who have more knowledge in JavaScript than I have, so I don’t pretend to provide anything more than “sketches” or “ideas” or “rough hacks”. But I hope you enjoy them anyway. This last post is all about a Custom JavaScript Extension Places and Custom Options List. We will use the basic principles of the previous examples and extend :

  • Display a Map
  • Geocode and Mark
  • Show an Infowindow
  • Find places in a certain radius
  • Display them in a Custom Options list

And this time we will use the Places API to get a list of information from Google, before displaying it in the Screen and using the information. Here is the scenario:

  1. You have a problem (fire, accident, police or flood or what have you)
  2. You are at a specific location (geolocalised)
  3. You need a list of people who can help (for example, a list of car repair workshops, or fire stations, or whatever).

This might fit into the scenario of an assistance company which wants to help you, by pointing you to the nearest garage or hospital or whatever. This uses the Google Places API. When you search it, you get a list of places – garages, hospitals or whatever. You set the starting location, define the radius in metres, and the type of search. The results come back as a list of places, which you can parse and add to your Oracle Policy Modelling screen as a Custom Options list.

So here is the lowdown.  The key to the Places search is in the request, as shown below:

var latlngnew = {
 lat: interview.getValue("cl_lat"),
 lng: interview.getValue("cl_long")

var request = {
 location: latlngnew,
 radius: '50000',
 type: [interview.getValue("cli_search")]
 var service = new google.maps.places.PlacesService(map);
 service.nearbySearch(request, callback);

In the example above you will note that there is an Oracle Policy Automation attribute value to define the type. For example, the “accident” option in the first screen:

OPA 12 - Custom JavaScript Extension Places and Custom Options List 1

Google Maps API Places Search uses type to distinguish what to look for. The mapping I made is just for fun, but bear in mind you might not find a single type that meets your needs, or you might not find any kind of match at all. The 50,000 is the number of metres for the search radius. You might get that from another attribute in Oracle Policy Automation, of course. Plus of course, there are the two attributes in which we have captured the latitude and longitude sent by the Browser.

In the callback function, we receive (hopefully) some results for our Custom JavaScript Extension Places and Custom Options List. The results are tidied up a bit, since the Oracle Policy Automation Custom Options Extension wants text and value properties (in case you want to have display values that are different from the actual values that will be stored in the receiving attribute). Finally the result is passed to the interview.

Custom JavaScript Extension Places and Custom Options List 2

Over in the Custom Option JavaScript file, we just need to grab the data from the Places API and display it as a searchable combo.

OPA 12 Custom JavaScript Extension Places and Custom Options List 4

So the end result of our Custom JavaScript Extension Places and Custom Options List exploration is that the list of providers displayed is based on the type of problem, and the location of the device. So hopefully the list of suppliers / fire stations / hospitals / police stations or whatever is pertinent.

As usual the very unpretty code, for entertainment purposes only, can be downloaded from the OPA Hub Shop. The next few blog articles are going to be on very different subjects than the JavaScript extensions, but I’m sure we will come back to these concepts often. Have a great day!

NB : Remember to test this using your favourite real Browser, not the embedded Browser : run the Debug with Ctrl+F5.

Siebel Symbolic URL and OPA

Siebel Symbolic URL and OPA

Last week I was working on Oracle Policy Automation integrated with Siebel. As part of the implementation one of the Oracle Policy Projects is going to be displayed in a Symbolic URL. If you are not a Siebel person, then this is a mechanism to pass arguments to a base URL using an Administration screen. Typical arguments might include the window size, the SSO characteristics and other disposition information.

The reason I mention it here is because the Oracle Policy Automation project had several input attributes mapped to URL arguments. It is worthwhile knowing and remembering that the manner in which Oracle Policy Automation handles these arguments is different to the standard way that Siebel does it.

From the documentation we learn that input attributes thusly mapped are to be provided in one of two ways. The choice depends both on the desired approach and the number of attributes.

  • startsession/ProjectName?seedData=argument%3dWord%20SecondWord

The above method is passing one argument. The URL is encoded.

  • startsession/ProjectName?seedData={name:Word%20SecondWord,assessment_date:2017-01-07}

This second example has two arguments, and uses a JSON snippet. This format allows for multiple input arguments. The principle reason for speaking about these two concepts is that Siebel Symbolic URL tries to code the URL by default. So if it is already coded as above you might get some odd results.

If you are using Siebel therefore you will need to add the following Field to your Symbolic URL definition in Siebel. The EncodeURL command takes a Boolean value so you try and set it to False.

Have a nice day.


Oracle Policy Automation May 2017 – New Features #5

Oracle Policy Automation May 2017 – New Features #5

In every release of Oracle Policy Automation there are stand-out features. Already in this series about Oracle Policy Automation May 2017 we have seen so many great features :-

  • PDF Templates for Forms
  • Dynamic List Values
  • Styling via The JavaScript Extension API
  • Control Extensions via The JavaScript Extension API

For this, the fifth post in the series about Oracle Policy Automation May 2017 we have definitely arrived at a major, triumphant upgrade in functionality. Finally we are able to embed our interviews without the use of the hated IFRAME tag. For too long we have been stymied by the use of an outdated, unresponsive and frankly quite horrible tag to get our great interviews into existing website content. The JavaScript extension that we looked at in videos three and four in this series once again comes into play, and using a simple technique redolent of jQuery we embed the interview in a DIV tag.

To accompany this new feature we also have two pieces of required infrastructure : firstly the style sheets and JavaScript files to support the embedding, and secondly the new administration feature in the Oracle Policy Automation Hub, whereby we can add the required external sites to our “Authorized” list, thereby removing Cross Origin scripting issues from the browser and ensuring the functionality works smoothly.

Oracle Policy Automation May 2017- CORS

In the video that accompanies this article, you will discover the basic structure of an example HTML file, observe live debugging and updating of the “Authorized” list and lastly you can watch my jubilation as the interview kicks off in my embedded DIV without a single IFRAME in site. I look forward to helping my clients move away from the various hacks and other cosmetic touches to hide an IFRAME to a more modern, JavaScript extension-based approach.

For more videos you can check out our Video Gallery. The other posts in this series concerning Oracle Policy Automation May 2017  are parts 1, 2, 3 and 4.

Oracle Policy Automation OPA 12 Browser Detection

Oracle Policy Automation OPA 12 Browser Detection

Oracle Policy Automation OPA 12 Browser Detection

Oracle Policy Automation OPA 12 Browser DetectionI wanted to go back over a situation I had a couple of weeks ago, in respect of needing to detect the user agent of the Browser that had an OPA 12 IFRAME in it, for reasons I will describe in a moment. As many of you know, the latest versions of Oracle Policy Modeling are moving away from the concept of bundling JavaScript files and other externals (such as CSS Files) with the Project by means of the /interview-theme/resources folder. In fact in the latest versions in “latest version” mode there is no support for JavaScript or CSS added by this mechanism, nor by Custom Control. So “August 2016” mode to the rescue when it comes to OPA 12 Browser Detection.

We could either just drop the JavaScript and CAA in the resources folder above, or in the case I met this week, this was not an option, it had to be a PHP file thus it was a Custom Control.

Putting aside the questions like “Where is OPA going with support for JavaScript?” (which would seem to point in the direction of RuleScript) it brings to the fore the need to achieve certain things – like browser user-agent detection – within the now somewhat less flexible framework. Let’s look at what I am talking about.

Internet Explorer 11 and the IFRAME : OPA 12 Browser Detection

Internet Explorer 11, especially in Windows 10 and on Surface tablets, behaves differently from the majority of browsers (why is this not a surprise?) in respect of opening PDF files from within an IFRAME. The PDF file is not displayed, an error is logged in the console and (in the case of Oracle Policy Automation) the session is lost.

So one obvious approach would be to prepare two links, one to download the PDF and another to open the Oracle Policy Automation Form in, for example, HTML format since that is not subject to the same security block. And then, depending on the browser user agent, hide one of the links so for the end user it is totally transparent:

  • For IE11, display the HTML version of the OPA Form
  • For all other browsers display the PDF link to the OPA Form

The advantage of this approach is improved maintenance – there is only one form, just two delivery mechanisms. Now we need to show or hide the relevant link depending on the browser.

Getting the User Agent : OPA 12 Browser Detection

Now we are faced with the User Agent issue. As you probably know, Custom Controls in PHP are still supported or at least functional as long as it is an Oracle Policy Modeling Control of type Label and your Project is set to “August 2016 mode” . So this is how we might proceed. If we use a Custom Control in PHP, the $_SERVER[‘HTTP_USER_AGENT’] variable will contain the User Agent ready for use in PHP. But it will probably return a value that is not that serviceable or even correct. But the advantages of being able to access the $_POST array (with all of the interesting metadata and things in it) mean that sometimes PHP is the way you need to go.

PHP Version : OPA 12 Browser Detection

So, JavaScript via PHP to the rescue (and yes, I know there are other ways of doing this, but I just want to illustrate a problem and point you in one direction for a solution, even if it perhaps sits right on the edge of server / client code separation). Here is a sample PHP snippet which you can attribute to a Label Custom Control. Host the PHP on your web server or wherever you have PHP.

Notice the “Trident” match : as a simple demonstration I used the text string “Trident” to detect IE11. It is not meant to be a completely bulletproof detection just an example to be replace which whatever string you are looking for. For reference I include the HTTP User Agent reported by PHP versus the JavaScript navigator.userAgent.

echo '<div style="display : none;" name="ode_browser_check" id="ode_browser_check" class="ode_submit" >' . $_SERVER['HTTP_USER_AGENT'] . '</div>';
echo "<script type=\"text/javascript\">
var myData = navigator.userAgent;
if(myData.match(/Trident/i) )
 (function($) {
 $(\"#id_ofcontainerdiv > a\").attr(\"target\", \"_blank\");
} else {
 (function($) {
echo '</script>';

The example above assumes you have two HTML IDs, one for the link to hide, one to show. If you are using the standard OPA Form link, you will need to add the “_blank” target to the link that points to the HTML output version, as in the example otherwise IE11 will open it in the same window and you lose your session. With these tags and code in place, your IE11 users will see one link, the other browsers will see another link.

JavaScript Version : OPA 12 Browser Detection

If you are in a position where a JavaScript file is all that is needed then you can do pretty much the same thing of course just by reverting to normal JavaScript syntax.

if(navigator.userAgent.match(/Trident/i) )
 (function($) {
 $(\"#id_ofcontainerdiv > a\").attr(\"target\", \"_blank\");
} else {
 (function($) {

Note : All of the above will, by definition,  not work in “latest version” mode since Custom Controls / JavaScript  are not supported in “latest version” mode.

Note : In light of all of this, it makes me wonder how much longer Oracle Policy Automation deployment on a website  or on Oracle Service Cloud Customer Portal or Agent Desktop, can depend on such a nasty, legacy HTML tag as the IFRAME.

Have fun.

Combining Siebel IP 2016 and native OPA 12.x Interviews + Answer Service (Updated)

Combining Siebel IP 2016 and native OPA 12.x Interviews + Answer Service (Updated)

Well, the files are now available : The official Oracle Policy Automation Blog has corrected the links and you can download the files without incident. As I had cause to use them this week, I thought I would provide some feedback on them and highlight some things that might be useful.

Firstly, I appreciate (massively) the hard work that has gone into preparing something like this. I know it is a lot of effort and I am really grateful. The document was however designed for native OPA 12.x and Siebel platforms which have been on an upgrade path, so there are some things which are assumed to be present which might not be in some cases. For example, my own :). I was installing a brand new instance of Siebel IP 16 and OPA 12 February 2017 Hub for the purposes of a prototype.

The document itself is pretty good – but some bits could have done with  a spell check. I’ve worked with Siebel and OPA for a long time, but I have never had to “stimulate a Workflow” in my life. I would probably get arrested for it anyway. Here are some other things I noticed.

  • The SOAP action pattern on page 8 does not require the ‘quotes’ that are included.
  • The Tables for GetCheckPoint and SetCheckPoint do not exist on a brand new Siebel 16 installation (the decision report tables)
  • The SoapUI Project that is included will fail to import because of a missing WSDL – which is no big deal since by then you have your own – but you will probably have to then compare all the namespace prefixes in your WSDL and edit the requests to match.
  • If you have a new Siebel platform, you will need to add the relevant EAI File System Permissions to save files in c:\temp
  • You will need to change (at least on Windows 2008 R2) the file paths to have a single backslash, not a double backslash
  • Mention is made of “three DLLS” that may be referenced in an error when you try and simulate the Workflow Process. For reference, since they are not listed in the document, they conform to the pattern  “ssopa*.dll”.
  • One of the imported Workflow Processes has both a completed and an in progress version. The in progress version has an error in it, so don’t be tempted to publish and activate unless it is the previous version.
  • Unless I am going completely mad, the main OPA Submit Workflow Process on page 12 has an error in the last step “Read from File”. The file name referenced is not referenced anywhere else, in the entire repository – and it causes an error since the file does not exist. Editing the properties to match the file name used earlier in the Workflow Process causes the error to go away.

  • When you are compiling all the imported objects, don’t forget to compile the Symbolic String project (since the WD Launch button has a Symbolic String that has been added). I know that the PDF says to do a full compile but if you are just mounting a test platform, you want a quicker way. Plus, if you do an incremental compile, watch out for errors afterwards with PickList Repository Business Object in Siebel Tools. You might need to drop the freshly compiled SRF into the Server, Client and Tools installation folders.
  • The Eligibility OPA Project found in the Siebel 16 example folders does not upgrade to February 2017 – the mapping of the data types fails when trying to use the generic Siebel Connection example demonstrated. The Value Lists are causing the problem. Although it wasn’t part of the scope of the document, if you are setting up a new environment you probably want to show the Answer integration with the HTML / XLST / Custom Properties that was used in Siebel IP 15 for comparison purposes. The Screening example works however.
  • Finally, and this I found quite frustrating, after all the work I notice that the Save Workflow – that updates Siebel after the interview – has a hard coded save of only one piece of information in it. As far as a demonstration of generic approaches is concerned, could do better.

I will make the SoapUI adjusted / completed project for native OPA 12.x available in a few days once I have time to tidy it up – it might save you some time. Other than that did you find any issues with this native OPA 12.x integration into Siebel IP 16?

Combining Siebel IP 2016 and native OPA 12.x Interviews + Answer Service

Combining Siebel IP 2016 and native OPA 12.x Interviews + Answer Service

Combining Siebel IP 2016 and native OPA 12.x Interviews + Answer Service

The Oracle Policy Automation official blog came alive last week with it’s first post in over 6 months. This post, which included a white paper and a zip file of Siebel-related configurations (see my remarks at the end of this post), raised the topic of Oracle Policy Automation 12 with Siebel 16. The simple facts are, that the Siebel release cycle does not keep pace with the Oracle Policy Automation release cycle, at least in the domain of the integration with Siebel Open UI.

As you may already know, the previous major releases of Siebel Open UI (2015, then enhanced in 2016) introduced the concept of a “seamless” integration with Oracle Policy Automation. It required the following to be configured:

  • Mapping Oracle Policy Modeling Screens to Siebel Open UI Controls via static HTML files stored on the Siebel server, and a set of Siebel Workflows to handle the mapping and XSLT.
  • Exposure of the Siebel Web Service to the Oracle Policy Automation Hub Application via the Connections tab
  • Managing the different service calls via various Interview-based Siebel Workflows

Unfortunately, at the time of the release of this solution, not all Oracle Policy Modeling Interview Controls were supported (notably the Container and the Image Control were missing). Since that time, Oracle Policy Modeling has added further enhancements in both November 2016 and February 2017 releases (lots of new controls, better checkpoints) . The integration with Siebel therefore had lost further ground. It is not surprising therefore to see the proposal of a new solution supporting more features,notably more controls and checkpoints.

I had hoped to provide you with a demonstration, however, the two files linked in the article both respond with 404 errors. I have posted a request to have that seen to, and will report as soon as I can on Siebel integration with Oracle Policy Automation.

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.

Logo by Southpaw Projects LLC