The OPA Assess Method in Oracle Policy Automation Determinations #1

In this short series we are going to walk through using your Oracle Policy Automation Hub, which you have set up perhaps using our step-by-step guide, to create and execute a Web Service call using the OPA Assess method. This will require you to have the following ready to hand

  1. SOAP UI for testing purposes
  2. An Oracle Policy Automation Hub in your self-study environment
  3. Word and Excel
  4. The correct version of the Oracle Policy Modelling application for your Oracle Policy Automation Hub

Let’s get started:

For the purposes of this example, I created a simple Project that uses the following attributes. The details are not really important, but here is the rundown and the explanation.

  1. An entity named “the horse” and another called “the jockey”
  2. A relationship of type 1:1 between the horse and the jockey whose text is “the horse’s jockey”
  3. An attribute called “the jockey’s number” in addition to the default identifier attribute “jockey” which is automatically created
  4. An attribute called “the horse’s status”
  5. A Global attribute called “the date of the race”
  6. Make sure “all the instances of the horse” and “all the instances of the jockey” are changed to “the horses” and “the jockeys”
  7. Make sure that all attributes, entities and relationships have names specified. In my case for the relationships I used contracted versions of the actual text, such as “thehorsesjockey” and “thehorses” and “thejockeys”. You can use whatever you would like.

The following “rules” were added. In Excel, the horses are instantiated. The logic is puerile and not important.

OPA Assess Method

Then a couple of extra goals are set up in a Word document.

OPA Assess Method - Word RulesThe main reason for having this silly structure is to be able to demonstrate handling the following :

  1. Passing Global attributes and Entity attributes in the Request
  2. Returning Inferred Instances in the Response as well as other goals

Now you can upload your version to the Repository and Deploy the Project. Once deployed, log in to the Oracle Policy Automation Hub and make the following changes for the Project in question, in the Deployments section: change the available access methods:

OPA Assess Method Setup

This ensures that for testing purposes, your Project is only available through Determinations API.

Verify that in the Permissions section, the username and password is required for Determinations API calls.

OPA Assess Method Permissions

Next, ensure that the user that you intend to use for the Web Service access, has the Determinations API access as part of their permissions:

OPA Assess Method

Finally, click the Web Service URL in the Deployment details for your Project and save the resulting file to a suitable location, ready for use in SOAP UI. This takes a couple of steps.

You will have to enter your username and password. If you are unable to proceed past this point, check that your user has the permissions shown in the previous screenshot. Now download the most recent (in terms of version) Web Service definition by clicking the link shown. This is the file that you need in SOAP UI.

Open Soap UI and create a New SOAP Project for the OPA Assess Method. The dialog box for the New Project will look a little like this. The items marked are as follows:

  1. The file you just saved
  2. A name you want to give to this series of tests

OPA Assess Method Soap UI Setup

Once the Web Service definition has been imported you should be looking at something like this, in the SOAP UI window:

OPA Assess Method

Well done on getting this far, you are now ready to test and investigate your Web Service. In part two, you will configure both of the available methods (Assess and ListGoals) in order to complete your work. Onward to part two!