Category: Oracle Policy Automation

What’s New in Intelligent Advisor 20C?

What’s New in Intelligent Advisor 20C?

And so the wheel of time turns and before we know it, yet another version of Intelligent Advisor has hit the shelves. And this one is a big release, with some fantastic stuff in it, not just for Interview fans but also for those of us who are focussed on REST Services, performance and testing. So what’s new?

So, here is what’s new in Intelligent Advisor 20C. Let’s begin with the Interview Extensions. There are new extensions that help us format the styling for portait entity containers and entity collects. They have styling extension names like portraitContainer and (as child elements of the container) headerCell, row, rowOdd, rowEven and so forth. Some of these were introduced in the second monthly update to 20B but they are so fresh it’s worth mentioning them. They can easily produce nice effects. Here are some of them in techicolor, namely dynamic Buttons, Column Headers and Row colors.

What's New - Interview Extensions

That bunch of things would be enough to get me really excited, but there is a LOT more. For a while now I’ve been militantly asking for functionality where my customers can begin to profile their rules, get performance statistics and execution time data.

Now they can – firstly, directly through Intelligent Advisor REST calls (using the Batch API) via the addition of @time per case as well as processorCasesPerSec and processorQueuedSec in the REST response. This is fantastic for understanding what’s going on with cases in Batch.

Secondly the users of Policy Modeling can now leverage new functionality and obtain statistics from a set of Test Cases in Excel format or from a JSON batch request. For Test Case output, reports and timings (in CSV) are generated automatically and stored in a new TestLogs folder. As development continues, these CSV files will be good sources of information to understand where added rules or entities are causing a slowdown.

Thirdly, they can also delve into the details of execution times via a JSON batch request analysis. For example, shown below is the generation of the rule profiling report obtained by loading a JSON data set into Policy Modeling on the Test Cases tab via the new Analyze Batch Request button.

In summary, for performance hunters there are now 3 useful areas : batch execution timing, test case execution reporting and finally sample batch profiling.

But that is not all! There is an important accessibility enhancement – the ability to flag a control as leveraging the browser’s native auto-fill capability. Select the Screen Control and set the properties :

What’s New in 20C – Input Auto-fill

On the Hub there is a new feature called repository branching to allow copying of a project in the Repository directly on the Hub to create a visible relationship between the source and the new one. If you have ever had to create copies of projects to represent different strands of development or testing, this will be welcome.

When viewing (in either direction) you can see where the project has been branched / is the root of a branch:

There are other new features, notably a component versioning system that becomes apparent when viewing the new release in OPM. The product version might be 12.2.20.X but the component version is 42.0.0. Separation has occured so that the product can evolve at a different rate to the component version. The “component” of which they speak is the core interface between Policy Modeling and the Hub. In light of some of the potential functionality on the roadmap, it makes sense to separate the two.

This release is a big one, no doubt about it. Not just for the new features which bring proper instrumentation and profiling to Intelligent Advisor – which was overdue – but also for the new Interview Extension features. The other elements are laying the groundwork for yet more new features in the future. Read the online notes here.

Have a good day.

AWS Accelerated A to Z Intelligent Advisor Install

AWS Accelerated A to Z Intelligent Advisor Install

The other day an esteemed reader of this humble blog asked me a question about installing Intelligent Advisor on Amazon Elastic Cloud. Of course I immediately sugested they try Oracle Cloud instead but the questions were valid and it soon struck me that this site has not, for a long time updated it’s installation posts and guides (notably the Create an OPA Self-Study Series). So I had a few minutes to spare while waiting for a train the other day and I sat down and recorded an example. To assist with the example, which is extremely edited to simply hightlight he key points, here are the things that I needed to install the entire stack for an Intelligent Advisor Install.

  1. I started with Windows 2012 R2 Server as the base image. Old, stable and easy to navigate
  2. I choose 100Gb for the disk size and Large for the image
  3. I downloaded WebLogic Quick Installer
  4. I downloaded Oracle Database 12c database
  5. I downloaded JDK 8 261
  6. I downloaded the latest version of SQL Developer
  7. I downloaded the 20B release of Intelligent Advisor

The install routine is very well documented here online and you could pretty much follow that as-is. my own way of installing in this demonstration focuses at the end on the Data Source, which is often forgotten about during the install. Here are the stumblng blocks you might come across:

  1. Local Security Policy stopping IE from being launched so you cannot install Chrome.
  2. Local Server setup put IE in enhanced security mode which slows everything down.
  3. Microsoft Visual C++ Runtime Missing which stops SQL Developer running. (See the section entitled Note: the Windows EXE requires a MSVCR100.dll to run. Most computers will already have this file and in the Windows PATH. However, if the first copy of the file found by the EXE is a 32-bit copy of the DLL, then SQL Developer will fail to start. You can fix this by copying a 64-bit version of the DLL into the BIN directory or updating your OS PATH such that a 64 bit copy of the DLL is found first.).
  4. Creating the database user for the install with the correct permissions.
  5. Ensuring the Data Source in your WebLogic is targeting the database and can connect / the database name is correct and the data source is accessible from the WebLogic server you created
  6. Ensuring for this demonstration machine that Node Manager is not using a secure connection

As I state clearly in the beginning of this video, this is for demonstration purposes only, and it is entirely your responsibility to ensure that you have licenses, permission and authority to do any of this. Good luck with your Intelligent Advisor Install and do not hesitate to leave a comment if you run into issues.

In Praise of Hub Interview Statistics

One of the areas that customers often discuss in relation to an Intelligent Advisor project is the need to understand and track usage patterns. What kind of flow are users taking through the Interview, how many are dropping out of the expected Interview flow, and so on. They often talk about comparisons of different versions of the same Interview. And then they turn and look at us, the Intelligent Advisor people, and ask how much that will cost. They want Interview Statistics!

On this occasion we can give them good news – pretty much everything they might need is already in the product. For example:

Hub vs Project Statistics

Built-in to the Hub we have Interview Statistics either at the Hub level (so, comparing and analysing across all projects that have been deployed) or at the single project level (for example, comparing two versions of an Interview or looking at the details for a single Interview version). So where are all these Interview Statistics? In the Hub.

Let’s take look at some of the excellent features. To get there, just click the Metrics Zone once you are viewing a deployed project.

Deployment Details Page

So now we can view the different charting options, such as looking at the screens visited and how many sessions dropped out:

Interview Statistics 2

In the above diagram, you can see that 20% of people (red) did not get past screen 1. Only 80 percent made it to screen 2. Of course if you have several versions of your deployed project you will maybe want to overlay multiple versions and look at that instead. In the following example I have clicked the Add button above and added a couple of versions, one of which included an extra screen (version 2). My interview statistics are pretty poor since this project was only used a few times, but notice that the default is for 30 days of analysis.

Interview Statistics 3

In the next example, I’ve selected to view the averge time spent in the screens as my users work through my very simple interview. It’s one of the preset report types that I encourage everyone to know about:

Interview Statistics 4

Of course, it is not always possible to find exactly what you want in the preset data analysis types. So you can select Custom and build a customised Interview Statistics analysis based on your desired timeframe, versions and style of chart:

Interview Statistics 5

And you probably will want to get this data into Power BI or Excel or both, so you can always download the information in CSV format:

All in all this is a very good start. Of course we can go further and use tools like Selenium and so on, but sometimes out of the box is more than enough! You can learn more about these cool features here.

Intelligent Advisor – 3 Cool Things

Intelligent Advisor – Cool Things I didn’t know. Sorry for the clickbait title but they are genuinely things that I didn’t know until I stumbled upon them by chance the other day. Of course the chances are you all already knew about them, but I thought I would reproduce them here for a bit of light relief. They are by turns interesting, useful and perhaps a bit strange but either / any which way I hope they are useful.

Cool Things #1 Multi-Fill Debugging

Fill in multiple attributes of the same type in the Debugger: Suppose you have a bunch of attributes that you need to fill in at the start of a debugging session. Imagine that five of them are booleans. And you just want to make them all true or false. This works also for multiple dates, times or whatever – as long as the attributes have the same type. Just select them all in the debugger using the Shift or Control key and hit Return. You can enter a single value and it will be placed in ALL of the attributes. That’s number one of our cool things right there!

Cool Things 1
Cool Things 1

Cool Things #2 : Reference Tags for Bug Tracking

This one is dedicated to all my friends in Caen. If you are someone who has to work often on debugging documents and fixing tickets, then you will maybe know how useful the Reference Tag feature can be for this. For example you fix something in Word or Excel and push it to testing, only to have to go back a few days later to make more changes. So you can use the Finder in the Oracle Policy Modeling interface and just type in the reference tag details to quickly find any and all places you referenced it. Of course this is good for any reference tag. That’s number two of our cool things! This is good if you use JIRA or some other bug tracking system, or if you want to mark user stories or anything else.

Cool Things 2
Cool Things 2

Cool Things #3 : Run Debug in Browser

This one is probably already familiar to many but it does deserve a mention here. When running the Debugger, just press the Control ley before you click the little green icon (alternatively use the Control + F5 combination to start the debugger) and you will get two windows – the normal debugger in the embedded Internet Explorer 11 thing, and a session of your interview in the default browser of your computer. The browser session doesn’t have impact on the debugger but it is very useful if you are messing with a JavaScript extension for example, or if you want to test geolocation attributes properly. That’s number three of our cool things selection for today!

Cool Things 3
Cool Things 3

Do you have some to share?

If you have your own favorite tricks then share them with the world and we’ll give a prize to the best ones we see here.

Calling all Siebel and Intelligent Advisor folks

You are probably aware of this event already but I decided to promote it here on this site in case you had not come across it. A new virtual event held at the end of July 2020 called Oracle Dynamic Siebel Data Capture with Intelligent Advisor aims to help people understand how Siebel and Intelligent Advisor can really work together to assist in the capture of dynamic data for the CRM system. The virtual event is in two parts, in the first part it will look at the functional aspects of the integration and the second part will investigate the technical aspects of Siebel and Intelligent Advisor communicating successfully.

Having been on several projects where Intelligent Advisor is connected to and depends upon Oracle Siebel CRM for data to load into Interviews, or Web Services that provide Siebel with the power of Intelligent Advisor, I can recommend this virtual event to anyone in the field.

I can say that this virtual event is going to be a very useful overview for anyone who is thinking of connecting them or who wants to prepare for an upcoming project. We’ve often touched on this topic here on this website too.

Siebel and Intelligent Advisor

The functional part of the virtual event will be extremely interesting to learn about use cases and how user needs can be met with this integration. So don’t miss your chance to enrol and get the lowdown on this integration. It can revolutionize how Siebel embeds itself into the wider enterprise.

See you there : enrol using this link : Enrol Now for Oracle Dynamic Siebel Data Capture with Intelligent Advisor Virtual Event 29 July 2020. This is a good opportunity to connect with other Siebel and Intelligent Advisor folks and spread your network a little wider. Remember that there are regular events published on the Oracle Events website, and you can search by keyword as well. Find their Events Page over on their site at this address :

Spell Checking in Interview Controls

The other day, I came across a question regarding Spell Check in Interview Controls. You know the sort of thing – this would be useful for Inputs, but especially for Text Area Controls where there may be a considerable amount of text that will need spell checking. There are today several approaches but one that stands out.

The first option is to implement something in JavaScript – this has downsides for a couple of reasons. The dictionary for a given language, even compressed and specially structured, is going to be larger than average – the size of the file will make for slower processing. And the JavaScript will need to search this file. Thus, the performance might not be great. There are a couple of good toolkits that find innovative solutions, for example this one, but it will need work to build the apporopriate user interface.

The next option is to hand off some of the processing to the server-side. There are a number of spell check engines out there in open source that use PHP or ASP.NET for example. Some others use third-party servers or Google APIs that need payment. So for a simple spell check in Intelligent Advisor that sounds like a lot of effort.

The final spell check option is to leverage the browser itself. Most modern browsers support the spellcheck=”true” attribute value for inputs and text areas and lots of other text-content tags like <p> and <div>. So the simplest option is to switch on that attribute on any items you want to spell check. For example, add an invisible label extension to your Screen and use it scan all the relevant items on the page and add the spell check capability. For speed, the example below uses jQuery to select the relevant items for spell checking but you don’t need it of course, you can select using standard JavaScript too.

/*  Generated by the OPA Hub Website Code Generator 19/06/2020 18:27
Educational Example of Custom Label Extension for Oracle Policy Automation
I will remember this is for demonstration purposes only.
	customLabel: function (control, interview) {
		if (control.getProperty("name") == "xSpellCheckEnable") {
			return {
				mount: function (el) {
					console.log("Starting name:xSpellCheckEnable customLabel Mount");
					$(document).ready(function () {
						$("input[type='text'], textarea").attr('spellcheck', true);
					console.log("Ending name:xSpellCheckEnable customLabel Mount");
				update: function (el) {},
				unmount: function (el) {
					if (control.getProperty("name") == "xSpellCheckEnable") {
						console.log("Starting name:xSpellCheckEnable customLabel UnMount");
						console.log("Ending name:xSpellCheckEnable customLabel UnMount");

With the above code in place, an input or text area will allow spell checking using the browser. Note the wavy line and the right-click:

Spell Check in IA

I’m not saying this is the perfect solution but there are some good and less good points:

  • No management of files needed
  • No user interface to create
  • Supported by the vast majority of browsers (see link above)
  • No server-side stuff to pay for
  • Applicable to pretty much any HTML tag

There are a few downsides

  • Usually defaults to the operating system / chosen language in the browser settings rather than the document language
  • Not the most exciting user interface
  • If you use multiple browsers you might end up with different word lists.

But sometimes, less is more. This example is free in the Shop. Happy Spell Checking!

JavaScript Custom Image Extension

One of the regular readers of this website was very excited to see that recently, the Custom Extensions were updated to include a Custom Image Extension. Whilst at first glance you might not think it would need much of an extension, or maybe you cannot think of a requirement, there have been many situations where the logic of dynamic images, dynamic sizing, and so forth could not be done with a styling extension or a bit of CSS.

So what is available in this type of extension? In a Custom Image Extension, you can leverage the following Control Methods to customize your image.

getWidth()The width of the control (not just for image controls)
getHeight()The height of the control
getImageSource()The URL representing the source of the image
getLinkUrl()The URL used if the image is clicked
openLinkInNewWindow()Will the link open in a new Window?
getHorizontalAlignment()The alignment of the image
getCaption()The text caption of the image

For a quick demonstration, the following project will create a dynamic QR code according to your chosen URL. The image can resized on the fly using the sliders, and you can set the URL and whether it will open in another window:

The Custom Image Extension will generate a QR code and the user can manipulate the size of the image to see it changing dynamically. You could even then put the dynamic image in your Forms. Or use it to send a link to someone for a GetCheckPoint. Lots of ideas!

Creating a QR Code

There are lots of applications where the ability work with a Custom Image Extension will maker life easier. There is a good example in the Example Projects – it’s called Health Diagnosis and check out the diagnosis page with the dynamic image. The example project contains the JavaScript for the Custom Image Extension in the usual folder.

You can get the example Zip file from the OPA Hub Shop.

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.

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

Dynamic Input Mask JavaScript Extension

Dynamic Input Mask JavaScript Extension

This week I was lucky enough to be chatting to a reader when he shared a requirement for a dynamic mask. The exact concept was simple : when entering a telephone number, if the end user of the Interview types a number first, then the mask should default to the national format – for example (555) 1234-1234 – but if the end user types the international “+” prefix first then the mask should switch to a different one, for example +00 000 0000 0000 or whatever is appropriate. Outside of this example, there are frequently situations where more than one mask is needed, depending on some criteria or some fragment of data entry.

We should not forget of course that if all we want is a simple mask, then Intelligent Advisor has got it covered with the standard out of the box functionality. To implement a simple, static mask simply requires us to create an attribute of type Text and to select Masked Input from the Interview Ribbon before specifying the mask in the Input Mask dialog.

As an example, the following shows a Masked Input Control with a specific mask being implemented. In addition, you can see the Hint Text in the Interview tab shows the result in case you forget.

Clearly this is going to produce a good mask. But it cannot be changed dynamically, as it is part of the Control properties at runtime. So the possible solution is to use an Extension. In this case, a customInput. For the purposes of demonstration, we chose to use the jQuery Mask plugin. You can find more about it at the address : The most interesting element is the fact that it supports dynamic masks. It uses the keypress event to enable the developer to check the character(s) and then change the mask. So this sounded like a great idea, and indeed proved quite straightforward. The code below shows that in fact there are several steps needed : define the two masks, and also handle the case when the area is blanked by the user.

Happily we found an old project where we had already used this dynamic input mask technique and adapted it for today.

Dynamic Mask

Here is the example code, of course you can get the Zip file from the Shop. There are some comments below.

/*  Generated by the OPA Hub Website Code Generator 30/11/2018 22:41
Educational Example of Custom Input Mask Extension for Oracle Policy Automation
I will remember this is for demonstration purposes only.
	customInput: function (control, interview) {
		if (control.getProperty("name") == "xMask") {
			return {
				mount: function (el) {
					console.log("Starting name:xMask customInput Mount");
					var div = document.createElement("input"); = "xMask";
					div.value = control.getValue();
					var oldVal;
					$('#xMask').on('keypress', function () {
						var val = this.value;
						if ((val != oldVal) && (val.length == 1)) {
							oldVal = val;
							if (oldVal == '+') {
							} else {
						} else if (val.length == 0) {
					console.log("Ending name:xMask customInput Mount");
				unmount: function (el) {
					if (control.getProperty("name") == "xMask") {
						console.log("Starting name:xMask customInput UnMount");
						var xMask = document.getElementById("xMask");
						console.log("Ending name:xMask customInput UnMount");

As you can see in this dynamic input mask demo, there is only really the mount to worry about. We use the keypress event and switch the mask based on the previous character pressed on the keyboard. And if no characters exist in the control we remove the mask ready for the next try. Here is a short video demonstrating the effect, and comparing to a static mask. The input control extension has not had any CSS formatting applied so it appears a little smaller than the standard. This can easily be changed.


Have a nice day! (the documentation about standard input mask functionality can be found online here).

Logo by Southpaw Projects LLC