Welcome to the OPA Hub!


Category Archives: Books

JavaScript Extensions

JavaScript Extensions for Oracle Policy Modeling

JavaScript Extensions for Oracle Policy Modeling

The JavaScript Extensions for Oracle Policy Modeling book is now available in all the channels that are currently supported:

Buy it from the Publisher

This option is probably the best if you are looking for the eBook. There is also a great bundle deal at the moment with the Getting Started with Oracle Policy Automation 2019 book. For more information you can find the details over on the P8 Tech website page.

Buy it from Amazon.com

The information that Amazon prints regarding availability of the title is incredibly vague and usually inaccurate. But at the moment, it is correct – it is shipping in a couple of days. This option is good for North American readers therefore. Find out more from the Amazon.com page here.

Buy it from Amazon.co.uk

Just like it’s global counterpart, the shipping information is usually wide of the mark but at the moment they have got it right, you can order the book from Amazon.co.uk and it will ship very fast. I’ve included a pretty picture of the book below, or you can click this JavaScript Extensions for Oracle Policy Modeling link. Full disclosure, this link is an affiliate link that earns us 50 cents extra on every purchase.

Buy JavaScript Extensions for Oracle Policy Modeling from the Book Depository

The most efficient and cost-effective way for the Rest of the World to acquire this and the other titles in the collection, the most important benefit of using this supplier is the fact that the book can be shipped anywhere in the world and they are remarkably efficient. Price-sensitive customers will find their shipment charges more attractive than Amazon in general. You can find out more from the Book Depository page for JavaScript Extensions for Oracle Policy Modeling.

What about the other book?

Some of you have been asking about Getting Started with Oracle Policy Modeling. Here are some answers:

  1. Yes it is being updated, worked started in the holiday season
  2. Yes it is being renamed because the product has been renamed and because the scope of the book is broader than ever
  3. Yes it will be released as soon as possible (probably end of Q1, early Q2)
  4. No it will not have broccoli on the cover. Tune in later to find out what it will be. Or submit your suggestion!

Input Extensions – DropDowns

Input Extensions – DropDowns

Many thanks to long-time reader and Oracle Policy Automation expert Aaron H for an interesting discussion just before the holiday season. The subject for this post is as you can tell, Input extensions that are dropdowns.

Our conversation was wide ranging but this article will focus on a couple of things

  1. How to ensure that the extension displays and handles the text and value elements of your list of values
  2. How to handle <uncertain>
  3. How to have a different label for <uncertain>

Along the way this will give us the opportunity to understand the usefulness of the Value() function in a rule. In later posts in this series we will look at other forms of Input, also beyond the basic INPUT or SELECT tag.

So let’s begin with a simple setup – the Zip Archive is available in the OPA Hub Shop by the way) – starting with just one attribute and a Value List:

The initial Value List looks like this – notice that in this case, there is no distinction between the displayed text and the actual value:

Input Extensions - DropDowns

In this simple scenario, one often sees extension code that focuses on the control.getOptions() method and then iterating through the various options from the returned object, something a little like this (for educational purposes only) :

var myChoices = control.getOptions();
for (key in myChoices) {
if(myChoices[key].value)
{
$('#xDropDown').append('<option value="' + myChoices[key]..text.toString() + '">' + myChoices[key].text.toString() + '</option>');
}
}

The code works fine, but makes a few assumptions that can come back and bite later when the rule designer has made changes.

  1. It does not take into account the possible change in the Value List to include display and values.
  2. It will error out if the dropdown becomes non-mandatory since “uncertain” will cause .toString() to fail

So when the developer of the rule changes the Value List to something like this:

Input Extensions - DropDowns 2

The code would no longer be useful since the [key].text and [key].value are two different values. And if we are updating the underlying control, we need to remember that we call control.setValue() so it is expecting a value, not the display value.

So maybe the code gets changed to :

 $('#xDropDown').append('<option value="' + myChoices[key].value + '">' + myChoices[key].text.toString() + '</option>');

Or something similar. All is well and the dropdown is correctly handling things :

Until the attribute is defined as non-mandatory in the Screen where it is displayed. At which point the code breaks again, as the uncertain value is not handled. Let’s take a step back and remind ourselves of the defaut behaviour in these situations, without an extension:

The standard control renders an empty option for the uncertain value. I’ve always considered it a bit of a bug that it does not respect the optional Display Value (in my case, “Not Sure” – see the screenshot a little further up) but always renders a blank, at least in all my browsers.

So in the case of an Input Extension that needs to render the uncertain value (because the control is not mandatory) and also wants to show the Display Value, the code will probably need to have another quick change:

Input Extensions DropDown Code Last One

Which will ensure that the dropdown is rendered with the correct text and value, if there is one. Also, the added bonus is that the display text of uncertain is rendered as we would expect:

Input Extension Showing Uncertain Vlaue

And finally, we have good use of the Value() function so that we can be sure that the correct value is stored in our Interview:

The function above, in a Word document for example, will return the value rather than the display value. So you can drop it onto the final Screen of your testing Project and compare the two to make sure you have gathered the correct one.

Hopefully that was fun and interesting, and you can practice yourself with your own project. As mentioned above the code is available in the OPA Hub Shop. The documentation is of course on the Oracle Intelligent Advisor website.

JSON Extension File

JSON Extension File

As many, but not all readers are probably aware, the Oracle Policy Automation JavaScript API is restricted in terms of what data it can manipulate in code. The default position is simple. If you plan on working with (accessing, updating or whatever is appropriate given the nature of the data and the type of attribute or entity instance) information from the Data tab of Oracle Policy Modeling then it must be present on the Screen that contains your Extension.

Here is a simple example to illustrate. Suppose you have a project that infers a list of Metro Stations. These stations are inferred in some way by Excel or Word rules. You wish to use a drop-down to allow the user to select one of those stations.

You decide to use the much-downloaded educational example called  Dynamic Options from Instances which you found in the OPA Hub Shop. So far so good. You look at the example Project and you see this:

JSON Extension File - Before

Cool. It’s a demonstration of a dynamic options list (at the bottom) driven by the entity instances (at the top). And the console shows some cool output to highlight the construction of the list. On the left, you can see that the interview is made up of two Screens. Excellent. Then you decide to split the interview into three Screens – separating the Instances from the Selection. Sounds really cool and a better layout. Now you see this in the Debugger:

JSON Extension FileWhich I think you will agree, is sub-optimal. Our extension just fails miserably. But now, it’s opm.extension.data.json to the rescue. We create this file in the resources folder and populate it according to our needs. In this case, we add – and this is required for any entity attributes – the relationship name (the technical name, not the textual name) and then we declare any attributes we want. So our file looks like this:

JSON Extension File Example

We re-debug and everything is back to normal. Re-cool. Obviously we should avoid putting too many elements in there – especially parent – child relationships which can result in masses of JSON being generated by Oracle Policy Automation and made available to your JavaScript, potentially creating performance bottlenecks. But for our little example, it’s perfect.

Most Popular Downloads on this Site

Most Popular Downloads on this Site

We used to say that anything with “Google Maps” in the title was a sure-fire winner when it came to people downloading examples – after all Google Maps used to be so easy to get into, and so many people just “get” why a map is useful, that it was absolutely the go-to example. But is it still the case? Google APIs now need a Billing Account, and an API key, which in turn needs to have domain restrictions, and other administrative elements. It’s not quite as easy as it used to be.

So we set out to look at the different examples that have been downloaded on this site. And here are the results. Interesting. Under the graph, some comments and remarks which might explain some of the data.

Most Popular Downloads

Custom Google Maps JavaScript Label Extension Example 21

Custom Dynamic Options JavaScript Extension Example 21

Didn’t expect that one to be in there at all!

Custom JSON Search JavaScript Extension Example 19

Same for this one. Maybe Search is the new Map?

Custom Entity Container Extension Example  17

Google Maps as Custom Input Control Extension 15

Ah, see, the combined score is going to be huge.

Custom JavaScript Extensions Map with Google Places and Custom Options List  12

Told you. Google Maps reigns supreme!

Custom Header as a Timer JavaScript Extension 12

Custom Year Picker JavaScript Input Extension Example 9

JavaScript Extension Entity Collect Control 7

JavaScript Entity Collect Extension Excel Data Load 6

Custom Signature Extension Example 6

Wow. This one isn’t even really an extension!

JavaScript Extension Search Examples – Airlines, Great Circle Mapping, Airports 6

Everyone loves planes. I get that.

Embed Website in Interview Label Extension 5

JavaScript Extensions with a Live Entity-based Chart with D3 5

Everyone hates D3. I get that.

JavaScript Extension Search Example – Railways 5

Not as much fun as airplanes.

Loader Image in Entity Instances Search Extension 4

JavaScript Extension fullCustomInput Example 4

JavaScript Extension Custom Label Detail Pop-up 4

Calendar Input Extension Blackout Dates 3

JavaScript Extension Search Example – Siebel REST API 3

JavaScript Extension Relationship Control 2

JavaScript Label Extension Leaflet JS Map 2

Wow. This is the free alternative to Google Maps. I would have imagined this to be more popular.

Force PDF Click Button Extension and Label  1

As you can see from the Chart, Google Maps is hanging on – but only just! It’s ex aequo with the Search Extension. However if you pool together all the Google Maps stuff, it completely wipes the floor with the competition. Definitely the most popular downloads.

Want even more downloads?

If you are interested in even more examples (including a complete Entity Collect, a Carousel, Breadcrumbs, lots of Inputs and more, then you will be interested in our new book, JavaScript Extensions for Oracle Policy Modeling.

JavaScript Extensions for Oracle Policy Modeling

JavaScript Extensions for Oracle Policy Modeling

It’s almost ready. The perfect Christmas gift (yeah, right, in bizarro-world) or New Year workout kit. The new book is due out in a few weeks, and you have the chance to win a free copy ahead of everyone else by entering our prize Survey (30 seconds) right now.

The book comes with 50 examples. You get them as Zip Files as well when you buy the book. The book covers all the different types of JavaScript Extensions that are currently available, with examples of each of them (sometimes many different examples) using easily-understandable business scenarios as the starting point, and using example projects from Oracle Policy Modeling – so you don’t need to install a Hub, or do anything special – which let’s you get started straight away.

  • Label Extensions
  • Input Extensions
  • Search Extensions
  • Options Extensions
  • Entity Collect Extensions
  • Entity Container Extensions
  • Button Extensions
  • Event Extensions
  • Navigation, Header and Footer Extensions

The OPA Hub Website Community has also stepped up and I am delighted to say that 8 examples (with credits) came from readers of this website. I am very grateful to them and encourage all of you to submit your ideas and code snippets for the next version.

Hopefully this book will appeal to non-technical people too – I wrote it in the same style as the others (Getting Started with OPA, Getting Started with OSvC) and tried to make it as accessible as possible to everyone.

Here, in avant-premiere, is the cover. And no, I’m not sure what those things are either. But they sure look exotic and tasty. I wanted a parsnip on the cover but these were available and they look good. These are important questions that you worry about late at night. The publisher’s website has been updated, watch this space for the launch date!

 

JavaScript Extensions

New JavaScript Extensions Book – Win!

New JavaScript Extensions Book – Win!

We’re pleased to say that our new Oracle Policy Automation JavaScript Extensions book is almost finished. Designed to be useful for anyone looking to understand how to extend their interviews with JavaScript Extensions. It comes with 50 worked examples and Zip Archives to download. It was written to help non-programming Oracle Policy Automation professionals understand what is possible. Professional Programmers can use the examples and extend them / adapt them according to their needs.

Win a Free Copy!

The new book is part of our program of providing useful resources and assistance to the community. Help the OPA Hub Website by filling in the survey below and enter to win a copy of the book and the free goodies we mentioned. We’re attempting to broaden our offerings to include various forms of training and assistance, and your feedback helps us a great deal. We want to serve the community in the best way possible and this is part of that process, learning about your needs.

If you enter the very short survey below and complete the last question, you will be entered into the draw – one person will be drawn at random and will win a copy of the book as soon as it is published (in the New Year 2020) and a bunch of other goodies – a baseball cap, a tee-shirt, a pen and a mug! So what are you waiting for? If for whatever reason, the embedded survey below does not work, you can also access it here.

Enter the Survey to win!

Create your own user feedback survey

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!

Getting Started with Oracle Policy Automation [2019 Edition]

Getting Started with Oracle Policy Automation [2019 Edition]

Getting Started with Oracle Policy AutomationI’m happy to say that the 2019 edition of Getting Started with Oracle Policy Automation has hit the shelves. It is available for purchase now on the publisher’s website, and will be up on the various versions of the Amazon website in the next few days (although it is often quicker and less expensive if you buy direct from the publisher).

This edition features completely updated screenshots, and extended or new content on

  • Inferred Entities
  • Custom Controls & Styling
  • Mobile App
  • Interview Controls
  • Explanations

Getting Started with Oracle Policy Automation 2019 Edition. The new edition has a new cover so that it is easier to find in your local bookstore. We will be giving away a few copies over the coming weeks as we launch our various quizzes and learning tools. I’d like to thank all the fellow members of the consulting community who helped with this edition (you know who you are), and of course Oracle Corporation for producing such an incredible product.

Of course I want to thank all my customers, consulting and education, whose questions and ideas also helped flesh out many of the chapters, and last but by no means least James at P8 Tech for his guidance and patience with editing and producing the book.

If you want to go and see the Getting Started with Oracle Policy Automation Book Page, just click on the link to the P8 Tech Web Site. I’ll post the Amazon pages when they are updated.

I look forward to meeting some of you at Modern CX Las Vegas in March 2019, please stop me and say hello if you find me wandering through the slot machines (that’s a joke by the way).

Watch this space for more book and content announcements, coming soon. It’s going to be an exciting year for Oracle Policy Automation and Oracle Policy Modeling.

Back to Basics Fun with Relationships

Back to Basics Fun with Relationships

The other day I had cause to discuss Relationships with an Oracle Policy Automation developer, and as a result of the discussions and the level of interest expressed in the learning curve, I thought I would share here the project that I used to illustrate some of the main concepts used when working with them in an Interview. Firstly, to put Back to Basics Fun with Relationships in context, here are the entities we will discuss :

  • Global (of course)
  • the car
  • the passenger

The entities are in part received from another system, and look like this:

To simulate the external system in this demonstration, the data for the cars is coming from a Microsoft Excel spreadsheet which infers various vehicles. The passengers are manually entered in the Interview and then different relationships are using to construct the connections between the cars and the passengers. In this case, we need to identify the passengers in each car (which has been called the car’s passengers here), and then to specify which passenger is sitting in the front seat (which has been called the copilot here). So the car entity has the following reference relationships, both of them with the passenger but of different cardinality.

Back to Basics Fun with Relationships 3

When we look at the first two Screens there is not much to report. The first displays the cars and the second gets the passengers.

Back to Basics Fun with Relationships Cars Back to Basics Fun with Relationships Passengers

The third Screen is where some students can go wrong. The key is to display the relationship (the car’s passengers) . In the case shown, a label has been added to display the car name. Notice how the choice of display is limited to Checkbox because of the cardinality of the relationship. This makes for a situation where the user can choose the passengers and of course a passenger can only be in one car. Selecting the same passenger for two cars produces an error (as it should, even if the error message is generic).

Back to Basics Fun with Relationships Choose Passengers

  1. The relationship is added to the Screen
  2. The selection control is displayed
  3. Only Checkbox is available

The Screen looks like this in the Debugger:

Back to Basics Fun with Relationships Selecting Passengers for Cars

Finally, the fourth Screen will allow the selection of one of the passengers to be assigned as the front seat passenger (a.k.a the copilot). The Screen is displayed below and the key areas highlighted:

  1. Again we add the relationship to the Screen
  2. The cardinality means the default display option is a Drop-down, although others are available in the Toolbar this time (fixed list or radio buttons). I wish these were customizable using Control Extensions but they are not…as of 18A.
  3. The display will allow you to select a copilot, and filtering the data ensures that only passengers of the correct car are available. In this way, the first relationship (the car’s passengers) drives the second (the copilot).

The Screen looks like this in the Debugger:

Back to Basics Fun with Relationships Copilot

Finally there was a requirement to associate the copilot with the car in a more direct fashion. Specifically, the car entity had attributes to contain the name of the copilot. The basics (not complete) of this are shown below:

Back to Basics Fun with Relationships Mapping

So the car has a front seat occupant boolean attribute and the value is retrieved from the passenger entity and the copilot relationship and copied into the car attribute. The relationships and the entities allow us to retrieve data in the structure and place it in the car.

Back to Basics Fun with Relationships Data Tab

Hopefully this example will let you imagine how relationships can be used to enhance your Oracle Policy Modelling. I hope you enjoyed this Back to Basics Fun with Relationships post. As always the official Oracle Policy Automation documentation can be found here.

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.