Welcome to the OPA Hub!


Category Archives: Videos

Whats New in Oracle Policy Automation 18A #1

Whats New in Oracle Policy Automation 18A #1

And so the latest and greatest version of Oracle Policy Automation has just hit the shelves, I’m of course talking about version 18A which became available for download from the Oracle Policy Automation Downloads page on the Oracle Technology Network pages. The list of what’s new is quite short this time, although we can imagine that lots of things have been going on behind the scenes given some of the early access info that has been filtering out on the official Oracle Policy Automation Blog these last few weeks. So, on with Whats New in Oracle Policy Automation 18A #1!

Whats New in Oracle Policy Automation 18A #1

Automatically Retrieve List Values from Rules

The biggest addition to the Oracle Policy Modelling experience in this new version is the concept of dynamically (or almost) retrieval of lists of values from rules. I’ll give you an example that you might be familiar with. You have written rules that deal with an attribute, of type Text, and you have referenced it several times with different values, perhaps as a condition to some conclusion. And now you want to add it to an interview. At some point you will find yourself copying and pasting the values in your Word document into a Value List or a plain old List of values in the Interview Screen.

Well, not any more. The video in the next paragraph shows off the new functionality, whereby the modeler can retrieve the values at the click of a button and add them to a screen, or of course use the existing functionality to turn them into a Value List. The video goes on to demonstrate what happens when you go back and edit the rules in the Word document, and what happens when you change the Control type – for example from Drop Down to Fixed List and so on.

The example uses a fictitious restaurant deciding the correct level of spices to be added to their sauce, depending on the customer selection.

video

That concludes our post Whats New in Oracle Policy Automation 18A #1, in the next post we will look at some improvements to the REST API (which we looked at in earlier posts) to enhance user lifecycle management.

Oracle Policy Automation – Whats New in Version 12 Video 2

Hi There!


This content is accessible only to logged in users of the OPA Hub Website.

To Register takes only 10 seconds and uses LinkedIn for authentication.

Once registered you can change your OPA Hub password and manage it independently of LinkedIn.

We recommend you keep different passwords for all your sites.

To register, click the Log in link in the menu at the top of your page.

Thanks, the OPA Hub Website.

Policy Automation – Siebel Connector 2

So when we left the previous post, we had completed much of the legwork required to enable communication between Policy Automation and Siebel Enterprise. A quick recap:-

Determinations Server uses web service-based communications with Siebel and therefore needs the EAI Object Manager to be online, and may use Workflows and Scripting, Web Services and other standard associated Siebel objects.

Web Determinations Server is typically embedded as a Symbolic URL but can also communicate with Siebel via the EAI Object Manager in the case of the custom versions provided with the Siebel Connector. In short, these two customized applications include a plugin to communicate the session data and more back to Siebel at the end of the Web Determination.

One repetitive theme that comes up whenever installing the Policy Automation Siebel Connector is the need to check and / or correct the following:-

Employee Symbolic URL (used for the AdminSmokeTest) – this is a reduced complexity, simple 4 argument Symbolic URL to call the testing rulebase. The Port might need to be changed to point to your Apache installation.

Policy Automation - Employee URL

Web Determinations Symbolic URL, a more complex set of arguments for launching the Web Determinations window from the Sessions applet. In both of the Symbolic URLs you may have to edit the order of the arguments by referring to the installation guide.

Policy Automation - Web Determinations URL

Inbound Web Services used for the mapping of data

Policy Automation - Inbound Web Services

Outbound Web Services used to call Policy Automation Determination Server.

Policy Automation - Outbound Web Services

So now we are ready to perform some tests of your new Policy Automation and Siebel environment. Go to the Smoke Test View and click either of the DS Server buttons. The SmokeTest runs a simple rulebase that returns TRUE if you are on the SADMIN record and FALSE if you are on any other record.

Policy Automation - DS Smoke Test

In both cases, if you are on the SADMIN record, you should see this.

Policy Automation - SmokeTest SADMIN

On another user you should see this instead.

Policy Automation - SmokeTest Other

Repeat the process with the Web Determinations buttons, and verify that you get this.

Policy Automation - Web Determination SmokeTest SADMIN

Policy Automation - Web Determination SmokeTest

A common issue at this stage is the Web Determinations give an ugly 500 error. If this occurs, change the Symbolic URL to the correct embedded web determination server name as shown below, then logout and login again, rinse and repeat.

Awesome. We have come a long way. We have a functioning Siebel – Policy Automation integration. Perhaps the key issue to remember is that each rulebase will require administration and technical steps – this is not a case of “integrate two applications now forget about it”. Each business ruleset will require us to think about how and when it will be triggered in Siebel, and how the rulebase maps to Siebel metadata. To get started on the concept, look in the Administration – Policy Automation Mapping and IO Mapping Views. Given that each rulebase may target different data, you will often be working in here.

Policy Automation - Mapping

 

Given that the output of each rulebase will be different, both in terms of actions, data and reports, take a moment to review the Decision Reports that your tests have generated.

Policy Automation - Decision Reports

Switch to the Decision Report Viewer to test whether you remembered to copy the provided XSLT into the Siebel Server XSLT folder.

Policy Automation - Decision Reports Viewer

In the next post we will show how to set up a new rulebase for integration with Siebel and get it properly integrated. Stay tuned.

Policy Automation – Siebel Connector Part 1

We all love a “demo environment”, doesn’t matter what it is for. The idea of being able to flip open a laptop and show off something that normally runs on big boxes in chilled rooms filled with flashing lights (and probably spinning tape reels, if you are a child of the sixties and seventies) is just too cool.

It has been a while since we addressed the marriage of Siebel Enterprise and Oracle Policy Automation. So we thought it appropriate to review the setup of your Siebel environment with Policy Automation. It is also a good opportunity to review the different parts of the architecture if you are a bit rusty.

Let us assume (deep breath) that you have a Siebel environment to hand. Prefereably a Siebel Server type environment. This is not by any means a necessity, but it makes it easier to be able to work with the EAI Object Manager should you wish to engage in some “off piste” work with plugins.

Anyway, if you have a recent Siebel Enterprise to hand, perfect. Before you begin, know that the latest versions will need to have the File System Access system parameter defined and set to TRUE, since the installation scripts for Oracle Policy Automation do some serious “clib-ing” when they insert their setup and sample data.

Policy Automation - Siebel File System Access

Begin by installing Apache 7. This is our preferred version since it is super small and super reliable. If you want you can of course install a more modern version, or install WebLogic if you want (but good luck with holding everything on your laptop.)

Policy Automation - Tomcat 7 Installed

Once you have installed and started Apache, install Oracle Policy Modelling – the basic Windows-based platform for modelling rules with Word and managing Project files.Look deep into the bowels of the install for the templates folders and you will find template versions of the web-determinations.war and the determinations-server.war. Remember that these represent the “web interview” and the “web service” style of rulebase execution. These files can be dropped into the webapps folder of Apache and they should auto-unzip and be created as applications.

Policy Automation - Apache Webapps Directory

If you have an Apache user capable of viewing the Server Management application then you will see them alive and well.

Policy Automation - Apache Server Management

Accessing the Web Determinations application URL should return something like this.

Policy Automation - Siebel Web Determinations

Then you should proceed with the “connector” install. This next step in the process is the same, whether you install for CRM On Demand or Siebel Enterprise. In both cases there is a separate windows-based installer that needs to be run. It will create a new Menu Item (in the File menu for CRM On Demand, in the Tools menu for Siebel Enterprise) in the Policy Modelling application. Technically speaking these are both Add-ons to the core application.

Policy Automation - Plugins Folder

Once the Siebel Enterprise menu item is visible in Policy Modeller, you know you are on the right track.

Policy Automation - Siebel Plugin Menu

You should know that customized versions of the Determination Server and the Web Determinations Server (both application files are prefixed with “siebel” – are now available to you in the subfolders of the plugin.The Web Determinations Server actually comes as 2 different versions, so that makes three new applications.

Policy Automation - Siebel Versions

Why?

  • The Determinations Server application supplied in the plugin installation folder is used if you want the Benefits functionality in Siebel Public Sector, otherwise the standard one will suffice
  • The two Web Determinations applications are both designed to communicate with Siebel Business Components (to store the report, session data and so on about the Web Determination) – one is for embedding in the Siebel UI as part of a View  (the one called *embedded*) and the other as a standalone Web Determination web page.

In order for the Siebel to Policy Automation integration to function correctly, you will need to update some information in a couple of properties files used by your new Siebel-aware Web Determinations applications (both of them, embedded and standalone). Assuming you have copied the war files highlighted in the previous paragraph into your webapps folder of Apache Tomcat, both properties files are sitting in your Apache environment, under C:Program FilesApache Software FoundationTomcat 7webappssiebel-web-determinations or siebel-wd-embedded.

The file to update is called siebel-data-adapter.properties and right at the top of the file, make sure you change the URL to your EAI Object Manager and the SADMIN user name and password. Do this for both of the files.

Policy Automation - Siebel Data Adapter Properties

In real life you would test the connection and then encrypt this information as described in the online help. But we will leave it unencrypted for now. By the way, now is a good time to check your EAI Object Manager is actually available!

Once you have got this far, time to step into Siebel Tools. You must import a SIF file (different depending on your version of Siebel) containing Screens, Views, Applets, Business Services, Integration Objects, Workflows and so on.

Policy Automation - Siebel SIF File

The objects can be found in the Siebel Objects folder shown above – use the SIF file that is correct for your version of Siebel. (This screenshot is assuming a standard install for Siebel version 8.x).

Once you have imported the metadata, add the two new Screens (Policy Automation Administration and Policy Automation Smoke Test) to your chosen Application using the provided Symbolic Strings (X_PA_*).

Compile the Projects, and do not forget to Apply database changes that are found in the new Tables in the Table Policy Automation project as well. As a final step, copy across the XSL and Web Template also shown above to improve the display of the Decision Reports and Web Determinations in Siebel – this will have to be done manually from wherever the Siebel Connector is installed, the Siebel Objects directory, into the WEBTEMPL and XSLT folders respectively of your Siebel environment.

Now you are almost done. Get into Siebel and move to the Administration – Business Service > Simulator view. Add a new line for “Policy Automation – Install” service and “Install Connector with Examples” as the Method name. Run the simulation to install the seed data for the integration which includes the Workflows you can see in the Siebel Objects folder. Run a second simulation using the Method name “Install Examples” to import the Smoke Test example mapping. If you get a File Access error, see the remark above about the System Preference for File System Access. Quite a few Workflows need to be imported, so this is the fastest way (you can do it manually if you really want to).

Policy Automation - The Siebel Workflows

Move to the Administration – Integration > Host Administration and verify that the localhost:8080 record has a value that corresponds to the location and port of your Apache installation. This host is used in the Symbolic URLs for Policy Automation Web Determinations to make the Web Determination display inside the Siebel UI.

Check Administration – Integration > Symbolic URL to make sure the correct URL is included to point to your Apache installation as well for the purposes of testing the Web Determinations. The Symbolic URL for Policy Automation should have been added by the Installation Business Service.

Then move to the Administration – Web Services > Outbound Web Services to check that the Web Service for Oracle Policy Automation Determination Server is installed and the port numbers, web addresses are correct for your Apache-hosted Determination Server.

By now you are ready to clear all the relevant caches and login / logout of Siebel. There should be two new Screens in your Siebel Application – Smoke Test and Policy Automation Administration. We will find out what happens next in part two of this post.

 

Oracle Policy Automation – Commentary Plugin

Many consultants have been spending quality time with Oracle Policy Automation either as part of a Siebel project or for their own benefit to broaden their vision of CRM in general. One of the most commonly needed features in Oracle Policy Automation, just like in all CRM or IT projects, is help. I mean of course Help, as in Assistance. Web Determinations are complex beasts in many cases, and the end user may be faced with the challenge of understanding what they being asked, and should be asking, as well as understanding how it all fits together into the interview.

Let’s face it, if I asked you to enter item PA124 on a tax assessment form, you might need some help too.  Many Oracle Policy Automation Web Determination rulebases use the Commentary feature which automatically generates a set of HTML pages for editing, and displaying in the Web Determination session, based on key pages and attributes of your rulebase.

Generate Commentary Files

And the result can be seen below.

Commentary Standard

However the number of potential files that could be generated (and therefore that have to be managed), might mean quite another headache especially if you intend to release this with multiple translation files attached.

So it is good to note that the Oracle Policy Automation Web Determination Engine offers developers, (after a careful assessment of the business requirement and using all the standard options to try and reach a solution without customizing) , the ability to create a custom Commentary Plugin to replace the standard one.

The format of this plugin is documented online, although it is not entirely up-to-date. Here is a small example of what your Plugin might do:-

Get Commentary Data from an MS SQL Server Database

Storing Commentary in a database has many advantages. Make sure that the relevant JDBC libraries are available to your project. You can download them from Microsoft. Of course your platform might not be the same as mine but they generally can be found here.

Without going into unnecessary detail, I have a database with three columns that are of interest for this demonstration :-

COMMENTLOCATION, COMMENTCONTENT and COMMENTLOCALE

  • Comment Location will be the page identifier in the Web Determination session (so screen/summary is a location)
  • Comment Content will be the HTML we will send the Web Determination session (just some valid HTML for our Assistance text)
  • Comment Locale is the code of the session “en-US” or “fr-FR” for example.

So our table will support any number of items in any number of locales.

Table of Commentary

Coding the Plugin

Our Commentary Plugin will use three key methods to get the job done:- hasCommentary, getCommentaryContent, and RegisterInterviewPlugin. The first will identify if the current location has some Commentary text available in our table, and the second will return the Commentary HTML.

The final RegisterInterviewPlugin will ensure that our code is only used in the case of our special rulebase. All other rulebases will continue to use the standard Commentary system.

Some example Code

package com.oracle.determinations.interview.engine.plugins.commentary;
/* your imports go here
/**
 * Tutorials and Examples - Plugins - Commentary - Sample
 * Code(RedirectCommentary)
 * Adapted from the web example with corrections and adaptations for SQL Server
 * On Demand Education Ltd 2013
 */
public class ODECommentary implements CommentaryProviderPlugin {
private String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
 private Connection connection = null;
 private Statement statement;
 public ODECommentary() {
 try {
 Class.forName(driver);
 System.out.println(driver + "loaded.");
 } catch (ClassNotFoundException e) {
 System.err.print("Class not found: " + e.getMessage());
 }
 }
 /**
 * Connects to the database and creates a statement
 * Uses MS SQL JDBC driver 
 * @throws SQLException
 */
 private void connectDBObjects() throws SQLException {
 connection =DriverManager.getConnection("jdbc:sqlserver://XXX.XXX.XXX.XXX:1433;databaseName=XXXX;user=ODED;password=XXXX");
 /** Output lots of things - just here for debugging
 * remember you can see them using the View > Embedded Web Server Output
 */ 
 System.out.println("Connected to database");
 statement = connection.createStatement();
 }
/**
 * Closes database objects and terminates the connection
 *
 * @throws SQLException
 */
 private void closeDBObjects() throws SQLException {
 statement.close();
 connection.close();
 System.out.println("Closed connection");
 }
 private TypedInputStream executeSQL(String sql, String filter, String field)
 throws RuntimeException {
 TypedInputStream content = null;
 try {
 connectDBObjects();
 if (statement.execute(String.format(sql, filter))) {
 ResultSet result = statement.getResultSet();
 if (result.next()) {
 content = new TypedInputStream(
 "text/html",
 new StringBufferInputStream(new String(result.getString(field))));
 }
 result.close();
 }
 } catch (Exception e) {
 throw new RuntimeException(e.getMessage());
 } finally {
 try {
 closeDBObjects();
 } catch (SQLException e) {
 throw new RuntimeException(e.getMessage());
 }
 }
 return content;
 }
 /** ******************************** */
 /* Web-determinations method calls */
 /** ******************************** */
/**
 * Returns the commentary content for the target if hasCommentary(session,
 * target) is satisfied
 */
 public TypedInputStream getCommentaryContent(InterviewSession session,
 String target) {
 TypedInputStream commentContent = null;
 try {
 /**
 * use the target and separate the locale for multilingual Web Determinations
 * with Commentary in our table
* retrieve Commentary Content for whatever page has Commentary when the user looks at it
 */

 commentContent = executeSQL(
 "select COMMENT_CONTENT from OPACOMMENTS where COMMENT_LOCATION='%s'AND COMMENTLOCALE ='" + session.getLocale() + "'",
 target,
 "COMMENT_CONTENT"
 );
 } catch (RuntimeException e) {
 throw e;
 }
 return commentContent;
 }
 /**
 * Should not be called at all because we are returning false in
 * isCommentaryRedirect(session, target)
 */
 public String getCommentaryURL(InterviewSession session, String target) {
 throw new UnsupportedException(
 "Should not call getCommentaryURL when is isCommentaryRedirect returns false.");
 }
/**
 * Returns true if the commentary for the target is available
 */
 public boolean hasCommentary(InterviewSession session, String target) {
 TypedInputStream commentLocation = null;
 /**
 * use the target and separate the locale for multilingual Web Determinations
 * with Commentary in our table
 */
 try {
 commentLocation = executeSQL(
 "select COMMENT_LOCATION from OPACOMMENTS where COMMENT_LOCATION='%s' AND COMMENTLOCALE='" + session.getLocale() + "'",
 target,
 "COMMENT_LOCATION"
 );
 } catch (RuntimeException e) {
 throw e;
 }
 return (commentLocation != null);
 }
/**
 * Returns true if the commentary for this Web Determinations Interview is
 * available
 */
 public boolean isCommentaryEnabled(InterviewSession session) {
 // check database connection
 try {
 connectDBObjects();
 closeDBObjects();
 return true;
 } catch (Exception e) {
 return false;
 }
 }
/**
 * The example always returns false because the plugin doesn't redirect to
 * another URL to fetch commentary content.
 */
 public boolean isCommentaryRedirect(InterviewSession session, String target) {
 return false;
 }
/**
 * Registers the plugin if and only if the rulebase is
 * 'WHATEVERYOURRULEBASENAMEIS'
 */
 public InterviewSessionPlugin getInstance(InterviewSessionRegisterArgs args) {
 System.out.println("Rulebase identifier is " + args.getSession().getRulebase().getIdentifier());
 if (args.getSession().getRulebase().getIdentifier().equals("WHATEVERYOURRULEBASENAMEIS")) {
 return new ODECommentary();
 }
 return null;
 }
}

Setting it Up

Of course this is not professionally coded and should not be used for anything beyond a learning exercise. After compiling your JAR file, drop it into the

Release\web-determinations\WEB-INF\classes\plugins

folder of your rulebase to test it. Don’t forget that the rulebase name is in the code, to only use our custom Plugin when a certain rulebase is loaded.

Make sure that you have placed edited the section of the code that mentions your server, database and the SQL query.Move any SQL Server drivers into the relevant classpath for your Server (again, for this demonstration we will not deploy on a live server, we will use the embedded one that comes with Oracle Policy Automation) so it might be that your sqljdbc4.jar or similar needs to go in a folder  like

C:Program Files\OraclePolicy Modeling\EmbeddedTomcat\lib

Running the Plugin

Enter at least two lines into your Database Table, preferably using the example (the Summary Screen) for simplicity. Make sure each of the lines has a Locale. Ensure that your rulebase provides either base content or translation files to cover your two Locales.

Run the Web Determination Session from Oracle Policy Modelling with Ctrl + F5. Of course you will need least one question ready to  be asked in your Web Determination session.

ODE Commentary Plugin

In our case as you saw above we are ready to run our session. In the english version we see the text from the appropriate table in our Determination Window.

And the same for the French version, but with the appropriate Commentary of course. For multi-lingual projects particularly this might open up a more manageable, ongoing and interactive approach to Commentary content.

There is a very short video on the web to see what the example looks like here. Happy Commentarying!


Note: The attached files have been removed. If you are interested in them contact the author

Oracle Policy Automation – Commentary Plugin