Welcome to the OPA Hub!


Category Archives: Interview

Emergency Reponse example project translation

The Emergency Response example Project translation and adaptation

The Emergency Response example Project translation and adaptation

A couple weeks ago while discussing the long list of example projects that come with the Oracle Policy Modeller, I decided to adapt and translate the Emergency Response to another language (in this case French). Here is the run down of the work on the Emergency Response example project translation.

The idea behind this post just to give you some feedback on the various issues that I encountered. Many of these will be generic to similar exercises in any language,so will be hopefully of interest to the wider community. There is no belief or assumption that this is an exhaustive list, it’s just somebody trying to give some feedback.

I am totally aware that there is a sophisticated translation functionality within Oracle Policy Automation, but when you’re dealing with a customer who speaks multiple languages, and subject matter experts who do not necessarily speak all the national languages, sometimes the choice of language for your project is not something you can control, so building this demonstration project was a useful tool in communicating with some of my customers about the capabilities of the product.

Note : I long for the day when inside a single project, I can have Word documents, in different languages, using some sort of formatting markup.

Firstly let’s just walk through what the Emergency Response example project translation entails by looking at the original. It has a single Word document with essentially three different Business rules :

  • A stack of Booleans, one each for the different hazard warning signs (present yes/no).
  • A couple of rules to decide whether or not to accept a manually entered address if the localisation in the browser did not work
  • Finally, a rule to concatenate latitude and longitude with a URL from the Google maps static API at .com.au 😉

For the purposes of this exercise I choose to work from a document from the Ministère des Transports, de la Mobilité durable
et de l’Électrification des transports in Canada
 which I was able to download in French. So where did the issues occur?

  1. Obviously since the Booleans we were referring to reference hazard warning signs that were specific to a certain country, it was necessary to either adapt, eliminate, or add further rules to identify each of the classification and sub-classifications of hazardous materials. For the time being though I kept the same structure of the Word document.
  2. Since each of the hazardous materials was linked to a image file to display a image toggle , it was obviously necessary to obtain and reference new additional image files and update the image toggle in the interview.
  3. The interview included static text introducing the concepts and explaining the goal so those needed to be translated.
  4. The rule which concatenated the URL relied upon latitude / longitude being number attributes, formatted with a separator that was a period or dot. This is not the case for many regions. Besides, this demonstration project is constructed in 2013. At that stage the JavaScript extension API was not available. It felt like the creation of a pop-up window with a Google map inside it was counter-productive for a project aiming to showcase a mobile-friendly user interface.
  5. The manual address entry – if browser localisation was not available – needed to be updated to respect the format of an address in the country that I was targeting, notably for the postcodes and states.
  6. Finally the project used one static header image which would need to be replaced since it included English text.

Along the way, while working on this little Emergency Response example project translation a couple of other points came up :

  • The output of the existing version was not, in my humble opinion, very friendly for the rule Developer. I converted it to a set of inferred entity instances which allowed for a more detailed output and potentially some additional information like what to do in the presence of certain chemicals. It also helped create a notion of class of Hazard.
  • The slider to select the number of vehicles was transformed into two image sliders , one for light and the other for heavy vehicles. Cosmetic more than anything.

So the Emergency Response example project translation contained one Word and one Excel document, some more image files, a JavaScript extension and a few small modifications to the actual logic based on the legislation and classifications. If anyone wants a copy of the project I’m happy to share it, just leave a note in the comments.

Have a nice day and watch out for the next one!

Emergency Response example project translation

Select Vehicles

Emergency Response example project translation

Select Hazard Signs

Emergency Response example project translation

New GPS Extension

Emergency Response example project translation

Entity Instances

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.

 

Siebel and Oracle Policy Automation May 2017 – In (em)bed together

Siebel and Oracle Policy Automation  12 May 2017 – In (em)bed together

Siebel and Oracle Policy Automation 12 May 2017 : Since the release of Oracle Policy Automation May 2017 edition, teams of Siebel developers are breathing a sigh of relief. Finally, Oracle Policy Automation can fully integrate into the Siebel Open UI JavaScript API thanks to the arrival of it’s own Extension API.

It does not take long to compare the advantages of this Siebel and Oracle Policy Automation integration method :

  1. No longer having to use the static HTML file-based integration that was proposed in Siebel Innovation Pack 15.5 and above. This means that all the native Oracle Policy Modeling components (sliders, image controls, explanations, Form downloads just to name a few) can be displayed in Siebel Applets or any other element you can imagine in the Siebel Open UI object model (I’m thinking Plugin Wrappers and so on)
  2. Allowing the Oracle Policy Modeling users to concentrate on optimizing the experience and the Siebel Developers to concentrate on delivering the data model to Oracle Policy Modeling. Separation of concerns
  3. Avoiding IFRAME. Always a good thing.
  4. Implementing different Physical Renderers depending on user situation – perhaps to display the Oracle Policy Automation Interview in a jQuery Dialog if the screen is big enough, otherwise using the full Siebel Applet
  5. Potentially creating a Presentation Model with User Properties to allow Siebel Developers to pass properties into the JavaScript API which then can be used to implement some logic on the middle layer – perhaps passing the Rulebase name into a generic Applet.

It doesn’t really matter if you are not a Siebel person, this opens up a lot of great possibilities. Here are some of the basic steps

    1. Find a Form Applet in Siebel that you want to show an Interview from Oracle Policy Automation in. Using Duncan Ford’s template generator, create an empty Physical Renderer for a Form Applet. This is the starting point for any integration using Siebel and Oracle Policy Automation 12 May 2017 Extension API.
    2. Populate the ShowUI Framework hook with your code to inject the Oracle Policy Automation interview into an available <SPAN> or just make space for yourself. You will want to write much tidier code than this example, but you can get the idea – select, inject.

Siebel and Oracle Policy Automation 12 May 2017 - ShowUI

    1. Add the new Physical Renderer to the Manifest, along with any other files that you downloaded (if you are referencing statics copies of the interviews.js and the CSS files for example)
    2. Restart Siebel and navigate to the View with your Applet in it.

Siebel and Oracle Policy Automation 12 May 2017 Embedded

No IFRAME, no HTML files. Just the magic of the new Extension API. It’s breathed new life into Siebel and Oracle Policy Automation.

 

Oracle Policy Automation May 2017- CORS

Oracle Policy Automation May 2017 – New Features #5

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.

How Oracle Policy Automation Is Helping Shape the Future of Customer Service [BRK1030]

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.

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.

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.

Guest Post : Using Oracle Policy Automation Public Cloud with Oracle Service Cloud (RightNow): Part 4

We are continuing our Lazy Expert series of posts, with an explanation of how Oracle Policy Automation Public Cloud, and the rulebases deployed there, can be used within the Oracle Service Cloud application. In case you have missed out on the original post of this series, you can find it here . With the right Nudge, our Lazy Expert is not so lazy after all.

Part 1  looked at exploring, deploying and verifying the “RightNowSimple” rulebase to work with the Service Cloud Connection. The rulebase was launched directly using the Interview Session URL.

Part 2  looked at embedding this Interview into the Consumer Portal of Service Cloud so that anonymous visitors to the portal can use this same interview in self-service mode. This is accomplished by publishing an “Answer” in the knowledgebase, with the Interview Session URL embedded in an IFRAME, to the Consumer Portal. Optionally you can add some logic to your PHP and conditionally display the Interview.

Part 3 looked at embedding another sample Oracle Policy Automation Rulebase into the Service Cloud Consumer Portal so that “known” (logged-in) contacts can use the Interview Session for an appropriate determination to be provided by the Oracle Policy Automation rulebase. The Interview session will be launched in the context of a known user/contact and hence it is possible to pre-seed the Interview with the data from Service Cloud and, once the determination is completed in Oracle Policy Automation, save the data back into Service Cloud using the Service Cloud Connector.

This article will look at embedding the same Oracle Policy Automation interview that we saw in Part 3, StudentBenefits, and how this can be invoked from within the Agent Desktop. This is an example of using Oracle Policy Automation Cloud for providing assisted services to customers, by Agents, through the Agent Desktop UI.

Pre-requisites:

  • The StudentBenefits sample Rulebase is deployed and the Service Cloud Connector is verified to be working as advertised.
  • Most of the configuration is performed in the Agent Desktop and hence an appropriate credential with sufficient permissions in the Service Cloud is also needed.

Create a Custom Workspace (UI) in Service Cloud, for the Contact record

  1. If you do not already have a custom Workspace in Service Cloud, for the Contact record, you should create one from Configuration -> Application Appearance -> Workspaces / Workflows

In our example, we create a custom workspace named “CustomContact” using the steps listed below.

  • Copy the Standard Contact Workspace as CustomContact into the Custom Folder.
  • Open this new CustomContact Workspace and add a new tab labelled “Student Benefits”

  • Drag and Drop the “OPA” control onto this new tab and specify the control properties that point to the deployed StudentBenefits rulebase, the chosen locale for the UI and the refresh behavior.

  • You should then configure the control, setting the Policy Model, Locale and the Refresh behavior, so that when a new record is created and saved in the Agent Desktop, the Interview shows correctly. When you have done that, save the Custom Workspace.

Assign the new CustomContact Workspace to a relevant user assignable Profile (if required)

If you added the Oracle Policy Automation Control to a new Workspace, then you will need to assign it to somebody, so that you can test it. If you added it to an existing Workspace you can skip this step and proceed to verify the results.

  • Open the “Profile” which should provide access to our CustomContact workspace, from Configuration -> Staff Management -> Profiles, and assign the new Workspace to the Contact record by clicking the Magnifying Glass icon to display the popup window.

Verify the results in Oracle Service Cloud Agent Desktop UI

  1. Login to the Agent Desktop as a user who is assigned the above Profile.
  2. Search / Navigate to a known Contact record and navigate to the Student Benefits sub-tab that you added

You can now work through the Oracle Policy Automation wizard and examine the results in the Service Cloud database.

This explains how the benefits of an Oracle Policy Automation rulebase and the designed Interview sessions can be made available for known Contacts / Users using the Service Cloud Agent Desktop.

This article also concludes my 4 part series of using Oracle Policy Automation Cloud and the provided Service Cloud Connector.

I’ll be starting a new series of articles soon. In the meantime, any comments and/or suggestions on improving these articles are most welcome…

OPA 12 – November 2016 Release New Feature Review #3

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.

Guest Post : The Lazy Expert – Oracle Policy Automation Public Cloud with Oracle Service Cloud Part 2

The Lazy Expert -Oracle Policy Automation Public Cloud with Oracle Service Cloud Part 2

Introduction

We are continuing our Lazy Expert series of posts, with an explanation of how OPA Public Cloud, and the rulebases deployed there, can be used within the Oracle Service Cloud application. In case you have missed out on our first port of this series, you can find it here. With the right Nudge, our Lazy Expert is not so lazy after all. If you are missing the original post about the lazy expert, here it is.

Part 1  looked at exploring, deploying and verifying the”RightNowSimple” rulebase to work with your Service Cloud Connection. The rulebase was launched directly using the Interview Session URL. In this post, we will be looking at embedding this Interview into the Consumer Portal of Service Cloud so that anonymous visitors to the portal can use this same interview in self-service mode. This is accomplished by publishing an “Answer”, with Interview Session URL embedded in an IFRAME, to the Consumer Portal.

Pre-requisites

  1. Steps in Part 1 are completed and the Service Cloud Connector is verified to be working as expected.

Publish the “Answer” to Service Cloud Portal for anonymous use

In our simple example, we are going to embed the interview from Oracle Policy Automation as a publicly accessible page in a mythical “portal” website. Customers will be able to browse the website without in any way identifying themselves – anonymously.

  1. Create a new “Public” Answer in Service Cloud as shown below.
  1. In the Answer Tab, Source Sub tab, specify the content using an IFRAME tag as shown below.

The IFRAME tag is of the format

<iframe height="580" src="https://server/path/web-determinations/startsession/RightNowSimple" width="100%"></iframe>

where the “server/path” should be replaced with the values appropriate for your Oracle Policy Automation Cloud environment.

Oracle Policy Automation Public Cloud

  1. Save the Answer record. Make sure that the Answer you have created was using Source mode, otherwise your IFRAME will not display properly.

Verify the results in Oracle Service Cloud Consumer Portal

  1. Search / Navigate to the Answer record in the Consumer Portal, as an anonymous user using the keyword or text that you entered when creating the Answer above.
  2. View the details of this Answer and work with the Interview Session as normal. The result will be the same – the Contact is saved in your Service Cloud instance.

Oracle Policy Automation Public CloudSummary

This post explains how the benefits of an OPA rulebase and the corresponding Interview experience can be made available for anonymous users using the Service Cloud Consumer Portal. Check this space when we will continue next with part 3 of this series that focuses on embedding such interview sessions into the Consumer Portal of Oracle Service Cloud for known contact users…