Tag: Oracle Policy Automation

Continuous Delivery – OPA and Postman, Newman and Jenkins #3

Continuous Development – OPA and Postman, Newman and Jenkins #3

Following on from the two previous episodes, (part one / part two) the stage is almost set to move to automation over and above the simple concept of a Postman Collection. In this chapter we will see how to use data files in Postman to facilitate making use of CSV or JSON data in a dynamic way, and we will get Newman up and running. So let’s start with the first element.

In our Collection, we currently have one request which is sending information to OPA and getting a journey time and plan back in response. Great. But we want to test our journey planner with more than one journey. And we want to be able to easily change the journeys without having to mess with our request. So this is where the ability to load data into a Collection from a text (CSV or JSON) file comes in very handy in deed. In pictures

  • Create a CSV file with your data in it. For the project used in this example we would need to have something like this

Collection Data File

Notice the headers are origin and destination. They will become variables that we need to add to our request.

  • Make sure that the request is updated

So now my request looks like this:

Request Modified

Don’t forget to save your request. Now if you go to Collection Runner and run your Collection, you can use the Select File button and select your file:

Using a Data File in Postman

As soon as you select the file, you will see that the number of iterations changes to take into account all the rows in your file. Now when you want to push a new set of journey tests all you need is to change that file. Awesome!

Armed with all of this, we can now move to the next challenge. Postman is great but not everyone wants to use the graphical user interface all the time. How about the ability to run a Collection from the command line? That would be great AND would open up lots of options to running Windows Scripts and the like. Well, the news is good. Newman is the CLI (Command Line Interface) for Postman. Setting it up if you are not familiar with Node.js can be a bit daunting, but let’s just make a shopping list first:

  1. Install Node.js (here)
  2. Install Newman using the Node Package Manager
    This step should be as easy as opening the Node Command Prompt (which got installed in your Windows Start Menu in the first part) and typing something like the following:

    Installing Newman

  3. Run Newman from the Node.js prompt to use Postman Runner with your chosen Collection and Data File using the ultra simple command line.

So the last step might look a little like the following – notice that in the command line you specify the Collection (which you must first export to a file from inside Postman) and the Data File (wherever it is – I put both files in the same location for ease of use. And once the job is done, Newman reports back with it’s own inimitable, Teletext-style display of the output. A word of advice – before exporting a Collection make sure you have saved all the recent changes!

Exporting Ready for Newman


Once the Collection is exported, you might run it like this. This is just a simple example. It is possible to also load environment variables and more to fine tune it.

Newman Command Line

After a few seconds we get the output from Newman. Note the 4 iterations, and that iteration 3 failed due to an excessively long journey time.

Newman Output in Teletext

Now this is of course a major step forward – running Collections from the command line, feeding in data sets just by using a simple command line switch – these features mean we can really now start to think of automation in our approach to testing this project. But we are not done yet. The output from Newman is pretty ugly and we need to change that. By installing Newman HTML Reporter, we can get a much nicer file. Follow the steps in the link and then change your example command line to something like this:

Note the new command line option -r html (which means, use the HTML reporter) and the –reporter-html-export option (with two dashes) which ensures the output file is stored in the folder of my choice. And the HTML output is so much better:

Newman HTML Reporter

What a nice document. So far so good. We can spin these collections with just a command line. But wait a minute, what about running tests when you are not in the office – sure, you could write yourself some sort of Powershell Script in Windows. But what if you wanted to run a set of tests every day at 3pm, then again on Tuesdays, then once on the first Monday of every second month…it would get quite hard. And what if you wanted to send the HTML Report automatically to all your colleagues on the testing team…but only if there were failures?

And so, we march onward to the next phase. See you shortly!

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.


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


OPA Focus Group in Paris


OPA Focus Group in Paris



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.

// 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->xpath("//*[@id='account_name']");
$product_one_name = $final->xpath("//*[@id='product_one_name']");
$product_one_avail = $final->xpath("//*[@id='product_one_avail']");
$product_one_margin = $final->xpath("//*[@id='product_one_margin']");
$product_one_trans_lost = $final->xpath("//*[@id='product_one_trans_lost']");

// Get Text of each OPA Attribute 

$account_name  = strip_tags($account_name[0]->asXML());
// Some Product Names have & in them so convert the characters properly
$product_one_name  = htmlspecialchars_decode ((strip_tags($product_one_name[0]->asXML())));
$product_one_avail  = strip_tags($product_one_avail[0]->asXML()) . "%";
$product_one_margin  = strip_tags($product_one_margin[0]->asXML());
$product_one_trans_lost  = strip_tags($product_one_trans_lost[0]->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->id = "https://s3.amazonaws.com/easel.ly/all_easels/706616/SwanFoodsExample";
$myJSONdata->objects = array();

$myobjectfinal = new stdClass();
$myobjectfinal->tag = "account_name";
$myobjectfinal->type = "textbox";
$myobjectfinal->text = $account_name;
$myobjectfinal->fill = "#f9d423";

array_push($myJSONdata->objects, $myobjectfinal);

$myobjectfinal = new stdClass();
$myobjectfinal->tag = "product_one_name";
$myobjectfinal->type = "textbox";
$myobjectfinal->text = $product_one_name;
$myobjectfinal->fill = "#6bb38e";

array_push($myJSONdata->objects, $myobjectfinal);

$myobjectfinal = new stdClass();
$myobjectfinal->tag = "product_one_avail";
$myobjectfinal->type = "textbox";
$myobjectfinal->text = $product_one_avail;
$myobjectfinal->fill = "#f9d423";

array_push($myJSONdata->objects, $myobjectfinal);

$myobjectfinal = new stdClass();
$myobjectfinal->tag = "product_one_margin";
$myobjectfinal->type = "textbox";
$myobjectfinal->text = $product_one_margin;
$myobjectfinal->fill = "#ffffff";

array_push($myJSONdata->objects, $myobjectfinal);

$myobjectfinal = new stdClass();
$myobjectfinal->tag = "product_one_trans_lost";
$myobjectfinal->type = "textbox";
$myobjectfinal->text = $product_one_trans_lost;
$myobjectfinal->fill = "#ffffff";

array_push($myJSONdata->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' => array(
				'method' => 'POST',
				'header' => "apiKey: {$api_key}\r\n".
				"Content-Type: application/json\r\n",
				"Accept' : application/json\r\n",
				'content' => $myJSONdataobject)));
$response = file_get_contents($url, FALSE, $context);

// Check Output

if ($response === FALSE) {
	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
<a target="_blank" href="https://theopahub.com/main/external/<?php echo $fileoutputname ?>"
>Click Here</a>

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


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.

OPA Entity Model Viewer 1.0

OPA Entity Model Viewer 1.0

Edit : 5/5/19 updated version available (see Shop for details)

As many readers will know, I was a fan of the Oracle Policy Automation 10 feature which allowed you to visualise the entity model of your Project:

OPA Entity Model Viewer

A while ago I wrote about an idea I had, to use the same library (Mindfusion Diagrams for Windows) to build something like it. Since the advent of version 12, the way the data model is stored as changed somewhat and for various reasons, this feature is no longer in Oracle Policy Automation 12. And I think that is a shame. So I decided to keep going with the idea, and the result is the small application which I would like people to download and tell me if it works for them.

It is a ClickOnce application, that is easy to download and install. It runs by letting the user view the contents of projectDatamodel.xml (which contains most, but not all, of the interesting bits of your data model.

It has various features. It can let you see the entire data model, including enumerations, and links:

OPA Entity Model Viewer

It also allows you to view the enumerations (value lists) associated with entity attributes:

OPA Entity Model Viewer

You can see in the above picture that it also shows public names for attributes  – great for finding those you have forgotten about. You can move the items around the page, zoom in and out, even just play with the layout until it is perfect. Some of the larger entity models might need a bit of moving around!

You can contract and expand all the entities if they are taking up too much space. You can also add the hidden upload pseudo-attributes to your diagram, if you are using the new Upload Group feature introduced recently:

OPA Entity Model Viewer

You can of course print the output – to any printer or PDF generator. And you can save it as an SVG which is good for embedding in other programs.

OPA Entity Model Viewer

There are a bunch of preferences, including the colors used for the diagram. Some of the more interesting options don’t actually do anything yet.

OPA Entity Model Viewer

So, what am I getting at? Well, I’ve tested it on a bunch of 18D and 19A projects including the sample projects and some of my own. They all seem to work reasonably well. But of course, it only will be when lots of people test it, that I’ll know of any weirdnesses. And heaven knows, there will be plenty. I’m just a recreational coder, so I’m not looking for a sellable product. But if I can get rid of most of the obvious things, then I will be happy.

If you are interested, please download the Zip from the OPA Hub Shop and install it, and let me know if anything goes strangely. Just leave a comment an help with the OPA Entity Model Viewer!


Back to OPA Basics : Oracle Policy Modeling Features

Back to OPA Basics : Oracle Policy Modeling Features

Welcome to another in our periodic back to OPA basics series. At the moment I am watching a lot of new starters join a set of experienced developers. And funnily enough, both groups sometimes are stuck in their routine. For the new people, they fall back on what they know from other rules engines. For the more experienced people, that are familiar with Oracle Policy Modeling, they repeat what they learned long ago and do not necessarily see anything that has been added to the application in the intervening time since they first started using it.

So here are my top five cool time savers and useful things you can find in Oracle Policy Modeling today.

  • The Rule Assistant

I still find it strange that many people don’t use the Assistant in Word. If there was ever a tool to avoid having to remember the arcane spelling and phraseology of an Oracle Policy Automation attribute, this is it!

Back to OPA Basics - Rule Assistant

  • The Convert to Test Case Export

Watching people filling in every cell in their Test Case spreadsheet, when they probably have already saved many of the initial scenarios as debug sessions, I think they should remember the fact that they can move a unit test into a Test Case, and vice-versa.

Back to OPA Basics - Export as Test Case

  • The Find Unused Attribute Filter

I tend to use this one when the Rule Assistant has not been used very much, so we are looking for duplicate / mispelled attributes in our Project (see Rule Assistant, above).

Back to OPA Basics - Unused Attributes

  • The Inclusion Report

OK, so I’m probably cheating as far as this one is concerned, but it is a real time saver. In 19A, the introduction of the Inclusion Report has saved me time already. Great for beginning an impact assessment when some sort of surgery is required on Project structure. Find out more here.

Back to OPA Basics - Inclusion Report

  • The Export Entity Data Model Option

This is a tiny little option hidden away in the toolbar but I’m often asked by non-OPA people for the data model and I find this export really simple and quick to use.

Tiny Button - Export Data Model

Well, that’s our top five for now. What other tricks do you use to get the most out of Oracle Policy Modeling?

Let us know in the comments!


Modern CX 2019 Las Vegas

Modern CX 2019 Las Vegas

I’ve been going to events like Modern CX 2019 and various predecessors for the best part of 20 years. Generally when going to these things, I am reminded of Shakespeare’s As You Like It :

“And then the whining school-boy, with his satchel and shining morning face, creeping like a snail unwillingly to school”

Some of the larger events can feel like one is going to school, or worse. But I have to be honest and say that Modern CX is not one of those. This year, back in Las Vegas Mandalay Bay Convention Center, the Modern CX 2019 event was definitely one of the best I have attended, all software houses combined.

What made Modern CX 2019 special?

  • Events that seemed designed to bring the right people together, like meetups, a great concept where customers could speak freely, chat with others, learn and share.
  • An advocacy platform, the CX Hero Hub, actually designed to help and develop the people and stories that define the brand.
  • Sessions that focussed on the customer stories; gone were the turgid exposés of new products that were little better than PDF handouts.
  • Keynotes that actually taught something. I particularly liked the presenters : Ann Handley, Rob Tarkoff and Mick Ebeling all stood out for me.
  • Of course, the general sessions are always packed and you can depend on Jeffrey Wartgow, George Jacob and the others to give a good show.

Oracle Policy Automation is growing in popularity and reach, and the visiting conference attendees were more eager than ever to find out about it. They were well served with some great presentations from the likes of Legal Aid Ontario, Kenya Revenue Authority, Beach Body and more.

What Lies Ahead?

I’m acutely aware however that we still, as a community, need to make our case for Oracle Policy Automation in a clear and concise way.

So I was very honored to be asked to help present one of the sessions and the OPA Meetup. It was fascinating to see how many “eyes were opened” as to the power of Oracle Policy Automation both in that session and the others organized and executed by the dream team of Davin Fifield, Heike Lorenz, and Harriet Franklin.

Here’s a photo of one of those moments I’ll never forget : spinning a wheel in Las Vegas with Heike.

See you there next year.

Modern CX 2019

Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]

Using Oracle Cloud Applications to Augment On-Premises Applications

Sometimes at Oracle OpenWorld it can seem like the presentations just merge into one long PowerPoint presentation. Thankfully this was not the case this year, and the Thursday afternoon had a succession of really very interesting sessions. Let’s  start with CAS3942 all about Using Oracle Cloud Applications to Augment On-Premises, with a very concrete scenario.

The speaker from Toronto Legal Aid in this presentation (“Using Oracle Cloud Applications to Augment On-Premises Applications”) gave very interesting insight into the challenges facing the organization in respect of key stakeholders (the public, the providers and the organization itself) and the evolutionary pressures the organization is under (the need to take into account the generational nature of contact channel preferences, the need for organizational culture change in the face of digitalization, the importance of understanding client priority needs).

Of course the arrival of tools such as Oracle Service Cloud RightNow and Oracle Policy Automation (both Cloud-based) into a world currently using Oracle PeopleSoft (on-premise) will help drive that strategy forward in a future-proofed way. Satisfyingly, this presentation was not all about the technology and the “How we did it”, but it also dived deep into the vision behind this project : that of a citizen-driven future. The section on Transformation Tips was particularly interesting.

Below you will find a series of somewhat blurred photos that I took during the presentation and I hope that you can read them, at least well enough to get some value and think about these performance indicators and drivers for your own project.

Thanks to Karl Martineau, CIO of Toronto Legal Aid  for presenting, and also for not being afraid to take questions on the fly, and demo some of the pieces of their solution without hesitation, deviation or repetition (as the saying goes on the BBC).

This was the last of the Oracle Policy Automation-related presentations for 2018, so I look forward to picking up with the next ones in Modern CX Las Vegas 2019 which is already open for registration.

Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]Using Oracle Cloud Applications to Augment On-Premises Applications [CAS3942]

Article Survey : The OPA Hub Website

Article Survey : The OPA Hub Website

Article Survey : The OPA Hub Website

OPA Hub Logo for Article Survey 2018Here at the OPA Hub Website, we want to provide articles that are of benefit to our readers. As such we would like to better understand what articles are of most interest. Although we have data from analytics providers like Google Analytics and Facebook to name only two, it is always in our opinion simpler and more effective to ask questions directly to our audience. So this is the justification for asking you to spend just a few moments filling out our Article Survey.

If there are items that are not visible in the list proposed, we would encourage you to add comments at the bottom of the Article Survey using the Comment feature, as normal.

Coming Up : New Content

Whilst on the subject of what you would like to see in the future we can already reveal what is coming up in the next quarter, aside from the usual content:

  1. A report from any Oracle Policy Automation sessions in Oracle OpenWorld 2018
  2. A series about the mysterious RuleScript
  3. A look at another Example Project : the Travel Compensation Project and how it works
  4. Getting Started with Oracle Policy Automation Book Edition 4 : in the works already

Coming Up : Training Available

We will be looking to run another session of our Workshop in the final quarter of the year. So while you are doing the Article Survey, feel free to comment / add information about a location or team that needs a training event (anywhere in the World). The standard content is shown here.

Article Survey : Q4 2018

So without further ado, here is the survey. Thank you very much for taking the time to participate in the survey. All the results will simply be used to better orient our writing and creative energy, and we will not contact you unless you specifically request it in the comments.

Data Validation in Oracle Policy Automation

Data Validation in Oracle Policy Automation

Some people assume that the only answer to a problem with my other favourite software (Oracle Siebel CRM) is to write some script. These days they mean JavaScript, jQuery, Web Services or anything else they can lay their hands on.

The same thing might happen one day with Oracle Policy Automation (and indeed, appears to be happening on an increasing basis). Let’s add some JavaScript! After all it’s just JavaScript, so what can go wrong? All JavaScript can do is pop up warnings and make text blink, right? Wrong. Before you know it you have altered (or at least attempted to interfere with ) the user experience beyond recognition, spent a lot of time and money and probably broken a few Oracle Policy Automation golden rules along the way.

So what has that rant got to do with Data Validation. Well, the other day a colleague and friend (thanks M!) came to me with a question and she was eager not to use JavaScript at all. She is learning some of the features of Oracle Policy Automation and she has the good reflex : think outside Scripting.

The question was, how to validate a data entry. The user must be able to enter between 1 and 100 characters in a Control, and the control can accept tabs, spaces, as well as certain accented characters (the language of data entry was not English). So what options does she have?

Error and Warning Rules for Data ValidationOPA 12 - Data Validation

Our rule designer could create rules that assist the user in at least understanding what they are doing wrong. They could also (assuming they are using at least a reasonably modern version, choose to have those error messages when the user navigates away from the Screen, or from the Control (Show Errors > Immediately or  On Navigate from the Interview tab Ribbon).

Attribute Type Specific Options for Data Validation

For attributes that are not textual – numbers, time of day, dates and so on, then there are a variety of further options that can be applied to the Attribute in the Modeller interface, on the Data tab.

OPA 12 - Data Validation 2

But our intrepid rule designer still didn’t get the level of fine detail she was looking for , in respect of her Text attribute. How to limit the  data input to only that specific set of characters?

RegEx in Data Validation

The most powerful form of Data Validation, and the one that benefits from a huge community of helpers, is Regular Expressions. They can be applied to Text Attributes and as such, can provide a high level of control. For the sake of your sanity, do check that the RegEx you are trying to use is compatible with the Oracle Policy Automation engines (Java and JavaScript – so as the official documentation says

“Be sure to only use regular expression syntax that is supported by both languages, and by all browsers. This is basically POSIX ERE regular expressions, with Perl/Tcl character classes. For more information, including examples on crafting regular expressions, see the Wikipedia article on Regular expressions.”

In the specific case mentioned above, our rule designer was able to use the Unicode values to create the range of characters for our character class. And she used our favorite site regexr.com to build and test the expression, that looked a little like this


All this proves that Oracle Policy Automation has a whole bundle of things you can achieve in Data Validation without going near JavaScript or jQuery.

Logo by Southpaw Projects LLC