The answer is; there are none. It can be very confusing but the Oracle Policy Modeler interface does not let you build a hierarchical list, it only lets you look at one you made elsewhere (or imported from elsewhere) and then use it. Let’s get a quick example off the ground. Imagine two lists, each defined in your Project as Value Lists in the appropriate manner, with a type of Text.
It does not take too much imagination to imagine that these two, Aircraft Type and Aircraft Model, need to be arranged in a hierarchy. But there are no buttons to help you. So you need to follow the next few simple steps to get this sorted.
- Use the Export Button to export the Parent list (whichever is the top part of your two levels)
- Use whatever editor you like to observe the XML structure. You are about to modify it.
- Edit the XML file to add the necessary children to your XML hierarchy.
As you can see above, there are several things to remember – you are adding a new structure called <child-values> which must also have a closing tag. Secondly, remember to double check your new <text-values> are in closed tags as well, and finally verify that they are inside the parent <value> tag.
- To finish , add an extra attribute to the top of your XML file in the main value-list tag called <child-list-name>:
- Now you are ready to re-import the list you just modified, back into your Project. You should see a message like this one. If you do not, there is probably an error in the XML file, or you have mis-typed a value or list name.
Revisiting the Value Lists will now reveal a new button in your Oracle Policy Modeler user interface.
And as you can see above there is now also a visual reminder of the hierarchy on the left. Clicking the button highlighted above will produce a very simple window for testing your new structure.
Any edits to the relationships will have to take place back out in your XML file and be reimported again.
We are not quite finished. Don’t forget to implement the appropriate filtering in your Project attribute. Here in our example, you can see I have applied the Value list to the attribute, and also selected the correct Value List which will filter the choices available.
And to round it off, add the two controls needed to display the above information (assuming you have a rendered them pertinent to your overall objective), then display them thus:
You will see the hint text is reminding us of the filter that is in place. In Debug mode we will see the second list is left inactive until we select a choice.
As soon as a Parent Value is selected, then the relevant values are displayed in the Child List.
And so our Oracle Policy Automation Hierarchical List is ready for use. Until next time!
EDIT : Following on from Pablo’s question, it is possible to add multiple levels to create multi-level-hierarchies. Add the next level as a new Value List. Then export the level that you want to be the parent of this new List (so if you have A, B and C is the new Value List, export B). Edit the file in the same way as before, adding the child-list-name to the section relating to the B values, and then re-import the B list. The connections will be updated.