Welcome to the OPA Hub!


Category Archives: Self Study

Table Headers Tabular Layout Trick 7

Table Headers : Tabular Layout Trick

Table Headers : Tabular Layout Trick

Updated 18th March 2020

[Update Start

Thanks to assiduous reader Steven Robert (see the comments) who reached out and pointed out some annoying side effects and  a requirement, now I get to revisit this topic after a while away. As luck would have it, I was working on a similar situation to the one Steven describes, and I had not been timely in updating this post. Thanks to him and here is the updated version of the concept, with explanations.

  1. As the original post mentioned, and Steven pointed out, the selector used in the example is unreliable
  2. Steven proposed a new selector and solved that issue, making it multi-column as well

But the downside is the lack of display when the table is first instantiated. We need something capable of reacting before the think cycle kicks in.

In order to  achieve something like this, our “payload” needs to be part of the table that is displayed automatically. So the obvious candidate in this case is the label extension, since the first column is actually a label anyway. You could extend this concept to include other controls, but  it would require more heavy lifting as you would probably end up, if you were unlucky, building an entire Entity Container. We covered that in the JavaScript Extensions book and it isn’t usually a short effort. Anyway, we have a label so we are cool.

Our label extension has a mount key which fires when the label is displayed. So if the table is displayed, the label code will kick in. So we can be ready as soon as the table is ready. Secondly, we could in theory add several label columns and have custom headers for each of them (you could of course achieve that using non-JavaScript techniques).

Here is the walkthrough based on the previous Project (with the credit cards and visa cards which are derived as a subset of the credit cards).

  1. Add a label in the row in the table and add custom properties. It should display whatever attribute is appropriate.
  2. Generate a standard label extension and edit it a bit.
  3. Add the custom properties to trigger the code when the label is displayed.
  4. Add another label if you want (I ran out of originality but added a second one for demonstration purposes).
  5. Fire it up in the Debugger, and then in the Browser.

I didn’t go all the way to deployment but it looks like it could be elevated into a viable concept. Also, I wasn’t a very good citizen as I didn’t do any checking to avoid my code running every time the label is instantiated – I would most likely check to see if the header already had the text I wanted to avoid setting it again.

And finally, of course if you want the Project Zip just leave a note in the comments!

Here is a walkthrough video. Hope it makes sense!

Update End]

Original Post :

There is always much discussion when users first discover the Interview tab. Let’s be honest – not all of the comments are exactly positive. It all feels a bit, well, basic.

There are a number of things that catch you out at first (and indeed, later). So let’s take a moment to study tabular layouts and a common issue.

For this example I’m going to use the same project (Credit and Visa Cards) as the previous post, since that gives us two entities to work with.

Tabular Layout

Let’s consider that you want to display both entities using tabular layout. You create a Screen and set them both to tabular display. But let’s assume that you want to display the Visa Card with a couple of specifics. You want to include the provider of the credit card. So let’s set that up as a Value List and use an attribute on the Credit Card, and infer it on the Visa Card:

Table Headers Tabular Layout Trick 1So, with that now done, we want to display the Visa Card provider in the Entity Collect (as it is an inferred entity, we cannot use an Entity Collect). But we want to display it as a label as you can see in this screenshot (we added a name to the attribute as you saw in step one so we can reference it in our Screen:

Table Headers Tabular Layout Trick 2Notice how we added a label and used that to display the text of the provider? Using a label ensures three things

  1. It is read-only
  2. If the user is tabbing from input to input, the cursor will not get stuck in that field
  3. It doesn’t look like a read-only input, just a label (which is what we want).

But the downside is that the label does not have a table header in that column, since the Interview designer only adds those for Inputs:

Table Headers Tabular Layout Trick 4

I find it a shame that we cannot put table headers in this “tabular” column, since in HTML a table should have column headers. In fact if we take a moment to inspect this table in the browser, we note that annoying, there is a table header in the table:

Table Headers Tabular Layout Trick 5

So, we need to get that table header populated with our chosen text. But how shall we do it? We don’t want to create an Entity Container extension, since that would mean we have to do the whole thing from top to bottom. So we only want a little tiny change. We have a couple of choices.

  1. Create a Style Extension for the Entity Collect
  2. Create a Label Extension for stealth modification

Let’s try the first option, since it reveals some interesting facts about Styling Extensions. Firstly, get ready by doing the following; change the text associated with your entity in the Interview by double-clicking where the rectangle is, and entering whatever text you would like to display in the missing header.

Then add a compound Styling Extension to your Project. Tabular Containers allow for nested styling, like this:

OraclePolicyAutomation.AddExtension({
style: {
tabularContainer: function (control) {
if (control.getProperty("name") === "xContainer") {
style: {
headerRow:
YOUR STUFF GOES HERE
 
}
}
}
 
}
});

Notice the “headerRow” is a child of “tabularContainer”. And notice the line that says YOUR STUFF GOES HERE. Now for an interesting fact about Styling Extensions. They behave, to a reasonable degree, just like Control Extensions. They are really one and the same thing – the main difference of course is the handlers that are exposed in Control and Interview Extensions.

Drop jQuery into your resources folder, and then replace YOUR STUFF GOES HERE with the following line:

$("#opaCtl4th0").text(control.getCaption());

Of course, the jQuery selector may be different for you but it is easy to find the “header” I illustrated in the previous screenshots. Open your Project in a real Browser (Ctrl+F5) for debugging and take a look at the results:

Final Header Result

Our Styling Extension has added the text to the header, drawing it from the Interview Screen Entity Container definition, and we have it where we want it. Of course, you could style it as well.

But it goes to show that Styling Extensions are really not very different to Control Extensions!

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!

New Quizzes – New Prizes!

New Quizzes – New Prizes!

Our Quiz-making team has been hard at work setting up more quizzes to keep you entertained. We now have a grand total of 10 quizzes for you to practice your skills on (go to the Quizzes option on the main menu of this site). Plus, to give you even more of a challenge we have introduced the Complete Prize OPA Quiz for 2019. It contains all 100 questions from the individual quizzes, rolled into one quiz with 100 questions and only 90 minutes to finish it.

It will be reset each month (you can only take the quiz once per month) and new questions added / old questions removed as months go by. For our first month we are  offering a $50 US Amazon voucher to the winner, to be decided on 28 February – since January is almost finished. Find out more here. The runner-up will receive the OPA Hub Official T-Shirt, and the third place an OPA Hub Official Mug!

Get Prepared

Here are the links to the individual quizzes. Our research shows that these help new-starters get an idea of their knowledge gaps, and help build confidence in the product. It doesn’t matter if you are just having fun or perhaps you are preparing for an interview or even the Certification exam, they can be helpful and certainly will test your reflexes. For these new quizzes we have added some “non Multiple Choice” questions – drag and drop, sort and order that kind of thing – to give your mind something a little different to focus on.

Individual Quizzes

Oracle Policy Automation Quiz : Part One (10 questions, timed)

Oracle Policy Automation Quiz : Part Two (10 questions, timed)

Oracle Policy Automation Quiz : Part Three (10 questions, timed)

Oracle Policy Automation Quiz : Part Four (10 questions, timed)

Oracle Policy Automation Quiz : Part Five (10 questions, timed)

Oracle Policy Automation Quiz : Part Six (10 questions, timed)

Oracle Policy Automation Quiz : Part Seven (10 questions, timed)

Oracle Policy Automation Quiz : Part Eight (10 questions, timed)

Oracle Policy Automation Quiz : Part Nine (10 questions, timed)

Oracle Policy Automation Quiz : Part Ten (10 questions, timed)

Have Fun!

 

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.

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.

Getting Started with Oracle Service Cloud : New Book

Getting Started with Oracle Service Cloud : New Book

Oracle Service CloudCo-Founder of the OPA and Siebel Hubs Richard has found the time to write and publish another book in his “Getting Started with” series. After Getting Started with Oracle Policy Automation, here comes Getting Started with Oracle Service Cloud. It’s available now from the usual outlets and from the OPA Hub Shop of course.

Richard explains that the Service Cloud title was a logical addition to the family since Oracle Policy Automation and Siebel CRM are common integration partners for this product. Added to which he said he liked the picture of beetroot and wanted to write a book with it on the cover.

Finally, on a more serious note, preparing for Cloud integrations and hybrid deployments has never been more important to ensure our CRM skills are up-to-date.

 

New OPA Quizzes : Helping you learn Oracle Policy Automation

New OPA Quizzes : Helping you learn Oracle Policy Automation

 learn Oracle Policy AutomationWe’ve begun rolling out our latest feature, namely interactive quizzes for you to test yourself on Oracle Policy Automation and Modeling. We are always looking for ways to help you learn Oracle Policy Automation.

The first two chapters are now live on the site, and we will be adding more and more as the weeks go by. The quizzes are free of course and we maintain a leaderboard for each quiz so you can see how well you have done.

In the next few weeks we will also be publishing the complete chapter set as one, giant quiz for you to use in your preparation for your next interview, or even as a preparation for your upcoming certification examination if you are planning on taking one. In any case we hope that you enjoy them and have fun with them. Share them with your friends as you  learn Oracle Policy Automation.

And while you are at it, reward yourself with a mug from the Shop. Maybe we will give away a few mugs at the end of the year to the Leaderboard Winners. Yes, that’s a nice idea. At the following page you will find the OPA Quizzes and the links to the OPA Quiz Leaderboards.

Back to Basics 6 – Always Check your Parse

Back to Basics 6 – Always Check your Parse

This is of course connected to the previous remarks about constructing phrases with booleans or non-booleans. But I would like to take a moment to go a little further and remind those of you starting out of the importance of the parsing process. In some ways, the old Version 10 user experience, where the parsing engine results were popped up in Word directly, when you validated / compiled your work, was easier to explain. It oriented users towards the idea of checking the parse straight away:

opa-10-select-parse

In the above example, everything is fine. But the process was useful when the writer had failed to be clear in their ideas, because at least then the Select Parse window showed there might be a bit of a problem right after we clicked the button:

opa-10-select-parse-double-list

So in the case above, we can see that there are two verbs in our made-up phrase, and the parser has flagged that to us. In Version 12, the validation process no longer shows the dialog above – te process is largely silent and transparent. I can see this as a benefit in terms of experience but it takes away the immediate sense of checking the text and parse. To get the same sort of information you have to go into the Attribute list in the Data tab, double-click the Attribute and then click the Change button shown below:

opa-12-edit-attribute-parses

I just think that it could be a little easier for users to find. But I’m just a slow learner. I would however say that this deserves to be in our top ten of back to basics items, since checking the parse and verifying the coherence of the generated text is something to get used to very early on. And it is valid for any language that is supported by Oracle Policy Modeler.

A quick thank you

While I am writing this, I want to thank all our readers and happily report that we have just gone past the 100 post mark. Here’s to the next 100!

Until the next time, take care!

Back to Basics 4 – Levels in Oracle Policy Modeler

 Back to Basics 4 – Levels in Oracle Policy Modeler

One of the things that students struggle with in the Oracle Policy Automation Essentials class which was offered by Oracle University for OPA version 10, but never upgraded to version 12 (something which I struggle to understand, and I will freely admit so do the customers I meet, to the point where I am obliged to deliver version 12 Essentials using custom environments and complicated workarounds from an administrative perspective) is the concept of Levels in Oracle Policy Modeler in writing rules.

Perhaps the term “levels” is the problem. Anyway, here we go

Basic Idea #4 – Rules written in Word can express logic in a hierarchical fashion, for example

Levels in Oracle Policy Modeler

If it helps get a grip on this hierarchical layout, consider the following alternative :

Levels in Oracle Policy Modeler Alternative

In both cases the structure of the rule is hierarchical, in the second case each subordinate conclusion is presented separately. In the first instance they are all included in the first premise, as nested levels. Notice the “OR” in the first example, and how it is yellow in color, because it relates to the comparison between the two yellow components – more correctly, it compares two level one conditions, which themselves have level two conditions. It is a common issue for beginners to misplace the “OR” or to color it with the wrong level of nesting.

There are upsides and downsides to both approaches, and there are plenty of other criteria (mapping to source documentation, readability, ease of location and display in interviews to name just a few) that may drive how you write these nested structures. But as a new starter, considering that Levels in Oracle Policy Modeler show the proof needed to prove the higher level, can provide an easy to remember way to correctly nest your Word text in your Rule Projects in Oracle Policy Modeler.

Have a nice day.

Back to Basics 3 – Writing a boolean in Oracle Policy Modeler

Back to Basics 3 – Writing a boolean in Oracle Policy Modeler

Many times whilst delivering workshops or the official Oracle University training courses on Oracle Policy Automation, the group in front of me is a wide mix of skills and backgrounds. Those who come from the business side tend to, for obvious reasons, not have had large amounts of exposure to writing with constrained natural language or indeed for that matter maybe they have never actually written rules themselves. Instead they have been delivering detailed explanations, specifications and so on and then testing them for pertinence.

With Oracle Policy Automation, or Oracle Policy Modeler to be precise, some of these team members are now actually writing the rules. Maybe not all of them, maybe not completely, but the blended team has gotten a lot closer. One of the things that comes up regularly in the early part of their learning curve, and thus a good candidate for the Back to Basics posts – is how to write and not write Boolean statements in Oracle Policy Modeler.

Basic Idea #3 Boolean statements need a verb

Yes they do, and without a verb you are pretty much assured that Oracle Policy Modeler will validate the rule but will not interpret it in the way you had hoped. Consider the following example rule. I have clicked the (bizarrely named in my humble opinion) Go To button on the Ribbon to display the details. Notice I am about to click on the Edit Attribute… button.

opa-12-the-go-to-dialog

The Edit Attribute dialog will show me the Attribute is a Boolean. Fine I hear you say, so what. I could write it like this instead. Look, it has even underlined it like it does with the other stuff – it must be working, right?

opa-12-bad-boolean

It depends what you mean by working of course :). Let’s take it step by step.

  1. For a Boolean to be acceptable to Oracle Policy Modeler, it must be negatable. Or, it must be written in the negative, and be able to be expressed in the positive also.  For example, the following is a perfectly acceptable Boolean conclusion, being just the negative version of the initial conclusion I showed you a minute ago.

2. For a Boolean to be acceptable to Oracle Policy Modeler, it must use a verb that is in the list of verbs.

3. When you open the Edit Attribute dialog in Oracle Policy Modeler for a Boolean attribute, you should see four different phrases in total that will look like the following

opa-12-boolean-attribute

They are, the positive, the interrogative, the negative and the uncertain. These are the states that your Boolean can have. If you look at an attribute and you see this instead:

Then you are not looking at a Boolean. In this case you can see the interrogative, the assertion, the uncertain and the unknown. Of course the little icon saying “Text” also shows you something is amiss.

It is absolutely critical to get in the habit of checking your attributes before you launch Word. Picking up issues early will save heartache later.