Welcome to the OPA Hub!


Archives

Certification Workshop Example

Oracle Policy Automation Cloud 2019 Certification #2

Oracle Policy Automation Cloud 2019 Certification #2

I don’t normally comment on certification examinations – I don’t really feel that a website like this should focus on getting people certified – sure, we can help you prepare and give you lots of fun things to do while you get ready. But we are never going to be selling “certification dumps” or any nonsense like that. If you cannot prepare for an examination, you shouldn’t be taking it. End of story.

But, since I just took the Oracle Policy Automation Cloud 2019 Certification today, I thought I would give you some heads-up on the kinds of questions that I noticed (and bear in mind, that my memory is not what it used to be). Again, I’m not going to give you the questions, I’m going to give you some pointers as to the kind of question you might see.

Firstly, this is clearly an update of the 2017 Certification, so if you took it and passed, many of the question styles and content will be familiar to you. But the vast majority of them have undergone review, editing and minor changes.

Question Styles That Might Bug You

You need to do X. Place the following things (1-9) in order of doing them to achieve X. If a step is required more than once, only mark the first time the step is used.

The steps are unclear, the answers are unclear, and some of the terminology used is dubious.

You have an entity model X to achieve Y. What kind of relationship is Z?

Beware your terminology – get in your head that it’s asking for a relationship even if the example provided is not obvious.

Which of the following is a good example of the correct phrasing for X

Be very clear about what that question style is asking. Many of them look like they are asking Y but they want X. Re-read the question several times!

Choose four things that are true about X functionality

Some of the examples I saw were completely generic – you know the sort of thing. They ask you about swimming 100 meters, and one of the answers is “a swimming pool is full of water” whilst all the other answers are about breathing, swimming technique, strokes. Watch out for these “sleeping choices”.

Which of the following are incorrect when talking about AND and OR

These questions require a certain amount of time to consider – which ones have the correct combinations of AND, OR, ANY, ALL, BOTH, EITHER and all the other combinations of grouping words. Read it slowly!

Poor Quality Graphics

Aside from these bugbears, the other thing that still annoys me is the quality of the screenshots used. And of course, this is dependent on the software used for the certification examination, I know that. But at least try and give clear, large images without any silly stuff (like the Word examples that have clearly gotten the grammar and spelling check with the blue line underneath the text). It’s a question of quality.

Web Page Not up to date

One thing that bothers me is that the Certification page on the Oracle Website does not specify which version this examination has been validated against. And I saw at least 1 question for which the answer would have been different, depending on the version.

Good Luck!

Good luck to you all. If I have any more thoughts, I’ll let you know. And yes, I did pass :). If you are interested in accelerating your learning, read about our workshops here.

 

Certification Workshop Example

Oracle Policy Automation Cloud 2019 Certification

Oracle Policy Automation Cloud 2019 Certification

I’m not sure if we have mentioned it before, but the latest incarnation of the Oracle Policy Automation Certification (to give it it’s commonly used name) is now live and available as a proctored examination, as well as a remote examination in some jurisdictions. It’s called Oracle Policy Automation Cloud 2019 Implementation Essentials.

The examination has the following characteristics:

  • Format:  Multiple Choice
  • Duration: 120 minutes, 80 questions, 68% passing score
  • Examination Code : 1Z0-1035

It is the gateway to the Oracle Policy Automation Cloud Service 2019 Certified Implementation Specialist certification.

Workshops for Oracle Policy Automation

Now, as many of you know, the OPA Hub Website runs Workshops to help people get to grips with Oracle Policy Automation. If you want to know if a Workshop can help you and your team prepare for the certification examination or indeed just to improve your knowledge of the product, then you can learn about it in the video below which gives you an example.

The three day workshop we describe in the video can be extended to four days, or can include a variety of different content areas which you can read about on the Education page. Of course most of our workshops about Oracle Policy Automation use the book Getting Started with Oracle Policy Automation 2019 edition as their support materials as well as presentations and exercises.

Amazon Availability Issues – Solved

If you have been trying to get a copy of the book and you have noticed that the lead time on Amazon is too long, you can get the book in record time by using our other approved channel, the Book Depository. You can get the Getting Started with Oracle Policy Automation 2019 Edition here, and they ship worldwide. Otherwise you can of course go to the publisher, P8 Tech and order it there.

Prepare and Test Yourself ready for Certification

There are hundreds of questions on this site to help you get ready for certification or an interview. Go and try one of our mini-quizzes or the Prize Quiz, they are all free to enter.

Have a great day and see you soon!

OPA Focus Group in Paris

OPA Focus Group in Paris

And so, on to the second Focus Group of the week. In the middle of a heatwave, I traveled to Paris from my current base in Normandy, avoiding a landslide (which closed the railway line for 2 days just before I took this train, and which delayed my return from Utrecht by 24 hours), and a brush fire (which sent us down a branch line and into the countryside for a nice long delay in the heat) and finally getting to my hotel around midnight instead of 21h00. Let’s hear about the OPA Focus Group in Paris.

Anyway, enough moaning. This was, as far as I know, the first Focus Group in Paris since 2017- so my expectations were high for a good turnout in spite of the heat (quite a few public buildings and schools had already closed). And I was not disappointed.

Lots of Customer Showcases

The morning kicked off with a nice coffee and croissant meet and greet, and the agenda of the morning sessions was a great chance to get to know the customers of the two showcases being presented:

  • PSA (Peugeot/ Citroen / DS) Customer Overview

Everyone knows them, and it was very interesting to hear about their experiences in Oracle Policy Automation. I’ve said this before, but these events are wonderful opportunities to get ahead in the community, but most importantly, a great opportunity to meet like-minded practitioners! The room was filled with a wide variety of customers, partners and even some “not yet customers” – these events are popular because “what’s  said in the room, stays in the room” – so there is no pressure or sales talk.

PSA uses Oracle Service Cloud and Oracle Policy Automation for CX Support (service requests, loyalty, and working with owners of vehicles – Peugeot, Citroen, DS). Perhaps the most interesting part for me was the explanation of the process evolving from Word, letters, paper, stamps, laborious steps involving expensive, manual operations into a simple to use Oracle Policy Automation interview. The return on investment is obvious both for the customer (better service, more reactivity) and for the group.

  • Davin then introduced a variety of use cases from worldwide customers : Dexcom, Ohio Environmental Protection Agency, WestPac, BeachBody, Princes Trust to name a few. Very interesting to see the different business processes.

Davin continued after the break, and presented the future plans for Oracle Policy Automation. As human expectations grow more demanding, Oracle Policy Automation is increasing in power and capability. It is fantastic to see Internet of Things, Service Cloud and Oracle Policy Automation working together.

The detailed part of Davin’s presentation provided lots of information about future plans, and was the subject of many questions from the audience. And me!

  • SACEM Customer Overview

Another excellent customer overview, this time from another business sector entirely : rights management for playing music in bars and restaurants. Wonderful mobile offline demonstration (with a telephone call in the middle, in the mobile device!) with a great user experience.

  • INDRA Customer Overview

Indra is a specialist in vehicle recycling – connecting car dealers with recycling operators and other partners. A very interesting use case, with some complex Oracle Policy Automation rules for calculation of Service Level Agreements, Clauses, Tariffs and assigning a partner, among other things.

OPA Focus Group in Paris

Here are a few photos of the event. Make sure you come to an event near you – this year (there are quite a few still to come!)  or next year!

OPA Focus Group in Paris

Indra

OPA Focus Group in Paris

SACEM

OPA Focus Group in Paris

PSA

 

JavaScript Extension : Geomapping with Leaflet JS

JavaScript Extension : Geomapping with Leaflet JS

Ever since the dawn of time (or at least since the arrival of JavaScript Extensions in Oracle Policy Automation), for whatever reason, the subject of Google Maps (geocoding, reverse geocoding, etc) has been one of the most read and downloaded on this site. But now, given that Google Maps (like Google APIs in general) requires registrations, license keys, and is subject to all sorts of restrictions  and throttling, developers have needed something else to impress their customers and colleagues with eye candy.

Geomapping with Leaflet JS and MapBox

So it’s appropriate therefore that this little post is all about Leaflet JS, “an open-source JavaScript library
for mobile-friendly interactive maps”. The Leaflet JS website is stuffed full of interesting examples and tutorials, so here goes for a short example of using this library in Oracle Policy Automation.

The setup is slightly different than working with Google Maps, but everything starts with the obvious step : download a library! In my case, I downloaded the library and CSS styles and dropped them into the resources folder. The files are tiny.

For the demonstration, my Oracle Policy Automation project contains only a handful of attributes, specifically enough to be able to create an address (street, town, zipcode, country) and a customer name (for a marker on the map).

The second element to handle in your code, is the image tile provider for your map. Working with Leaflet requires two things : Leaflet and a tile provider – in my case mapbox proved to be a good choice. It looks lovely. It requires a registration and access token, but it is very easy to obtain and you can try for free. Leaflet is entirely agnostic however, so if you want to use another tiling source, you can.

Apart from these steps, most of the code looks familiar : get the attribute values, pass them to the geocoding engine and then extract the latitude and longitude from the returned JSON object. Once you have that information,we use onreadystatechange to check that the page is loaded, and then draw the map, using latitude and longitude, and drop a custom marker at the location with a shadow and a popup window associated with the marker.

Because this is based on OpenStreetMap, we need to be good citizens and ensure we give credit where credit is due. Let’s look at a simple example:

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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/**
 * Richard Napier The OPA Hub Website June 2019
 * Educational Example of Custom Label with Leaflet JS and MapBox
 * I will remember this is for demonstration purposes only
 */
OraclePolicyAutomation.AddExtension({
	customLabel: function (control, interview) {
 
		if (control.getProperty("name") == "xMap") {
			return {
				mount: function (el) {
 
					// Add CSS First
					var head = document.getElementsByTagName('head')[0];
					var linkcss = document.createElement('link');
					linkcss.id = "leafletcss";
					linkcss.rel = 'stylesheet';
					linkcss.type = 'text/css';
					linkcss.href = '${resources-root}/leaflet.css';
					linkcss.setAttribute('crossorigin', "anonymous");
					head.appendChild(linkcss);
					var div = document.createElement("div");
					div.id = "lblmap";
					div.style.visibility = 'visible';
					div.style.height = '370px';
					div.style.width = '400px';
					el.appendChild(div);
 
					var street = interview.getValue("street");
					var city = interview.getValue("city");
					var zip = interview.getValue("zip");
					var country = interview.getValue("country");
					var customer = interview.getValue("customer");
					var latitude;
					var longitude;
					var uri = street + "," + city + "," + zip + "," + country;
					var res = encodeURI(uri);
					var root = "https://api.mapbox.com/geocoding/v5/mapbox.places/" + res + ".json?access_token=pXXX";
 
					$.ajax({
						url: root,
						method: "GET",
						async: false,
						dataType: 'json'
					}).then(function (data) {
						//console.log("Cleaning Up Response");
						//for (var key in data.features) {
						if (data.features[0]) {
							var val = data.features[0];
							longitude = val.center[0];
							latitude = val.center[1];
							//console.log(" Returned " + latitude + " " + longitude);
							$.getScript("${resources-root}/leaflet.js", function () {
 
								//console.log("Script loaded");
								window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
									console.log('Error: ' + errorMsg + ' Script: ' + url + ' Line: ' + lineNumber
										 + ' Column: ' + column + ' StackTrace: ' + errorObj);
								}
 
								//console.log(document.readyState);
								//console.log(latitude + " " + longitude);
								//	document.onreadystatechange  = function () {
								//console.log("ReadyState Change Event");
								if (document.readyState === "complete") {
									//console.log("ReadyState is Complete");
									var siteIcon = L.icon({
											iconUrl: '${resources-root}/images/Logo_Marker.png',
											shadowUrl: '${resources-root}/images/Logo_Marker_Shadow.png',
											iconSize: [30, 40],
											shadowSize: [30, 40],
											iconAnchor: [0, 40],
											shadowAnchor: [0, 38],
											popupAnchor: [15, -20]
										});
									var myLatLng = new L.LatLng(latitude, longitude);
									var mymap = L.map('lblmap').setView(myLatLng, 13);
									L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
										attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
										maxZoom: 18,
										id: 'mapbox.streets',
										accessToken: 'pk.eyJ1IjoidGhlb3BhaHViIiwiYSI6ImNqdDJ3Y2liNDFvMjE0M3BpampzOG16cDYifQ.0ppcKabM2WhuaPT-kCGwYw'
									}).addTo(mymap);
 
									var marker = L.marker(new L.LatLng(latitude, longitude), {
											icon: siteIcon
										}).addTo(mymap);
									marker.bindPopup(customer + " is based here.");
								};
 
 
 
							});
						}
 
 
					});
 
					// Assumes JS is loaded
 
				},
				unmount: function (el) {
					if (control.getProperty("name") == "xMap") {
 
						 var myMap = document.getElementById("lblmap");
                        myMap.parentNode.removeChild(myMap);
 
 
					}
 
				}
 
			}
 
		}
 
	}
})

Lines 0-40 : Pretty standard stuff, setting up the CSS file and the encoded URL for the REST call which will get us the latitude and longitude.
Lines 41- 52 : Used to call the service and get / parse the response, giving us the latitude and longitude
Lines 53 – 64 : We need to be sure that we wait until the leaflet JavaScript file is loaded before doing anything else
Lines 67 – 75 : Set up a Custom Marker
Lines 77 – 83 : Add a Map Layer and Credits
Lines 84 – 87 : Add a Marker using a custom image and shadow
Lines 85 – 88 : Add a Popup to the Marker click, and use some Oracle Policy Automation data in the popup.

The rest is just clean-up and go home (the unmount).

Geomapping with Leaflet JS : The Result

The end result is a nicely presented map, with a marker at the correct address, and a cute popup window when the marker is clicked.

Geomapping with Leaflet JS MapBox Example

We’ll see what else we can do with this nice alternative library in the coming weeks. In the meantime, you will find the sample Project in the OPA Hub Shop.

Another Winner of our OPA Prize Quiz

Another Winner of our OPA Prize Quiz!

And so we come to the end of the latest Prize Quiz run – the winner is Akshaya Pradeep S, with a score of 76%. Akshaya currently works for Speridian Technologies, a long-time Oracle Policy Automation powerhouse. That means that our first two winners come from the same company – so where are all the other Oracle Policy Automation experts then?

If you are interested in taking part (it’s completely free and quite fun, with no pressure), then you can head over to the Quiz right now. Remember that for your colleagues who might not be ready for the big quiz, there are a variety of smaller quizzes which are useful if you are preparing for an interview or a certification examination.

Congratulations

In the meantime though, we invite Akshaya to come forward and give us the necessary information (shipping address and t-shirt size) so that we can send off the prize of the official OPA Hub T-Shirt. As a special extra prize as well as the t-shirt we are adding an OPA Hub 16Gb USB Memory Stick.

OPA Prize QuizThe Prize Quiz will go offline for a few weeks as we will now add more questions to ensure that it does not get too stale or easy. We want to keep it fun as well as educational.

As usual if you have any ideas for quizzes or other interactive features for the OPA Hub Website we are always very happy to hear from you – just leave a comment below, or contact us via LinkedIn. We would be particularly interested to hear from you if you have subjects you would like the OPA Hub Website to look at in more detail, in our articles or other areas.

Thanks to Zazzle for hosting our shop! Have a great day!

Stunning Infographics with Oracle Policy Automation and Easelly #3

Stunning Infographics with Oracle Policy Automation and Easelly #3

The final part of this series is not really focused on Oracle Policy Automation, instead I am simply going to highlight to you just how easy it is to work with Easelly to integrate with it. In the previous part we looked at the brief piece of PHP that we used as a sample integration.

First, let’s look at the overall drawing interface of Easelly. Building a visual representation of your information is really easy:

As you saw in the short video, the tagging feature of Easelly is how you can integrate your Oracle Policy Automation attribute names and therefore use the power of Easelly to visualize your data.

Oracle Policy Automation and Easelly

For example, here is the infographic connected to the example project shown in the first part of the series.

Once the initial work is done to establish the integration, then we can easily (Pun intended) change the layout of the infographic, move elements, change fonts and so on without ever going to make any changes in Oracle Policy Automation.

Oracle Policy Automation and Easelly

The integration example is available in the OPA Hub Shop, and is completely for educational purposes only. I chose the PHP Custom Control as a way to accelerate my demonstration from an organizational point of view  – I was able to avoid Cross ORigin Scripting challenges. The Oracle Policy Automation platform has the advantage of handling both JavaScript and PHP for custom labels (and the link on the demonstration page is just a Custom Label).

Summary

The Easelly team have been very helpful in letting me build this integration demonstration – I encourage everyone to check out the product at Easel.ly and to reach out to me or someone else here at the OPA Hub Website if you want to take it a bit further!

Stunning Infographics with Oracle Policy Automation and Easelly #2

Stunning Infographics with Oracle Policy Automation and Easelly #2

So, in this part of the series we will look at how to integrate Easelly with Oracle Policy Automation. For this integration demonstration we chose to use the older Custom Control concept. In today’s Oracle Policy Automation, most of the customization of the user experience is driven through the JavaScript Extensions – which we regularly demonstrate on this site. But there are situations where the Custom Control concept from pre-August 2016 versions is still a good choice. In this case, we need a Custom Label, with a link. But the link is to be displayed once the server-side has generated a PDF file. So it is a good choice. For the language, PHP is easy to use, has thousands of examples, and can handle both XML and JSON.

Let’s look at the code then walk through it step by step. The code is also in the shop, for free, because this code viewer does not do a very good job of handling all the characters in the 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Copyright The OPA Hub Website 2019
// For entertainment and education purposes only
// Example step by step PHP Custom Control and integration with Easelly Infographic
// Requires Easelly API Key 
// Thanks to Johanna and Vernon at Easelly easel.ly
 
//Set up a few key variables
$url = "https://www.easel.ly/pages/generatePDF";
// This is your API Key
$api_key = "XXXXXXX";
// This is the URL of your base infographic in Easelly
$canvas_id = "https://XXXX/easel.ly/all_easels/XXX/XXX";
 
// OPA data is passed into the PHP file as a  urlencoded XML post header. Decode it
$myOPAData = $_POST["opa-session"];
$decodedOPA =  urldecode ($myOPAData);
 
// Now we can manipulate it as XML
$final = new SimpleXMLElement($decodedOPA);
 
// Get the XML Nodes that represent our OPA Attributes using XPath queries
 
$account_name = $final-&gt;xpath("//*[@id='account_name']");
$product_one_name = $final-&gt;xpath("//*[@id='product_one_name']");
$product_one_avail = $final-&gt;xpath("//*[@id='product_one_avail']");
$product_one_margin = $final-&gt;xpath("//*[@id='product_one_margin']");
$product_one_trans_lost = $final-&gt;xpath("//*[@id='product_one_trans_lost']");
 
// Get Text of each OPA Attribute 
 
$account_name  = strip_tags($account_name[0]-&gt;asXML());
// Some Product Names have &amp; in them so convert the characters properly
$product_one_name  = htmlspecialchars_decode ((strip_tags($product_one_name[0]-&gt;asXML())));
$product_one_avail  = strip_tags($product_one_avail[0]-&gt;asXML()) . "%";
$product_one_margin  = strip_tags($product_one_margin[0]-&gt;asXML());
$product_one_trans_lost  = strip_tags($product_one_trans_lost[0]-&gt;asXML());
 
// Build Object Array for the Easelly REST API. Each object represents an Easelly tagged item, mapped to an OPA attribute.
 
$myJSONdata = new stdClass();
$myJSONdata-&gt;id = "https://s3.amazonaws.com/easel.ly/all_easels/706616/SwanFoodsExample";
$myJSONdata-&gt;objects = array();
 
$myobjectfinal = new stdClass();
$myobjectfinal-&gt;tag = "account_name";
$myobjectfinal-&gt;type = "textbox";
$myobjectfinal-&gt;text = $account_name;
$myobjectfinal-&gt;fill = "#f9d423";
 
array_push($myJSONdata-&gt;objects, $myobjectfinal);
 
$myobjectfinal = new stdClass();
$myobjectfinal-&gt;tag = "product_one_name";
$myobjectfinal-&gt;type = "textbox";
$myobjectfinal-&gt;text = $product_one_name;
$myobjectfinal-&gt;fill = "#6bb38e";
 
array_push($myJSONdata-&gt;objects, $myobjectfinal);
 
$myobjectfinal = new stdClass();
$myobjectfinal-&gt;tag = "product_one_avail";
$myobjectfinal-&gt;type = "textbox";
$myobjectfinal-&gt;text = $product_one_avail;
$myobjectfinal-&gt;fill = "#f9d423";
 
array_push($myJSONdata-&gt;objects, $myobjectfinal);
 
$myobjectfinal = new stdClass();
$myobjectfinal-&gt;tag = "product_one_margin";
$myobjectfinal-&gt;type = "textbox";
$myobjectfinal-&gt;text = $product_one_margin;
$myobjectfinal-&gt;fill = "#ffffff";
 
array_push($myJSONdata-&gt;objects, $myobjectfinal);
 
$myobjectfinal = new stdClass();
$myobjectfinal-&gt;tag = "product_one_trans_lost";
$myobjectfinal-&gt;type = "textbox";
$myobjectfinal-&gt;text = $product_one_trans_lost;
$myobjectfinal-&gt;fill = "#ffffff";
 
array_push($myJSONdata-&gt;objects, $myobjectfinal);
 
// Convert the Object to JSON
 
$myJSONdataobject = json_encode($myJSONdata);
 
//Call Easelly with our JSON Object and Get Response
 
$context = stream_context_create(array(
			'http' =&gt; array(
				'method' =&gt; 'POST',
				'header' =&gt; "apiKey: {$api_key}\r\n".
				"Content-Type: application/json\r\n",
				"Accept' : application/json\r\n",
				'content' =&gt; $myJSONdataobject)));
$response = file_get_contents($url, FALSE, $context);
 
// Check Output
 
if ($response === FALSE) {
	echo("\r\n");
	die('An Error Occurred');
}
// Use a timestamp as the filename
$time = time();
$fileoutputname = $time . ".pdf";
file_put_contents($fileoutputname , $response);
 
// Show the Link to the User for clicking to access the generated file
?&gt;
&lt;a target="_blank" href="https://theopahub.com/main/external/&lt;?php echo $fileoutputname ?&gt;"
&gt;Click Here&lt;/a&gt;

Walk Through

The code has been broken down into it’s constituent parts – for learning purposes. Of course there are many areas that would be rewritten in a professional example, but this will help non-coders understand what is going on.

  • 1-15, Set up some basic stuff like the URL to your infographic. In the final part of this series, I’ll show you how to build a graphic and tag it correctly with the OPA attribute.
  • 17-25 The Oracle Policy Automation Custom Control integration passes the session data (your attributes and their values) into the PHP page as a series of XML nodes. So we need to get that XML and make sure we can read the parts we are interested in.
  • 29-25 We strip the attribute values out of the XML, and in one case, because the OPA attributes contain special characters like “&” we make sure they display properly.
  • 38-80 Overly simplified for the purposes of demonstration, we build a JSON object using standard objects and arrays, to create the JSON structure that Easelly is looking for. In the next part of this series I will show you where to get it.
  • 84 Convert the Object into a JSON Object
  • 88-106 Call Easelly with our API Key and JSON Object
  • 107 – End Process the output and draw the link for the user

Summary

Oracle Policy Automation and Easelly

So you can see the integration is fairly simple in this case – the PDF is generated before the user reaches the link, so the link should respond straight away. And we chose PDF but Easelly also can generate PNG for example, if you wanted to embed it directly as an image.

In the third part of this series, we will show you how to get Easelly to tag your infographic so you can use it in an Oracle Policy Automation integration.

Stunning Infographics with Oracle Policy Automation and Easelly #1

Stunning Infographics with Oracle Policy Automation and Easelly

Oracle Policy Automation and Easelly : Once in a while I come across something in the Oracle Policy Automation universe that just makes me go “Wow!!!”. And today’s post is like that. I was working on a demonstration the other day of a fairly familiar concept : a  retail audit or “store visit”.

Visits to retailers, whatever product you are selling, are pretty often rushed affairs, probably squeezed in a back room or just hunkering down on the corner of a work surface for a few minutes. It’s in the middle of the day, there are customers coming in and in spite of cordial relations, the retailer would really much rather be doing their job. And chances are, there are another 3 or 4 people coming in later to do the same thing as you.

Oracle Policy Automation is a real benefit in situations like this – you can perform what-ifs, demonstrate how the retailer is performing, simulate new scenarios to encourage and engage with them.

But when you’re fighting to get focus, and the room is airless and hot, you really need to be able to bring your A game. I’ve watched some amazing people doing this job, and they really impress how much they pack into the short time they are on the premises. But when they are gone, their message sometimes gets forgotten, mis-remembered or filed away. I started thinking how  Oracle Policy Automation could really leave a mark.

My first thoughts were to Oracle BI Publisher for a take-away or handout, and there are some excellent demonstrations out there, including in the Sample Projects (Healthy Eating). But I was still left wondering as to what might be a better solution. BI Publisher is in this case let down by it’s basic format and premise – Word. It is too linear, static and inflexible. You don’t use Word to create the most modern, web-friendly and engaging support materials. Then I had a bit of a brainwave.

Stunning Infographics with Oracle Policy Automation and Easelly

For a number of years I have been a user of Easelly – an online Infographics design platform. I’ve had great fun with it, using it to show results of surveys and I use their templates quite a lot when I need a framework for a new graphic. I’m not a designer, but I’m pleased with the easy learning curve and the results.

Recently Easelly have started offering a REST API to their “pro users”. And this allows for the generation of PDF or PNG content on the fly. For example, you have data in Oracle Policy Automation and you insert it on the fly into your best infographic. Send it by mail, print it before you visit – it doesn’t matter how you do it but you will definitely want to get this in front of your customer. Pro accoun

Oracle Policy Automation and Easelly

ts are not expensive – $24 US Dollar a year.

Here is an example, with an infographic designed by Easelly. You can see it on the right hand side of the page. I think you would agree that something like that could be done in BI Publisher, but not without a very robust skill set. With Easelly however, a tool built for infographics, it is considerably simpler. Please note : I’ve used the Easelly platform since it was launched, and I like to think I know BI Publisher quite well. So I can compare the two fairly objectively – and for modern infographics, the learning curve and capabilities of Easelly mean I would choose it every time.

Custom Control and REST API Integration

And here is the video that shows it being generated live in Oracle Policy Automation. That’s what I can a showstopper graphic. The great thing is, with the Oracle Policy Automation Custom Control concept , adding this to the Interview is a matter of minutes.

The data, the labels – all that is coming from Oracle Policy Automation much in the same way as for BI Publisher and Forms. Only way better looking!  In the next article in this series I’ll show you how to integrate Oracle Policy Automation with Easelly using, in this case, a PHP-based Custom Label Control.

What's new in Oracle Policy Automation 19B

Whats New in Oracle Policy Automation 19B

Whats New in Oracle Policy Automation 19B

It’s here! The latest version of Oracle Policy Automation for Private Cloud is now available for download from edelivery software cloud (or whatever it is called now). Whats New in Oracle Policy Automation 19B?

Whats New in Oracle Policy Automation 19B

Here are some of the highlights of this version.

The New Value() Function

The new function makes it possible to retrieve the language dependent values of a Value List with ease. Consider the following Value List in 19B:

Whats New in Oracle Policy Automation 19B - Value()

And consider the following rules in a Word document:

What's new in Oracle Policy Automation 19B

The first line will return  the value, and the second line will return the text of the title. We can now return the actual value as well as the text, reliably.

New Deployment Functionality in REST

If you are a REST user in the administrative area, two new elements have been added to the deployment resources – locale and urlParameters. You can now get these in your REST calls.

More Extension Capabilities

If you are working in complex JavaScript extensions, then the following will be of use to you. Now you can retrieve more information about the underlying definition of the fullCustomInput Control extension:

  • getQuestionLayout()
  • getSideQuestionWidth()
  • getMultiLineTextRows()

All of these refer to Styles settings that the designer might have implemented on the original Control so that you can pick them up and work with them in your JavaScript code.

API Warnings

If you created a static metadata connection a long time ago, or built a connector which is long in the tooth, you will now see warnings to remind you to upgrade the connector or risk being caught out by a version which will no longer be supported.

Chat API New Features

The Chat API has moved swiftly since it’s inception just a few months ago. Now we have better input options for users who need to select something, we also have document (attachment) storage capability both in Oracle Service Cloud and other connections, and better access to Chat data.

New UI Language

To my friends in Budapest – the Hungarian UI for Oracle Policy Modeling and Oracle Policy Automation Hub has been released. No parser so far, but at least you can build a custom language and work in Hungarian menus!

Office Support

Office 2019 is now supported and certified.

Summary Whats New in Oracle Policy Automation 19B

What’s New in Oracle Policy Automation 19B – lots of things! Hopefully you (and I) will learn more about these in the Oracle Policy Automation Focus Groups around the world. See you there!

Importing Data into an Interview : Excel Example

Importing Data into an Interview : Excel Example

Readers will remember a while ago I explained briefly how to use Microsoft Excel to act as a Connection Datasource – in this overview article, followed by this one in a little more detail. Now we look at another challenge : Importing Data into an Interview.

Well, here comes another example of the ubiquitous nature of Microsoft Excel. The customer requirement was as follows:

Using a simple mechanism, let the user upload an existing Excel spreadsheet into the Interview. Parse the spreadsheet, read the data in it, create corresponding rows in an Entity. Let the user review the data but do not require any new data entry. There may be up to 250 rows of data to import. So how do you go about about Importing Data into an Interview?

So how can we face up to a challenge like that? We need:

  • An upload that isn’t a standard File Upload Group
  • A parsing mechanism to read Excel and extract the data in a given tab, or wherever
  • A custom Entity Collect to handle the data import / create the rows in a Screen

The shopping list above isn’t that long.

The File Upload is essentially an HTML 5 component to let the user select a file on their computer. We cannot access an arbitrary local path from JavaScript, so we need the user to point to the file they want to upload.

There are a number of JavaScript-based Excel parsers, including the excellent SheetJS js-xlsx which we used. It is capable of converting to and from Excel, which is no easy task when you consider that an Excel file is basically a Zip file with a bunch of complicated stuff inside it. The library can convert to HTML, CSV and magically (for our requirement) JSON. Awesome!

Plus, in a previous post we’ve also looked at the (large amount of) work required to build a Custom Entity Collect Extension. In fact when I was writing that article I was thinking, for goodness sake Richard, when do you think you will actually need to go to the trouble of building that Entity Collect Extension? Well, I’ve finally found a use for it – Importing Data into an Interview!

We need an Entity Collect Extension since we need some way of getting the Excel data into the Entity Collect, which ultimately means we need to do some work behind the scenes between the import of the data and the display of the Entity Collect. We need to rewire the Entity Collect temporarily so that it sucks our Excel data up, before we show it to the user so they can examine the results.

For the purposes of a raw demo, I unplugged all the other functionality (delete buttons, add buttons, etc.) and just concentrated on getting the data into the Entity Collect. There are how ever a few caveats. Once you get into the larger imports, at least in the Debugger, you can expect to see “concurrent record editing” errors. I’m trying to find out what the limit is exactly. But up to a few hundred I think it’s OK.

So let’s look at the items in turn.

File Upload and Data Load

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
{
					//console.log("Starting customInput Mount");
					var div = document.createElement("input");
					div.id = "myFile";
					div.type = "File";
					//div.value = control.getValue();
					el.appendChild(div);
 
					function handleFile(e) {
						var files = e.target.files,
						f = files[0];
						var reader = new FileReader();
						reader.onload = function (e) {
							var data = new Uint8Array(e.target.result);
							//console.log("In Change");
							var workbook = XLSX.read(data, {
									type: 'array'
								});
 
							worksheet = workbook.Sheets["YOURWORKSHEET"];
							jsonoutput = XLSX.utils.sheet_to_json(worksheet, {
						raw: true, header : 1
							});
						//console.log("Read " + jsonoutput );
						};
 
						reader.readAsArrayBuffer(f);	
						var completepath = $(':file').val();
							//console.log(completepath);
						interview.setInputValue("rest_filenameandpath", completepath);
					}
 
 
				var filedialog = document.getElementById("myFile");
					filedialog.addEventListener('change', handleFile, false);
 
					var completepath = $(':file').val();
						control.setValue(completepath);
						//console.log("Hello " + completepath);
						//console.log("Ending customInput Mount");
				}

Assuming you have a custom Input framework as your starting point, the above code will be in the mount. This will build an HTML5 file upload control, and attach an event handler. The code regarding Excel depends upon xlsx.full.min.js being in the resources directory. But that’s it. You’ve loaded the Excel file into a JSON object.

Entity Collect

The next step is to include a Custom Entity Collect in your project, and use the jsonoutput object (which you just created from the imported file above) in the mount of the Entity Collect to load the JSON into the Entity Collect. The following is an extract from the mount code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var numEntities = Object.size(jsonoutput);
					//console.log(numEntities);
					// Remove header row if the file has one
					jsonoutput.shift();
					// load records into the Entity Collect
 
					if (control.getRows() == 0) {
						for (j = 0; j &lt; numEntities - 1; j++) {
							control.addNewRow();
							var mycurrentrecords = control.getRows();
							mycurrentrecords[j][0].setValue(jsonoutput[j][0]);
							mycurrentrecords[j][1].setValue(jsonoutput[j][1]);
							mycurrentrecords[j][2].setValue(jsonoutput[j][2]);
							mycurrentrecords[j][3].setValue(jsonoutput[j][3])
drawrows();

The end result is something like this:

Importing Data into an Interview

The File is loaded into the Entity Collect, and the contents displayed to the user. In my case I unhooked all the code related to modification (the onchange stuff from the original idea) and removed the add / delete buttons, since it was designed to just allow the user to see the loaded result, not modify it.

Importing Data into an Interview

If you want to have a look at the project, just download the very basic example here.