Welcome to the OPA Hub!

Tag Archives: OPA

Oracle Policy Automation Embed Website in Interview End

Oracle Policy Automation Embed Website in Interview

Oracle Policy Automation Embed Website in Interview

This request comes up quite often, at least often enough that I feel the need to mention it today. The example we are going to use is to embed the OPA Hub Website in an Oracle Policy Automation Interview. In addition we are going to pass an attribute to the website so that it performs a search for us. So, let us start our tutorial “Oracle Policy Automation Embed Website in Interview”.

Now, I am sure many of you are old enough to have spent years trying to avoid IFRAME integrations in applications : Siebel, SAP, they all do it or have done it at some point in time, and they are awful for the most part – whether it be from an accessibility, SEO, browser restriction or other perspective. So here are our goals for this mission:

  • Don’t use an IFRAME
  • Add the Website in a way that does not destroy the look and feel of the Interview
  • The Website must actually function properly

The steps to create this Project are shown below. You should be aware (and not be surprised) that this will not work well in the built-in embedded Browser in Debug Mode, so run Debug mode using Ctrl+Debug or deploy the Project to see the final results.

Oracle Policy Automation Embed Website in Interview Pre-requisites:

A New Project called “Oracle Policy Automation Embed Website in Interview” or something shorter.

Create a global attribute with the text the subject with a name of subject.

Create a new Screen to ask what is the subject. I suggest a Drop-down list with the Values “Siebel Integration, JavaScript Extensions,Service Cloud”.

Create a second Screen to display the Website.

  1. Create a label, using the name  of  the subject to display the chosen subject.
  2. Place this inside a Container
  3. Make sure you add a Property for the Container, naming the Object.

By now the Screen should look like this:

Oracle Policy Automation Embed Website in Interview Design

Now we come to the code. This is quite simple,although we will also need some CSS to make it look right. Add a JavaScript file and a CSS file to your resources folder for this Project. The explanation is after this code, which is as always provided for educational and investigative purposes only:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 * Richard Napier The OPA Hub Website April 2018
 * Educational Example of Custom Container with a Website inside
 * I will remember this is for demonstration and educational purposes only
 */
 
OraclePolicyAutomation.AddExtension({
	customContainer: function (control,interview) {
		if (control.getProperty("name") === "xWebsite") {
 
			return {
				mount: function (el) {
					var myDiv = document.createElement("div");
					myDiv.setAttribute("id", "mySpecialDIV");
					document.body.appendChild(myDiv);
					$("#mySpecialDIV").width(900);
					$("#mySpecialDIV").height(600);
					var mySubject = interview.getValue("subject");
					$("#mySpecialDIV").html('XXXXXX'+ mySubject + '">');
				},
				update: function (el) {},
				unmount: function (el) {
					var myDiv = $("#mySpecialDIV");
					myDiv.remove();
 
				}
 
			}
		}
	}
});

Oracle Policy Automation Embed Website in Interview Code

In the code above, here are the salient points.

Lines 13 to 17 create a DIV and insert it into DOM, appending it to the body of the document.

Line 18 retrieves the value selected by the user on the previous page that is present in the Container as a label.

Line 19 is the most important one. Notice the “XXXXX”. Replace this with the website and any URL construct you need. For example, replace it with the following:

<object data="https://theopahub.com/main/?s=

The code viewer didn’t correctly display that part. Insert it exactly as shown, so that you are concatenating the URL with the user selected subject. The key point here is the use of the object tag rather than an nasty IFRAME. Thanks to Stackoverflow!

The rest of the code just tidies up when the unmount happens.

Oracle Policy Automation Embed Website in Interview CSS

The CSS is quite important here, to ensure that the embedding is seamless. Add this CSS code to your CSS file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
object {
    height: 100%;
    width: 100%;
}
#mySpecialDIV {
	float: left;
    margin: 0px;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	border-radius: 10px;
	background-color: #404040;
}
html
{
    border: 0px;
    margin: 0px;
    overflow: hidden;
    padding: 0px;
}
body
{
    border: 0px;
    margin: 0px;
    overflow: hidden;
    padding: 0px;
}

Let’s take a look at the CSS. We use styling to position the DIV, as well as styling to ensure the object tag uses all of the available DIV. Finally we use some tricks to eliminate overflowing content and remove the horizontal scrollbar.

Oracle Policy Automation Embed Website in Interview Debugging

As mentioned earlier, this may be best tested in the Browser, not in the Debug Embedded Browser, so make sure you start with Ctrl+Debug.

The first screen will be straightforward:

Oracle Policy Automation Embed Website in Interview 1

The second screen will display and if your Internet connection is slow, you may have time to witness the two stages of display:

Stage 1 : Show the styled DIV that has been added to the Screen. Of course you don’t have to use this colour, I just wanted to use it for positioning and effect.

Oracle Policy Automation Embed Website in Interview DIV

Stage 2 : The embedded Website is displayed. The embedding is seamless (nice colour scheme!).

Oracle Policy Automation Embed Website in Interview End

  1. Notice that the attribute value has been passed to the OPA Hub Website and a search has been performed for you. The site is fully functional and can be accessed from the Interview Window.

Have a nice day! (The PDF is in the OPA Hub Shop).

Custom Entity Container with JavaScript Extensions Revisited

Custom Entity Container with JavaScript Extensions Revisited

Assiduous readers will recall that we followed a series of adventures in Entity Container extension some time ago, from a basic tool that worked only in Debug Mode to a more interesting and robust concept that worked once deployed. For reference those Custom Entity Container with JavaScript Extensions articles can be found in the following links

So why come back to this example? For several reasons it seems appropriate to talk again about Custom Entity Container with JavaScript Extensions. Firstly, it is something that is often coming up in classes or on customer sites. So, subjectively I want to talk about it. Secondly, it is a great way of learning the ins and outs of the JavaScript extensions in general.

Yesterday, I was mad

I noticed that the PDF generator I had used for the third (and most interesting and useful example) had pretty much destroyed part of the file : specifically a couple of lines were duplicated and others were truncated. So it is time to revisit this, if only to correct the errors (I have uploaded a more up-to-date file, so that some of the errors have gone).

So let’s set the scene first. We want to display some entity instances. These are generated in my case by an Excel Spreadsheet. They contain one entity, the insult and this entity has three attributes : an Id number, the text of the insult and an insult level – a numeric categorisation of the insult. The higher the number, the more severe the insult. The insults themselves come from Tintin, or more precisely Captain Haddock.

There are no conditions in this Excel file, so the instances are created. There are 240, so we need a good display of our instances. The default display is too long, with no useful scroll bar. We want to replace this with jsGrid, a lightweight jQuery grid. We want something that replaces the style on the left with the style on the right:

Custom Entity Container with JavaScript Extensions Revisited

We would like

  • A grid format using little space
  • A scroll bar
  • A pagination control

The visual elements will be provided by jsGrid, a lightweight JavaScript control. We are also going to set the bar a little higher than last time. We want to have a dynamic filter of the grid, so that the user can view what they want (and not always have the 240 instances on the grid).

Custom Entity Container with JavaScript Extensions Revisited 2

Note: we must tread very carefully here. We must not change the business logic in any way. We must separate the concerns and provide purely UX elements in our JavaScript extension. But given this is inferred data, I think a little filtering is fine, as long as the underlying relationship is not tampered with.

The code would be based on the standard template, so I will simply put it here, in all of it’s quickly-strung together glory, so that you can read it, learn about it, clean it and make it industrial. As I always like to make clear, anything I post here is strictly not-ready, big-picture, here’s-an-idea for you to look at and make your own. This Custom Entity Container with JavaScript Extensions example is available on the OPA Hub Shop for download, as usual. It is listed as example #3 of Custom Entity Container.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/**
* Richard Napier The OPA Hub Website April 2018
* Educational Example of Custom EntityContainer Extension
* I will remember this is for demonstration and educational purposes only
*/
OraclePolicyAutomation.AddExtension({
customEntityContainer: function (control, interview) {
//console.log("Get Array Reference");
if (control.getProperty("name") == "xEntity") {
var entities = interview._session.config.data;
var entityId = "entitypublicname";
var entity;
for (= 0; i &lt; entities.length; i++) {
entity = entities[i];
if (entity.entityId === entityId) {
break;
}
}
return {
mount: function (el) {
//console.log("Beginning customEntityContainer jsGrid");
var myDiv = document.createElement("div");
myDiv.setAttribute("id", "mySpecialDIV");
//console.log("Styled customEntityContainer");
el.appendChild(myDiv);
var myFlatList = [];
var myObject;
for (= 0; i &lt; entity.instances.length; i++) {
myObject = new Object();
myObject.insult = entity.instances[i].attributes[0].value.toString();
myObject.insult_text = entity.instances[i].attributes[1].value.toString();
myObject.insult_score = entity.instances[i].attributes[2].value.toString();
myFlatList.push(myObject);
//console.log(" Flattened the list - item " + i);
}
$("#mySpecialDIV").jsGrid({
width: "80%",
height: "400px",
sorting: true,
paging: true,
pagelndex: 1,
pageSize: 10,
pageButtonCount: 10,
data: myFlatList,
fields: [{
name: "insult",
type: "text",
width: 20,
title: "id"
}, {
name: "insult_text",
type: "text",
width: 150,
title: "text"
}, {
name: "insult_score",
type: "number",
width: 20,
title: "score"
}
],
controller: {
loadData: function (filter) {
return $.grep(myFlatList, function (item) {
return item.insult_score === filter.insult_score
})
}
}
});
//console.log("Finished customEntityContainer");
},
update: function (el) {
var myslidervalue = $("[role*='slider']").attr("aria-valuetext");
$("#mySpecialDIV").jsGrid("search", {
insult_score: myslidervalue
}).done(function () {
//console.log("filtering completed with slider value " + myslidervalue);
});
},
unmount: function (el) {
var myDiv = $("#mySpecialDIV");
myDiv.remove();
//console.log(" Removed the customEntityContainer ");
}
}
}
}
});

So now let’s look at the key elements (don’t forget to download and place jQuery and jsGrid files into your resources folder) :

Line 11 – this should be replaced with the name of your entity (not the text, but the name or XML tag as some call it). We are going to search amongst the entities until we find yours.

Lines 30 to 35 –  the code extracts your entity and pulls out three attributes from the entity. Note of course that these three attributes need to be placed in your Interview Screen, inside the Entity Container, for this data to be available. Essentially the extracted information is made into a JavaScript object, and the object added to an array.

Line 38 – this is the start of the jsGrid code.

Line 47 – this is the definition of the three columns of data in the table and how to display them.

Line 66 – this is the custom filter function which will hide any instances that do not have the selected score.

Line 77 – this is where we obtain the value of the slider and we refresh the table to only show those records using the filter function.

Thanks to the Madrid crew for their suggestions. In the next few days we will look at another Custom Entity Container with JavaScript Extensions example, this time with a dynamic chart using the same principle. Please note as usual that for best results when debugging, use Ctrl+F5 to debug in a decent browser.

Reimagining What’s Possible with Self-Service: Customer Panel [BRK1495]

Can you be as agile as your customer journey? In this session hear from a dynamic mix of Oracle Policy Automation customers and learn how you can empower your customers and reduce call center burden by deploying advanced self-service apps.

Session Type:  Breakout Session
Solution Area:  Oracle Service Cloud
Theme:  Industry Best Practices for Incredible Experiences
Audience Type:  Product Admin, Business End User, Executives
Community:  Service

Hands-on Lab Part II: Why Giving Advice Is Hard and How to Make It Easier [EDU1531]

SPEAKERS

Davin FifieldOracle
Harriet FranklinOracle
Stephen EstesOracle
In this session learn how to create online interviews and customer experiences that are dynamic and personalized. This session is perfect for businesses seeking to build customer loyalty to differentiate themselves from their competitors. Be prepared to get hands-on with Oracle Policy Automation. Space is limited to 30 participants, so it’s a first come first served until the room is full. Participants must bring their own Windows PC (or Mac with windows on a virtual machine). Note: Attendees do not need to own Oracle Policy Automation to participate.
Session Type:  Pre-Conference Education
Solution Area:  CX for Industry: Utilities, Oracle Service Cloud
Audience Type:  Product Admin, Business End User
Community:  Service
Level:  Beginner

Hands-on Lab Part I: Why Giving Advice Is Hard and How to Make It Easier [EDU1530]

SPEAKERS

Davin FifieldOracle
Harriet FranklinOracle
Stephen EstesOracle
In this session learn how to create online interviews and customer experiences that are dynamic and personalized. This session is perfect for businesses seeking to build customer loyalty to differentiate themselves from their competitors. Be prepared to get hands-on with Oracle Policy Automation. Space is limited to 30 participants, so it’s a first come first served until the room is full. Participants must bring their own Windows PC (or Mac with windows on a virtual machine). Note: Attendees do not need to own Oracle Policy Automation to participate.

2018 Policy Automation Focus Group Events : Oracle Blog

2018 Policy Automation Focus Group Events : Oracle Blog

As Heike mentions on the Oracle Policy Automation Blog, the 2018 Policy Automation Focus Group Events are getting organized :

2018 Policy Automation Focus Group Events We are kicking off our annual Oracle Policy Automation Focus Group events across the globe…

For those of you who have not previously attended these events, they are designed to facilitate collaborative discussions with the OPA Product Development, hear from other customers about their projects, and to give feedback on planned innovations directly to the OPA product development team.

This is an excellent opportunity to connect with Product Development team and network with other OPA customers to learn from previous successful projects and helping drive product priorities.

This of course reminds me that everyone should in any case have already bookmarked the Oracle Policy Automation Blog : it is an excellent source of news about upcoming releases, future trends, chances to meet or listen to the leadership team and generally is the best place to find links to material that might be of interest to anyone in the Oracle Policy Automation or Modelling world.

Which also brings me to the subject of the Oracle Cloud “Try it for free” offer. I think that it is a crying shame that Oracle Policy Automation is neither available as a trial nor even as a one of the other free trials, quick tours, and demos that feature on the same site. It does not take that long to design a video, training course or overview demonstration and to put it up there for the world to see. If Oracle are listening and they have not got the time, the OPA Hub Website would absolutely love to help out!

Finally, as some of you are about to attend the Introduction to Oracle Policy Automation class at Oracle University with me as the instructor, it is good to know that the course has apparently been upgraded to the 17D version, which is a good thing indeed given the age of the previous course release. I look forward to seeing you all in a classroom soon.

Remember to keep checking back here or on the Oracle Policy Automation Blog for more updates about the 2018 Policy Automation Focus Group Events.

 

 

Oracle Policy Automation and Siebel Innovation Pack 16 #3

Oracle Policy Automation and Siebel Innovation Pack 16 #3

This the third post in this Oracle Policy Automation and Siebel Innovation Pack 16 series, following on from the first two which dealt with the “design time” or “metadata” related operations CheckAlive and GetMetadata. If you want to catch up here are the links to the previous parts.

Oracle Policy Automation and Siebel Innovation Pack 16 Workflow ProcessBoth of those operations are fundamental to allowing the Oracle Policy Automation Hub to understand the availability of your data source and the structure thereof.  Once they are operational, there are two main things to take into account. Firstly, the pattern of Workflow Process plus Inbound Web Service Operation is one that is maintained in every case, no matter what set of data you are retrieving. Secondly, the next stages of the Connection setup are common to many Siebel Integrations but there will be Oracle Policy Automation specifics : in the Load and Save operations you will handle getting data from Siebel to and Oracle Policy Automation Rulebase, and then returning any output to Siebel.

As in the previous cases the Oracle White Paper provides, in the associated Zip file, Workflow Processes and other objects that will be needed. As before, according to your business requirement and technical setup, you will need to edit those Objects in Siebel Tools and make further objects. Changes can be frustrating as you are likely going to be searching the Repository for variable names, or Object references, and sometimes you miss one or two.

In the examples shown in the video presentations and walk-through I have deliberately kept this Oracle Policy Automation and Siebel Innovation Pack 16 overview as simple as possible, for example by eliminating the processing of attachments, and by concentrating on the key steps in the Workflow Processes. So for today we will look at the Load operation. Because this operation will require testing, this post will look at setup and SOAP UI, and the following post will take that a step further and look at testing it with real Siebel data.

The Save (a.k.a Submit) operation is necessarily the most complex operation, dealing with the saving of data in Siebel but also the response back to Oracle Policy Automation – which means taking a request to deal with a response and responding with what feels like a request!

 

Oracle Policy Automation and Siebel Innovation Pack 16 Load And Submit Presentation

Oracle Policy Automation and Siebel Innovation Pack 16  Load and Submit Testing in SOAP UI

Testing

In this topic, take your first steps to testing your Load and Submit in the SOAP UI utility.

 

Oracle Policy Automation and Siebel Innovation Pack 16 #2

Oracle Policy Automation and Siebel Innovation Pack 16 #2

Oracle Policy Automation and Siebel Innovation Pack 16 - Hub ConnectionFollowing on from the first post about Oracle Policy Automation and Siebel Innovation Pack 16 a few days ago, this post continues with a series of (hopefully) useful videos about the next steps. Last time, you had just built your Connection in the Oracle Policy Automation Hub and had checked to see if the green light came  on. In the video sequence today, you will test both of the design time methods (CheckAlive and GetMetadata) in your SOAP UI testing tool to ensure that you get something like the correct response.

Testing in SOAP UI can be very frustrating at first. You take the time to download the WSDL from Siebel Enterprise and import it into SOAP UI, fully expecting to work with it immediately. But there are a few traps. Firstly, the need to (unless you have switched off the requirement in the Oracle Policy Automation Hub, which would be very unwise in most circumstances) add wsse tags to the Header and provide a user name and password. Secondly, you may (probably) need to remove some extraneous tags on the SOAP Request, and finally if your Siebel environment is not up and running and the relevant Workflow Processes are not active, you won’t get much in the way of feedback :).

Presentation

In this brief overview, we talk about the different big-picture steps to set up communication and how to go about it.

Setting Up a Connection for Oracle Policy Automation and Siebel Innovation Pack 16

In this part you walk through the practical steps to build a Connection, add or import the different Workflow Processes and Inbound Web Services to implement the first two operations and get ready to test them.

Build CheckAlive and GetMetaData Operations

This video walks through the technical steps in Oracle Policy Automation, Siebel CRM and SOAP UI to build these two operations according to the White Paper.

Next…

In the next few days, the Load and Submit operations, the core of the integration, will be worked through and examined in Siebel and Oracle Policy Automation terms.

Getting Started with Oracle Policy Automation 20018 Edition

Snap Poll : Training – 1 Question, 30 Seconds and a Chance to Win

Snap Poll : Training – 1 Question, 30 Seconds and a Chance to Win

As you all know, the OPA Hub Website tries to provide content and services that meet the needs of all of us who are working with Oracle Policy Automation, and probably Oracle Service Cloud or Oracle Siebel CRM on a day-to-day basis. One of the areas we have been looking at with our partners and content providers is the subject of training. We have a number of different training projects in the pipeline. But read on to find out about our Snap Poll : Training – 1 Question, 30 Seconds and a Chance to Win…

Some of the training we already provide has met with good feedback and seems to fill a gap left by the official training provider. However, we are always eager to find out more. That is why this post contains a snap poll : it is so easy to answer the question it will take you all of 30 seconds. You can register your vote using either an anonymous vote or if you use your OPA Hub Website login you will automatically be entered into a draw to receive a free copy of the Getting Started with Oracle Policy Automation 2018 Edition.

Snap Poll : Training - 1 Question, 30 Seconds and a Chance to Win

This book is so new it is not even in the shops yet, I have just received the first copy from the printers so it is fresh as fresh can be. The book can therefore be yours just for entering our Snap Poll : Training – 1 Question, 30 Seconds and a Chance to Win!

Thank you to everyone who takes part in the spirit of sharing your opinion. The data will be reviewed on the OPA Hub and will be completely anonymised. The name of the voters will only be used to ascertain the winner of the free copy of the book!

What kind of advanced OPA training would you be interested in attending?

Oracle Policy Automation / Siebel : Live Classes in Toronto in February

Oracle Policy Automation / Siebel : Live Classes in Toronto in February

Oracle Policy Automation / Siebel : Live Classes in Toronto in February Update : thank you so much for giving me the opportunity to return to Toronto and deliver Oracle Policy Automation training. It was tremendous fun and I hope everyone had a good time. [16/2/18]

I wanted to tell you about the following events that I am hoping to run as in-class sessions in Toronto. Our friends at DesTech Toronto are hosting the following training events in February. I’ll be delivering them both so I would be very happy to see my Canadian colleagues and friends for these training sessions. Here are the details of the Oracle Policy Automation / Siebel : Live Classes in Toronto in February 2018:

Both of these need just a few more enrolments to confirm they will happen. I figure that a live class with a live instructor will be more effective for OPA customers and colleagues, as opposed to a virtual class. I’m happy to chat about OPA, OSVC, Siebel or anything else (ERP, AI, Bots 🙂 )

If you would like to enrol anyone on these courses, please let Patrice Brown pbrown@destech.com know urgently. I’m counting on you to spread the word!

PS : Every student will get a free copy of my Getting Started with Oracle Policy Automation [2018 Edition] with my compliments. That’s a CAD 65 gift for each attendee.