Tag: Debugger

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.

OPA 12 – Custom Styles and JavaScript visualization

OPA 12 – Custom Styles and JavaScript visualization

Whilst it is clear that over-customized Oracle Policy Modeler Interviews runs counter to the spirit and goals of having packaged software provide dematerialized interviews out of the box, it can and will be necessary to personalize the content of the interview to match for example the graphical standards of the customer’s own website or other applications.

In Oracle Policy Modeler, such customization is achieved in the Interview Tab, under the Styles Button.

OPA 12 - Styles Dialog

We can also add custom JavaScript or CSS files by clicking the Custom Files… button at the bottom left. Obviously we want to be able to review the HTML and CSS content of our interview. However, when we run the Debugger, the Embedded Web Browser that is used (essentially an embedded Internet Explorer) does not have the different debugging options we would expect – for example, there is no View Source option on the Context Menu in the OPA 12 Debugger. This can be quite irritating since you want to view the output HTML. You can improve your situation by doing the following (this involves changing the Windows Registry and you should not do that unless you are comfortable with it, and I will not be held responsible for anything you do). Add a new Registry Key under this existing key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer

You will need to add another couple of Keys:
OPA 12 - Change View Source

In the above example I have implemented Notepad ++ as the default viewer for Source from Internet Explorer (this works in the Embedded Web Browser too). Now I can right-click the debugger of OPA 12 and select View Source, and open the file in Notepad ++.

OPA 12 - View Source Option

And the file opens for viewing and consultation. This can be useful for learning about the different CSS classes as well as simply understanding how the HTML files actually work.

OPA 12 - HTML Source

Have a good day and see you soon

Rich@rd

Worldwide
Logo by Southpaw Projects LLC