Welcome to the OPA Hub!

Archives

What’s New in Oracle Policy Automation 18B #1

What’s New in Oracle Policy Automation 18B #1

The team that creates and updates Oracle Policy Automation have once again been very busy indeed, and the latest and greatest release can be downloaded from the usual Oracle Technology Network pages, and the link to the documentation follows the usual schema, just with the new 18B tag in it. So What’s New in Oracle Policy Automation 18B ?

In this first post in a short series, we are going to be looking at the new features of this release, and there certainly are some crackingly good ones. Let’s get started with the integration-related changes and what they mean for Oracle Policy Automation 18B:

  • A new Integration Cloud Service OPA assessment Adapter

What's New in Oracle Policy Automation 18B ICS

A massively important piece of the integration architecture for Oracle Policy Automation just got a whole lot better. An Oracle Policy Automation assessment can now be called as a step in your integration Workflow built on Oracle Integration Cloud Service. The Oracle Policy Automation assessment adapter has been available as a pre-release version but by the time you read this, or shortly afterwards, it should be available from the list of Adapters on the Oracle Integration Cloud Service site.

  • Embeddable JavaScript Models

An embedded JavaScript model is essentially a completely self-contained rulebase which can run, therefore, in a disconnected scenario. This will be a game-changer for Internet of Things devices, as well as situations where you need to have lightweight, client-side rule execution. This feature does not support Interviews, and is license-based.

  • Inline Customer Portal interview widget

Service Cloud customers can now take advantage of the new IFRAMEless integration capability that we enjoy with Siebel CRM already.

  • New REST API Batch Assessment Licensing Options

The Batch Assess REST API can now be called if you are licensed for Oracle RightNow Universal Policy Automation Tier 3 sessions, even if you are not also licensed for Oracle Policy Automation Enterprise Assessment API. For more information on the licensing and restrictions contact your Oracle representative.

  • Cookie-less interviews

A real boon for Safari users (but not only Safari) : Embedded Interviews no longer require a Browser cookie, which potentially could stop the Interview from functioning in certain environments. CORS still applies for resources shared across domains but basic embedding should now be possible whatever the browser security settings.

  • New Inline API Interview

The new API is OraclePolicyAutomationInterview and it uses the same methods as in previous versions (StartInterview, ResumeInterview, BatchStartOrResume). This new API version enforces all interview element styles. Styles won’t inherit from the parent stylesheet, and interview extensions can be used to modify interview appearance.  Awesome news for customers looking to render a a transparent experience to their users.

  • Relationship Control Customization

In the second part of our What’s New in Oracle Policy Automation 18B post series, we will look at the new Relationship Control extension capability which I was wishing for only a few weeks ago!

The OPA Hub Snap Poll Results

The OPA Hub Snap Poll Results

The OPA Hub Snap Poll Results

As you know, the OPA Hub Website runs short-term polls or “Snap Polls” in an effort to collect and share information about Oracle Policy Automation that may hopefully be of value to the Community. The OPA Hub Snap Poll Results concern the question we asked in March 2018, specifically “Are you going to be using the new JavaScript Extension in your OPA Interviews?”.

The most recent versions of Oracle Policy Automation have pretty much consolidated JavaScript as the client-side platform for delivering just about any visual changes you might wish for. Many of us are also pretty hopeful that the JavaScript library in interviews.js is a forerunner of a future REST client, and hopefully the basis for some sophisticated integrations as well.

Of course there are other avenues of development of Oracle Policy Automation, notably the experimental RuleScript, based on the output of the Oracle Labs and the graal library. Anyway, The OPA Hub Snap Poll Results were quite definitely in favour of the JavaScript extensions. You can find the results below, and I have included a link to a dynamic version of the graphic hosted by our friends at easel.ly.

 New OPA Snap Poll

As the Snap Poll on the subject of JavaScript has now closed, a new Snap Poll has been opened, this time in an effort to get more information about the needs of the Community in respect of training and advanced workshops. Please take a moment to answer the OPA Hub Snap Poll on this subject.

You’ve got to be in it, to win it

A reminder : when we close this Snap Poll, one lucky voter will get a free copy of Getting Started with Oracle Policy Automation 2018 Edition, so don’t hesitate to vote today. The Snap Poll will close on the 31st April 2018, and results will be published on this website soon afterwards.

 

Oracle Policy Automation and Siebel Innovation Pack 16 #4

Oracle Policy Automation and Siebel Innovation Pack 16 #4

Welcome back to part four of our ongoing series about Oracle Policy Automation and Siebel Innovation Pack 16 . This post continues with the setup and testing that began three posts ago. For reference here are the links to the previous parts of the series:

Oracle Policy Automation and Siebel Innovation Pack 16 Load and SaveThis particular article continues working on the core data transfer operations, namely Load and Save. I also have a tendency to call the Save operation Submit, because it reminds me that not only must the request be submitted to Siebel to save any mapped out data, but a response needs to be sent back from Siebel to Oracle Policy Automation to, for example, display a message in Oracle Policy Automation confirming that the save was a success (or whatever).

This need for a two step approach (Save in Siebel and Respond to Oracle Policy Automation) means your Workflow Process is likely to have both typical Siebel Operations to update the database but also typical transformation and response creation like the previous operations.

The example Workflow Process for Save will require, therefore, quite a bit of work before it is fully functional. In the video I try to highlight this, but it is worthwhile mentioning the key issues again here:

  • You will need to extract any data from the hierarchy sent to your by Oracle Policy Automation
  • You might well need to use scripting if the hierarchy you receive has multiple entity instances (for example, the Oracle Policy Automation Project infers multiple vehicles and you want to save each of them in Siebel).
  • You will need to make sure that you create a Response that updates one of the input mapped, load after submit attributes to show it in the Interview.

In this video which follows on from the previous set of SOAP UI tests, build and troubleshoot your Save operation with Siebel CRM to check for errors. There are lots of places where you will need to put in a bit of work on the example Workflow Processes (since they do not actually save much at all) and more complex (and therefore more interesting) business requirements may require a Business Service approach, namely to iterate through multiple instances of data returned to Siebel.

Whilst the videos cannot give you all the details, they definitely will put you in the right direction!

Oracle Policy Automation and Siebel Innovation Pack 16 Load and Save Testing in Siebel

Remember you can find the White Paper and associated files  (at time of writing) at this Oracle Website location.

Next…

In the next part of this series, we look at two supplementary operations, GetCheckpoint and SetCheckpoint : whilst a Connection does not have to support these operations, if you plan on allowing users to stop and resume their interview before it is finished then you definitely need these operations. See you next time!

 

Oracle Policy Automation and Siebel Innovation Pack 16 #3

Oracle Policy Automation and Siebel Innovation Pack 16 #3

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

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

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

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

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

 

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

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

Testing

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

 

Oracle Policy Automation and Siebel Innovation Pack 16 #2

Oracle Policy Automation and Siebel Innovation Pack 16 #2

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

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

Presentation

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

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

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

Build CheckAlive and GetMetaData Operations

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

Next…

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

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation

In a previous post by our guest writer Dr Jason Sender, he investigated improvements in Oracle Policy Automation rules by applying some of the principles of refactoring. Hopefully the short examples he gave revealed some of the increases in readability, maintenance and flexibility that you can build into your rules.Now, in the second article in this series, Dr Sender looks at Object-Oriented Design patterns and Oracle Policy Automation. This article draws on the work and publications of Martin Fowler, which we discussed in the previous post, and those of Joshua Kerievsky from his highly regarded book “Refactoring to Patterns”.

Design Patterns

Kerievsky makes two very important observations on design patterns. His first point is that, as he terms a section heading, “There are many ways to implement a pattern.” (Kerievsky, p. 26). This is key to what we shall see in this article, since with Oracle Policy Automation we should be aiming at implementing the core concept of a given design pattern, rather than strictly following the implementation example given in GoF (1995).

Design Patterns: Elements of Reusable Object-Oriented Software is a software engineering book describing software design patterns. It has been influential to the field of software engineering and is regarded as an important source for object-oriented design theory and practice…The authors are often referred to as the Gang of Four (GoF) (Wikipedia).

The second key point that Kerievsky (p. 32) makes is that: “In general, pattern implementations ought to help remove duplicate code, simplify logic, communicate intention, and increase flexibility. However…people’s familiarity with patterns plays a major role in how they perceive patterns-based refactoring.” So we see here both our aims in using design patterns, and a constraint (developer knowledge). Since OPA does not have objects and classes in the same sense as an object-oriented language, we should not expect a straightforward application to OPA.

In this article we will focus on one single pattern, known as the Adapter pattern.

Summary: “Convert the interface of a class into another interface clients expect.
Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.” (GoF, p. 139)

Let’s look at applying the Adapter pattern to Oracle Policy Automation rules.  At one level, translation is possible; Oracle Policy Automation can translate all its attributes into another language so that the rules can be used once and deployed in multiple languages just by translating the variables, statements, and similar features, while not rewriting the rules. This example from Oracle (2016) demonstrates this:

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation

As a second example, we can make a variable equal to another variable, or a Boolean true if another Boolean is true. For example:

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation 2Here we have adapted the ‘the sky is blue’ to ‘the sun is shining’ (but not vice versa) and adapted ‘the value of the car’ to ‘the value of the vehicle’ (but not vice versa). It might be thought that this is pretty simplistic and not all that useful. The following example highlights more complexity, and, instead of simply adapting the interface, as the above examples do, it goes beyond that to override some of the adaptee’s behaviour:

Guest Post : Object-Oriented Design Patterns and Oracle Policy Automation 3

Here we have adapted the interface from ‘the storey of the building’ to two different interfaces, ‘the lift floor’ and ‘the elevator floor’. British lifts start at 0 (or G) and US elevators start on the 1st floor and do not have a 13th floor. So not only have we changed the interface, we have adapted the behaviour. The new variables can be used elsewhere in the policy model in place of the original one.

Object-Oriented Design Patterns and Oracle Policy Automation : Adapter Pattern Summary

The Adapter pattern seems “made for OPA”. When discussing the Adapter pattern the GoF (p. 142) stress that:

“Adapters vary in the amount of work they do…There is a spectrum of possible work, from simple interface conversion – for example, changing the name of operations – to supporting an entirely different set of operations.”

The examples shown in this article illustrated three aspects:

  • The first adapted the language that users would see
  • The second was an example of changing the name of an operation
  • The third supported a different operation but was also an Oracle Policy Automation-specific variant of what the GoF (1995) term “two-way adapters”, since it adapted two variables from one underlying one.

Each of the three examples has different costs and benefits. The language translation tightly couples the adaptee and adapter, while the changing of the name allows for the other variable to change how it is derived without changing the adapter (i.e., a level of indirection).

It is important to note that the one-way variable name change or Boolean name change simply allow a new term to be used, but these might very well be used in more complicated ways in rule tables (for variables) or rules (for a Boolean) where the adaptee’s value equalled the adapter’s value only in certain circumstances. The two-way adapter allowed for a single variable to be used to provide multiple adapters, thus minimizing code duplication.

The Bigger Picture

It’s worth stepping back at this point to understand the broader context.  Computer science is often defined as dealing abstraction, and software engineering as managing complexity, and the connection is that only by considering different parts of programs and systems as abstract concepts are better able to manage complexity.  For example, Oracle Policy Automation is often integrated with other systems that the Oracle Policy Automation  developer does not need to understand, and can think of in the abstract, like the database that Oracle Policy Automation may interact, but which the Oracle Policy Automation developer may not need to know anything about beyond mapping attributes in Oracle Policy Automation.

So abstraction is about ignoring irrelevant details, and this is accomplished by what is often the theme running through many design patterns, which is to: “encapsulate the concept that varies” (GoF, p. 54).  We often obtain abstraction in Oracle Policy Automation by using indirection (interposing an intermediate attribute) to encapsulate the attribute that varies.  This allows us to “Program to an interface, not an implementation“, as the GoF (p. 18) term it, the rationale for which is that the implementation can be changed if other parts of the program only depend on the interface.

Once again, even from a very simple set of examples, it should be clear that Oracle Policy Automation rules will benefit from the targeted application of principles from programming – in this case Object-Oriented Patterns. The best approach is not a slavish application, rather a pragmatic use of those best-suited to the unique nature of the Oracle Policy Automation platform.

For more information about the ideas discussed in this article about Object-Oriented Design Patterns and Oracle Policy Automation, Dr Sender can be reached using his LinkedIn profile, below. Look out for more articles about Object-Oriented Design Patterns and Oracle Policy Automation coming soon!

Getting Started with Oracle Policy Automation 20018 Edition

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Custom Entity Container JavaScript Extension Example #1

Custom Entity Container JavaScript Extension Example

Note : this JavaScript is destined for use in Debug mode. For a version usable outside of Debug Mode, please continue reading the second part of this series), followed by the final example in part three. You can also watch a quick video of the final example on  our YouTube Channel.

Once again, we look into an educational JavaScript Extension example for Oracle Policy Automation. As usual the example provided is purely intended for learning purposes. It involves a situation that you probably have come across many times. We wish to display a set of inferred entity instances in our Interview. But we are afraid that our set of instances is going to produce a layout that is rather unfriendly. Here is a visual example, taken from a sample project with a simple inferred entity that has only two attributes :

Custom Entity Container JavaScript Extension Example

There are fifty three items in my list. So the Entity Container provides a very long list. Yes, I’m sure I could play around with labels and containers and goodness knows what, in order to make it shorter. But basically, the Entity Container just spawns an elastic list. Which is the opposite of what I want. Instead I would like to see this:

Custom Entity Container JavaScript Extension Example

The above example is a fixed height, and has a scroll bar in order to visualise the content at my leisure. The page is not affected by a very long list. And that is rather nice, especially if you have a dynamic list of terms and conditions, or something similar. Here is the data model, including the inferred entity, relationship and attributes.

Custom Entity Container JavaScript Extension Example

The Excel spreadsheet is very basic for our example:

Custom Entity Container JavaScript Extension Example

Custom Entity Container JavaScript Extension Example

So now on to the mechanism for displaying the content. This Custom Entity Container JavaScript Extension Example will use a standard JavaScript template based on the Oracle Policy Automation documentation. The code of the mount section is as follows:

 

Custom Entity Container JavaScript Extension Example

Let’s look at it in detail. There is some interesting stuff in there. Firstly, the basic principle is as usual. On line 8, as before, we reference a custom Property in our Screen that allows us to identify the Entity Container Control on the Screen. Then, in lines 11 to 15 we create a simple DIV and add a scrollbar that will appear if the content is too large to display in the 100 pixel height.

Then we begin a loop in line 17, based on a global variable called data.data[1].instances.  Of course we should create a reference to it, but for the purposes of learning we can leave it as is. This object, whose exact index will change depending on the structure of your Oracle Policy Automation data model, will prove very useful indeed. It is clearly visible in the Debugging Console of the Browser, if you insert a handy break-point:

In the case of my inferred entity instances, this array contains all 53 instances in my Browser. The same array is also visible as a Local variable as well:

Note in the screenshots above, the location of the break-point is not really relevant here : it is just used to stop the JavaScript engine in the middle of mount.

So the ability to access the instances is most useful. The code loops based on the number of instances. We add a child DIV element for each instance, and then access the values of the two attributes to concatenate them into a longer string. Word-wrap is switched on in my screenshot so you can see the whole Custom Entity Container JavaScript Extension Example code.

Finally we add a horizontal rule just to break the list up a bit. Of course there are lots of things we could do here : but we are just building a simple list and don’t really worry about styling the elements in line, which is not good practice of course.

The rest of the code simply gets rid of the element when the unmount section is called.

Custom Entity Container JavaScript Extension Example

This example is interesting since it reveals a little about the inevitable content of our JavaScript extension. There are probably other ways to get hold of the content of the inferred entity but this is useful for educational purposes.

Summary

But as you have no doubt seen, the code example here will only work with the Debugger. It has it’s usefulness of course, to be able to understand that the content is structured in a certain way. But what about after Debug? That’s what’s coming next.

As always the code is available for free download from the OPA Hub Shop. Look for Custom Entity Container JavaScript Extension Example in the product list.

Whats New in Oracle Policy Automation November 2017 #1

Whats New in Oracle Policy Automation November 2017 #1

With the regularity of a Swiss watch, the Oracle Policy Automation team have released the latest and greatest version of their flagship natural language business rules and automated decision tool : and as usual it is packed with lots of new things for us to get excited about. Here are just a few of the key points that are in the list this time, along with some examples. Let’s look at whats new in Oracle Policy Automation November 2017, this is part one of a multi-part post.

Load During an Interview (conditionally)

One of the commonest requirements that seems to show up regularly is the need to load, for example, reference data during an interview. And for Public Cloud users, the ability to do just that is now built into the Service Cloud Connection. Let’s look at a very simple example. Suppose that you want to load some product information, depending on some criteria such as the dates of the last few purchases. What you absolutely don’t want to do is load the entire product hierarchy. Just the parts you want relative to your customer scenario : perhaps a customer logging in to the portal.

If you look carefully at the attached image above, you will notice that there is now, on the left hand side, the possibility to add a “New Unrelated Mapping”. I have already added one, based on Product. I can select an unrelated object from Service Cloud and map it into my Oracle Policy Automation November 2017 Project. Although this is delivered as out of the box functionality for the Oracle Policy Automation Cloud Service, it is in theory possible to deliver the same functionality for any Connection, provided you use the newest WSDL (which is referenced here in the documentation).

Filtering the Data Load

Furthermore, the data load can include the equivalent of an SQL where clause. In the Entity Properties, you now have access to a filtering feature.

The filter can use any field from the underlying table, even if it is not mapped inbound in Oracle Policy Modelling in your Project. The syntax is similar to the natural language of OPA. Notice also, you can limit the number of records retrieved.

This is a very exciting feature that has been requested for a long time. Outside of Service Cloud, Siebel CRM for example with it’s incredibly rich data model, this allows for considerable optimisation of data transfer to Oracle Policy Automation. In the next post in this series we will see some new functions relating to default values, which are going to be a terrific time saver!