Welcome to the OPA Hub!

Archives

What is Happening Here – Date Function with Wrong Date

What is Happening Here – Date Function with Wrong Date

See if you can guess : What is Happening Here?

Below is a project written in Oracle Policy Automation 12 (this was actually in 12.18B but it has no bearing on the example). It has only one attribute : the date of the next visit. This is written as follows:

The date of the next visit= YearEnd (AddYears(the current date;1))

The date you are running the Debugger, the current date is November 19, 2018. The rule should perform a simple assignment, taking the current date, adding a year and then using that as the input for the YearEnd function. So :

YearEnd(November 19, 2019)

This should give the value of December 31 2019. Also, there are no other attributes in this project. There are no JavaScript extensions, no custom controls, no CSS or other additions. The project is being built using English language. The project does not have any translations, forms, or anything else inside it. But the Debugger  session of the Oracle Policy Automation Interview displays the following:

OPA 12 - What is Happening Here

The date is incorrectly showing 12/31/20. So what is happening here? Even more fun, the Data tab of the Debugger shows the following:

OPA 12 - What is Happening Here

The value is correct on the right, wrong on the left. So what has happened to the Oracle Policy Automation project in this example?

You are free to give the answer, if you know it, in the comments. I will come back in a couple of days and explain. And before you ask, yes, I can across this in the real world yesterday and it is not a bug, it did not require a Service Request, and somebody had done something. The behavior is entirely reproducible I would imagine in any language.

Sometimes you want to write about something (in my case, I wanted to look at Silent and Hidden settings) but life gets in the way. This was such an amusing thing (with hindsight) that I decided to write about it instead.

Enjoy this and hopefully you will immediately have spotted the possible culprit. You can peruse the documentation online here.

What’s new in Oracle Policy Automation 18D?

What’s new in Oracle Policy Automation 18D?

The dust from Oracle OpenWorld has hardly settled and here we are with the final release of Oracle Policy Automation for 2018, the eponymous 18D. So what is new in this final release 18D? Here are the big picture items that may have impact on your daily life. Note that as of the date of this post, only the Documentation was available, the product is not yet Generally Available.

Enhanced Attachments

Now,  Service Cloud Interviews can organize their uploads better. You can create upload groups (sort of categories) as well as setting the number of files, allowed extensions and underlying Entity mapping. If you are upgrading a Project, you get a single Upload group per Entity that has an upload. This functionality is not available for Engagement Cloud yet.

What's new in Oracle Policy Automation 18D

Version Pinning

This is probably going to be a big impact (in a very positive way) for many large customers. It provides, starting in 18D, the ability on the OPA Hub to defer a Project Upgrade and do it at a later time rather than when prompted by your 19A or whatever later version you happen to have installed.

What's new in Oracle Policy Automation 18D

Client Authentication for Web Services

When your Oracle Policy Automation Connection is getting or setting data that is sensitive in nature, you want to have client authentication enabled : only authorised sites (Oracle Policy Automation instances) that have the certificate will be accepted, and the communication will therefore be two-way SSL.

Forms on Mobile

Forms using collected data and decisions made can now be generated when an Oracle Policy Automation mobile assessment is submitted to Oracle Service Cloud and sent to the appropriate Object in Service Cloud.

Calendar Input Choices

To align with the data entry standards of some large public sector organizations, you can now specify different data entry for Date and Time or Date Controls. Interview Extensions can further extend these controls.

What's new in Oracle Policy Automation 18D

Add Form or Signature multiple times

Now you can have forms (PDF forms) generated for multiple entity instances in the Project, and have all of them sent back to your connected data source.

Entity and Container styling in interview extensions

On the Extensions front, a new compound tabularContainer is available in the Styling Extension API, allowing for changes to be made to the tabular layouts familiar in Entity-related elements like Collect or Container. Sub elements like header row, cells, odd and even and so forth allow programming access to the Styling options we are used to seeing in the Styles dialog.

What’s new in Oracle Policy Automation 18D Summary

As usual the Oracle Policy Automation team has produced another great release with some really useful features. Onwards and upwards! If you want to read more online, the new documentation can be found here.

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]

The OPA Hub Website Poll : Results So Far

The OPA Hub Website Poll : Results So Far

I’m really pleased to see that visitors to this humble website are playing ball and answering the website poll that we are running at the moment. As a reminder we are trying to understand why people come to the website, in order to better serve our readers with attractive and pertinent content. So far here are the numbers. If you haven’t voted you can do so now. Remember you can vote multiple times if you want to get your point across. Anyway here are the partial results :

What Kind of Article do you want to read on the OPA Hub Website?

As you can see there is a pretty even split in terms of the most visited sections:

  1. Business Rules
  2. JavaScript Extensions
  3. Online Training

Training

We are really surprised about the number of people visiting us looking for training. So we are going to be investing in a range of reasonably priced training options to all people to meet their objective and get trained on Oracle Policy Automation. The range of solutions will include both electronic, virtual and real-deal training in a classroom. We feel it is strategically wise to offer all three, to allow our readers to choose the options they want.

As a reminder we already have a variety of classroom training that is available to book. We will be unveiling our plans in respect of online and virtual training before the end of the year.

Business Rules

Unsurprisingly this is a major reason for people visiting our site. We are lucky to be able to say that more articles of this nature are coming up thanks to our guest readers and an effort on our part to increase the number of business rule articles.

JavaScript Extensions

Despite the fact that JavaScript is clearly a risk factor in any Oracle Policy Automation project, it is a common request of customers and consultants alike to have more examples. So we will continue to add more and they will always be freely available on the OPA Hub Website Shop.

Keep watching this space!

 

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

One of the  most pertinent sessions of Oracle OpenWorld for Oracle Policy Automation fans was this one, hidden away on the agenda at 17:45 on Tuesday (if there ever was a graveyard shift, this was it!). It was a very interesting and inspiring presentation by Infosys charting their journey, changing the Sales and Services Landscape  in a large Australia and New Zealand bank, into the simplified world of Oracle Policy Automation.

Initially the presentation showed us how the Bank struggled, following acquisitions, with a wide variety of pressures and issues (regulatory, compliance, mixed branding, complex learning curves for employees, low adoption and slow time to market for new functionality. But the most fascinating part was learning about the benefits, increases in productivity and customer engagement that came out of this project. And the fact that the architecture diagrams included both Siebel and PeopleSoft only increased my heart rate.

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

The above slide showed the journey and the customer landscape. Definitely changing the Sales and Services Landscape in a positive way:

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

This one above gave a nice taster of the conversation in action : note the clean lines and navigation paradigm.

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

It is always interesting and humbling how much there is learn on projects, and this was no exception.

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

I particularly liked that the journey was by no means over, and the customer was looking to the road ahead both in respect of the current process (above) and also within different processes at the Bank.


Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

 

There certainly are many that will benefit from the impact of Oracle Policy Automation.

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

Infosys described in some detail how they went about the actual process of defining and implementing this conversation, highlighting the challenges:

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

Of course the customer now is enjoying many benefits of the arrival of Oracle Policy Automation.

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

 

This final slide is a great summary of the challenging landscape:

Oracle Policy Automation: Changing the Sales and Services Landscape [CAS2349]

Thanks to Infosys for making this last presentation of the day a most interesting and valuable one.

Guest Post : Time Based Reasoning Worked Example

Guest Post : Time Based Reasoning Worked Example

It’s with great pleasure that I introduce you to Evert Fernandes, CTO at Magia Consulting UK Ltd. A self-confessed OPA geek, Evert has stepped up and written this article about Time Based Reasoning (and hopefully some more ) for the OPA Hub Website. Thank you Evert and…over to you!

Time Based Reasoning (TBR) – also known as Temporal Reasoning – is one of those subjects that new OPA developers tend to struggle with. It’s a more advanced subject that – once mastered – can provide huge benefits to your project.

In this article I will try to explain what TBR is, present a use case and provide a walk-through on turning the use case into rules.

So, what exactly is Time Based Reasoning?

Time Based Reasoning allows the rule developer to create rules that include attributes which contain values that are subject to change over time.

It is able to conclude rules like:

  • What’s the amount of daily benefit the citizen was entitled to on June 26th, 2017?

Time Based Reasoning Worked Example

Let’s have a look at the following use case:

“How much benefit is the citizen entitled to between 01-01-2017 and 31-12-2017 (inclusive)”

The following rules apply:

  • If the person is not married, the daily allowance is $10. If the person is married the allowance is $14
  • The person can only claim benefit if the daily income is less than $200.

For the sake of simplicity, we will only look at a binary relationship status, married and single. The real world is more nuanced and complicated, but feel free to expand on this example. 😉

As you can see, the mix of variables already creates quite a complex and fluid situation, especially considering that any of the variables are subject to change over the period in question (01/01/2017 – 31-12-2017).

So, let’s start by looking at the first element and create some rules:

OPA 12 - Time Based Reasoning Worked Example 1

There are a number of things happening in these rules, let’s take a closer look.

First of all, a rule table has been created (ALT + Z) to determine the daily allowance amount based on marriage status, $14 when married and $10 when single. The single status is implied by the ‘otherwise’ conclusion, i.e. the person is single because the person is not married.

The second rule calculates the total allowance over the time period, starting on January 1st 2017 and ending on January 1st 2018. The reason the end date is January 1st 2018 and not December 31st 2017 is because the end date is not included, so we simply add a day.

The function is called IntervalDailySum and takes in three parameters:

  • The start date (inclusive) of the period over which the calculation needs to take place;
  • the end date (exclusive) of the period over which the calculation needs to take place;
  • the rule text of the attribute over which the total daily allowance over the period needs to be calculated.

In this example, we provide hard coded values for the start and end dates. In the real world, the start and end dates will most likely come from date attributes.

We now need to test the rules. In order to do this, we start the OPM debugger and head to the data tab:

OPA 12 - Time Based Reasoning Worked Example

As you can see, not a lot is happening here. Let’s give the citizen a marital status by setting the value of ‘The citizen is married’ to ‘True’.

OPA 12 - Time Based Reasoning Worked Example

So far, so good. We have a marital status and OPA is able to work out the total allowance (365 days x $14 = $5110).

Let’s now assume that the person was single at the start of 2017, got married on March 1st 2017 and was single again on September 1st 2017 (don’t worry, they’re still friends! 😉).

How do we enter that data? OPA provides a handy feature called ‘Change Points’ to handle this.

Let’s reset the value for the citizen marital status:

OPA 12 - Time Based Reasoning Worked Example

Click on ‘Change Points’:

OPA 12 - Time Based Reasoning Worked Example

What this allows us to do is to take the attribute and set different values for different slices of time.

You can use ‘Add’ to add a new change point. Once a new point is created, you can set the date and value at that point in time.

Let’s add two change points. One on March 1st 2017 with a value of True and the other on September 1st 2017 with a value of False. Use the Date picker below the change point list to pick the dates.

OPA 12 - Time Based Reasoning Worked Example

The eagle eyed among you may have spotted that I’ve set the value at the top to ‘False’.

What this is saying is:

  • Until March 1st 2017, the value is False.
  • Between March 1st 2017 (inclusive and August 31st 2017 (inclusive), the value is ‘True’.
  • From September 1st 2017 and after, the value is ‘False’.

So, click ‘OK’ and let’s inspect the effect of our handiwork in the debugger:

OPA 12 - Time Based Reasoning Worked Example

There’s a lot more information here and one of the first things you’ll notice is that the total allowance has changed from $5110 to $4386.

If we break down the individual periods, you will see why:

  • January 1st – February 28th = 59 days x $10 (Single rate) = $590.
  • March 1st – August 31st = 184 days x $14 (Married rate) = $2576.
  • September 1st – December 31st = 122 days x $10 = $1220.

$590 + $2576 + $1220 = $4386!

Have a play with different dates and change points and you will find OPA is very good at working this stuff out for you.

OPA also offers a way to visualize this data. Right click the ‘the daily allowance for the citizen’ attribute and select ‘Show in Temporal Visualization’:

OPA 12 - Time Based Reasoning Worked Example

A new tab will appear top left named ‘Temporal Visualization’. If you click it, you will see:

OPA 12 - Time Based Reasoning Worked Example

This visualization confirms that we start off with $10/day, changing to $14/day from March 1st and changing back to $10/day on September 1st.

Time to complicate things a little by adding another variable to the mix in the shape of the daily income.

Let’s assume that the citizen started 2017 with a daily income of $150. Then later in the year the income rose to $250 and later yet, the income dropped to $180.

In order to deal with this new variable, we will change the rule that calculates the daily allowance to include the daily income for the citizen:

OPA 12 - Time Based Reasoning Worked Example

Remember that OPA will evaluate top down, so first it will check to see if the person is married and whether the daily income is less than $200. If this is false, it will check to see if the income is less than $200 and finally, if the citizen is not married and the daily income is greater or equal to $200, the ‘otherwise’ clause will apply.

Make sure the updated rule validates by pressing the ‘Validate’ button.

Now let’s start a debug session and have a look at the outcomes.

Start your debug session and navigate to the ‘data’ tab.

Supply the exact same values as the first example, making sure to set up the change points correctly.

Fun fact: Chances are that OPA still has your previous values in memory, saving you the need to re-enter them!

Check to see that you’re still getting the correct values.

You should see something like this:

OPA 12 - Time Based Reasoning Worked Example

Let’s set the value and change points for the daily income:

OPA 12 - Time Based Reasoning Worked Example

Click ‘OK’ and inspect the values in the data screen:

OPA 12 - Time Based Reasoning Worked Example

As you can see, the total allowance has now been set to $1926 (down from $4386).

We can have a look at what’s been happening in the Temporal Visualization tab.

Make sure the following attributes are shown by going to the debug data tab and right-clicking and selecting ‘Show in Temporal Visualization‘:

  • the daily income for the citizen
  • the citizen is married
  • the daily allowance for the citizen

Go to the ‘Temporal Visualization’ tab. You should see something like this:

OPA 12 - Time Based Reasoning Worked ExampleOPA 12 - Time Based Reasoning Worked Example

As you can see, there’s quite a bit going on here and the daily allowance for the citizen will vary based on marital status and income.

What you will hopefully be able to see is that, when it comes to dealing with changing circumstances, things can get quite complicated quite quickly. In the example we only dealt with two variables but throw in more variables and working out the right amounts would become very complex! Utilizing the out-of-the-box OPA temporal reasoning functionality allows you to manage the complexity of dealing with changing circumstances over time.

More information on Temporal Reasoning can be found in the OPA documentation:

https://documentation.custhelp.com/euf/assets/devdocs/cloud18c/PolicyAutomation/en/Default.htm#Guides/Policy_Modeling_User_Guide/Temporal_reasoning/Temporal_reasoning.htm

or in the Function Reference:

https://documentation.custhelp.com/euf/assets/devdocs/cloud18c/PolicyAutomation/en/Default.htm#Guides/Policy_Modeling_User_Guide/Work_with_rules/Function_references/FunctionReference.en-US.html

Finally for those who were wondering, the daily amount that the user is entitled to on June 26th is…

OPA 12 - Temporal Reasoning Worked Example

OPA 12 - Temporal Reasoning Worked Examplewhich is $14!

Thanks to Evert for his time and excellent article abut Time Based Reasoning. Readers who what to look at more Time Based Reasoning articles can search here.

Until the next time. If you want to write for the OPA Hub Website, reach out via our Contact Page.

Extension Code Generators for JavaScript

Extension Code Generators for JavaScript

Over on my other home (https://siebelhub.com) we use and promote the use of Code Generators : because most of the JavaScript people need to create is in fact very structured, because of the underlying extension architecture. You don’t write just any code, you write code the way you have to write it. So how to write Extension Code?

It struck me the other day that this is equally true now for Oracle Policy Modeling – JavaScript extensions have a very well defined structure, and as I said above : you don’t write just any code – you write it the way you have to write it, in order to fit into the underlying architecture of our beloved interview.js.

Since I find myself often repeating the same JavaScript task over and over again – for example I need to create 2 custom Labels for 2 different projects or customers – I do a lot of cutting and pasting. But that often goes wrong as I forget I’ve renamed something or changed a variable somewhere.

So I decided to create a Code Generator – a sort of tool to create templates of code that I can use to create new files. And I decided to use Oracle Policy Automation for the job. Here is the sort of thing I am talking about:

Extension Code

By answering a few questions about the code you want to write, the Project generates a template for you to copy and paste into a new Text File and there you have your code to start writing something interesting. There is a Copy to Clipboard button at the bottom of the code.

In the end, I decided to add a few things to the examples to act as learning tools:

  1. The Input Control has Validate and Update options that help understand the way these Keys actually are supposed to work. Validate throws an error message to the user if the text entered does not match a specific validation rule.
  2. The Update Key shows how update is fired whenever anything on the Screen is updated. Useful for updating your Control in response to other activity on the Screen. As an example, the color of the Input changes each time Update is fired.

The Extension Code Generator also includes the custom Search as templates with the following options:

  1. Search lets you choose from a series of standard searches (Airlines, Railways Stations, etc) as well as allowing you to configure your own REST call and lets you add any Headers you need to make your call.

Here is a video that will hopefully shed some more light on what this Project does (or tries to do)!

This seemed like a fun thing to do in Oracle Policy Automation – if you would like a copy of the (18C) project then please leave a comment and I will tell you all about it’s foibles :).

Travel Compensation : JavaScript Extensions

Hi There!


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

To Register takes only 10 seconds and uses LinkedIn for authentication. It does not take your contacts or use any other permission.

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.

Article Survey : The OPA Hub Website

Hi There!


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

To Register takes only 10 seconds and uses LinkedIn for authentication. It does not take your contacts or use any other permission.

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.

Temporal Reasoning in Oracle Policy Automation #4 : Time Travel

Hi There!


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

To Register takes only 10 seconds and uses LinkedIn for authentication. It does not take your contacts or use any other permission.

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.