Welcome to the OPA Hub!


Category Archives: Files

What’s new in Oracle Policy Automation 18D?

What’s new in Oracle Policy Automation 18D?

The dust from Oracle OpenWorld has hardly settled and here we are with the final release of Oracle Policy Automation for 2018, the eponymous 18D. So what is new in this final release 18D? Here are the big picture items that may have impact on your daily life. Note that as of the date of this post, only the Documentation was available, the product is not yet Generally Available.

Enhanced Attachments

Now,  Service Cloud Interviews can organize their uploads better. You can create upload groups (sort of categories) as well as setting the number of files, allowed extensions and underlying Entity mapping. If you are upgrading a Project, you get a single Upload group per Entity that has an upload. This functionality is not available for Engagement Cloud yet.

What's new in Oracle Policy Automation 18D

Version Pinning

This is probably going to be a big impact (in a very positive way) for many large customers. It provides, starting in 18D, the ability on the OPA Hub to defer a Project Upgrade and do it at a later time rather than when prompted by your 19A or whatever later version you happen to have installed.

What's new in Oracle Policy Automation 18D

Client Authentication for Web Services

When your Oracle Policy Automation Connection is getting or setting data that is sensitive in nature, you want to have client authentication enabled : only authorised sites (Oracle Policy Automation instances) that have the certificate will be accepted, and the communication will therefore be two-way SSL.

Forms on Mobile

Forms using collected data and decisions made can now be generated when an Oracle Policy Automation mobile assessment is submitted to Oracle Service Cloud and sent to the appropriate Object in Service Cloud.

Calendar Input Choices

To align with the data entry standards of some large public sector organizations, you can now specify different data entry for Date and Time or Date Controls. Interview Extensions can further extend these controls.

What's new in Oracle Policy Automation 18D

Add Form or Signature multiple times

Now you can have forms (PDF forms) generated for multiple entity instances in the Project, and have all of them sent back to your connected data source.

Entity and Container styling in interview extensions

On the Extensions front, a new compound tabularContainer is available in the Styling Extension API, allowing for changes to be made to the tabular layouts familiar in Entity-related elements like Collect or Container. Sub elements like header row, cells, odd and even and so forth allow programming access to the Styling options we are used to seeing in the Styles dialog.

What’s new in Oracle Policy Automation 18D Summary

As usual the Oracle Policy Automation team has produced another great release with some really useful features. Onwards and upwards! If you want to read more online, the new documentation can be found here.

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.

<?php
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($) {
 $(document).ready(function(){
 $(\"#id_tohide\").remove();
 $(\"#id_toshow\").show();
 $(\"#id_ofcontainerdiv > a\").attr(\"target\", \"_blank\");
 });
 });
})(jQuery);
} else {
 (function($) {
 $(document).ready(function(){
 $(\"#id_tohide\").remove();
 $(\"#id_toshow\").show();
 });
 });
})(jQuery);
};";
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($) {
 $(document).ready(function(){
$(\"#id_tohide\").remove();
 $(\"#id_toshow\").show();
 $(\"#id_ofcontainerdiv > a\").attr(\"target\", \"_blank\");
 });
})(jQuery);
} else {
 (function($) {
$(\"#id_tohide\").remove();
$(\"#id_toshow\").show();
 });
})(jQuery);
}

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.

OPA – Entities Adventures #9 Testing using What If

What If?

Back in the Workshop now with all our different chapters, things are getting more and more complex. But one feature of the Policy Modelling user interface that we do not cover in the standard training course can come to our rescue. I’m talking about the What If Analysis feature. This is based on Microsoft Excel and reasonably easy to explain to a non-technical user, so it can be leverage to prove that a use case has been understood, or as a tool for working with the business to understand each other.

The use of this functionality starts with a new file in your Project:

OPA - What If Initial View

As you will have seen, the first time you open it can be quite a disappointment. What you need to do is proceed first to an initial setup, then to some data entry. Begin by clicking the Add Worksheet button on the top left, and adding Worksheets for any Entities that you intend to work with. It will end up looking like something like this, using our Workshop as the example:-

OPA - What if Added Entities

Now we proceed to each of the Worksheets and click the Add Column button. We add any attribute we intend to enter data for, as well as any inferred attributes we want to see the results for after our analysis. Notice the color coding for the columns to make it easy to see which are conditions and which are conclusions.

OPA - What If Added Columns

As in the example above, the colors indicate:

  1. Black is an identifier for the Entity on this tab. In our case here, the customer.
  2. Blur is an identifier for another Entity in the Rulebase. In this case, the Global Entity as well as the customer’s car.
  3. Green is a base attribute
  4. Brown is an inferred attribute

Entering the correct data can be a little daunting, since in many cases you will need to remember for example that car #1 is the Fiat, and mechanic #1 is Bob and so on. But you quickly get the hang of it. Common traps include

  • failing to compile your documents before clicking the Analyze button
  • failing to add information to the Global tab.

Remember that all your Entities will fold up into the parent Global, so there will need to a record on the Global tab. Go ahead and click the Analyze button and see what happens. For the purposes of demonstration, enter one car, one mechanic, one customer and one set of wheel-covers. For inspiration here is a carousel of What If Analysis Worksheets with some example data, and the results (ie, these screenshots were taken after clicking the Analyze button.

Hopefully you will see from the carousel that the inferred attributes have been updated following the Analyze button being clicked. Of course why stop there with only one car and one customer. Not only can we enter many of them for our Global Case #1, we can create many Global Cases, and associate our Entity Instances with a different Global Case.

Furthermore once you have built your complex What If scenario, you can export it to a Policy Modelling Test Case file for further testing.

Have fun, until next time

Rich@rd

OPA – Using messages.XX.properties

Messages.XX.Properties

Following on from the previous topic, there is another file, messages.XX.properties, in the same folder :-

\Release\web-determinations\WEB-INF\classes\configuration

You will find a whole series of files, named in a style similar to messages.XX.properties. The code in the XX will correspond either to a high-level (en, fr) locale code or to a four character (en-GB, fr-BE) precise locale code. Make sure you modify the correct file(s) for your project. Some examples of the usage of this properties files are given below. They all provide simple ways to improve the Web Determination experience for the end user, and branding opportunities for your project.

Let us begin with the following changes to demonstrate how we can enhance the user appeal of our interview.

application-name =ODE Motor Race
support-email =support@theopahub.com

A little further down the page in the same file, you will see these options:

delete-button-text =Remove Instance(s)
add-button-text =Add New Instance

This will allow us to modify the default text used for the creation of entity instances (cars, teams, children, horses, whatever your rulebase needs).  You can of course make changes to these on a Screen by Screen basis, but there is an argument for setting them here centrally if possible. Further down still, you probably will want to modify the standard text which appears at the bottom of the Web Determination window:

footer-left-text            =Standard application copyright and disclaimer

If you look through this file you will discover a whole host of quick wins as far as branding is concerned.

Then let us check our progress. Re-run the Web Determination session. It is looking better already.

Second-Enhancements-644x285

Until next time!

OPA – Web Determinations – Properties Files

Open Oracle Policy Modelling, click File > New Project. Name the project, taking care to choose the English American language and a folder that is appropriate for your computer, and then right-click the Folder Structure and Add Existing File – add the Rulebase file “Rules.doc” from Microsoft Word and then add the Properties file “Properties.xsrc”.

You should also right-click and Add a New Screens File. Give it a good name for your Project. For the moment we will not use it, but it will be modified later in this series..

Oracle Policy Modelling Starting Point

Oracle Policy Modelling

Before we start to investigate the advanced possibilities, let us take a moment to review the out of the box features that will help us improve the look and feel of our Web Determiination. It is excellent practice to take advantage of these before doing anything else!

First of all, launch your Web Determination Session. Ctrl+F5, and make sure Web Determination is selected. Observe the default, automatically created pages and their User Interface style.

Automatic Screen

Automatic Screen

The first place to consider making changes is the “appearances.properties” file. This file will be in the folder of your Project,

\Release\web-determinations\WEB-INF\configuration\

In this file, a line preceded by a # is a comment, anything else will affect your Web Determination look and feel. To begin, let us change the following items.

show-rulebase-build-time =false
show-policy-modeling-version =false
# progress options
show-progress-bar =true
show-progress-stages =true

These are just examples to illustrate the features of the file. We switch on the progress bar, a small visual indicator of progress, and we remove a couple of text items from the status bar. Further down the file we can change the title logo, the text used in screen readers and the alternative text used if the image does not display, and some color choices :-

header-image=copy-Logo2.png
header-alt=ODE Motor Race Management
header-title=ODE Motor Race
header-text-color=#205eb6
headers-font-weight=bold
header1-font-size=x-large
header2-font-size=large

The image can be one of your choosing, or the one provided in the materials. Place this image in the folder :

\Release\web-determinations\WEB-INF\classes\images

Now let us see the results of our work. Ctrl-F5 again to review the changes. Already we have made significant progress. Not all our changes are visible on this first page. Click one of the goals to see a more representative page. Notice the color changes, the new logo and the progress bar in the top right section of the menu bar.

First Enhancements

First Enhancements

Clearly there is more work to do, however the file we have been modifying offers a large number of easy to follow changes. Of course, you should keep a record of the changes by adding # comments to the file, and keeping backups. But these changes cost little and provide benefit. Working to change a variety of options in this file can avoid costly development.

OPA – Jargon Buster – Modules

Hi There!


This content is accessible only to logged in users of the OPA Hub Website.

To Register takes only 10 seconds and uses LinkedIn for authentication.

Once registered you can change your OPA Hub password and manage it independently of LinkedIn.

We recommend you keep different passwords for all your sites.

To register, click the Log in link in the menu at the top of your page.

Thanks, the OPA Hub Website.