Policy Automation has a vast array of Functions that can be called into service at one time or another. Many of them are very specific and we will try and discover a few more of them before the end of this series.
But we can take this opportunity to share with you a couple of “cheatsheets” that we give out sometimes in the Policy Automation training courses. These are PDF files with examples of lots of useful Functions from Oracle Policy Automation.
If you get Error 500 just click the Back button and try again
[stamper_download_button_for_wp_user file_url=”http://www.theopahub.com/mainfiles/OPAL/STRING/TextFunctions.pdf” button_text=”Download Text Functions Now”]
[stamper_download_button_for_wp_user file_url=”http://www.theopahub.com/mainfiles/OPAL/DATETIME/DateAndTime.pdf” button_text=”Download Date Time Functions Now”]
In this episode we will consider another key function
1) The IsMemberOf Function
This function can be useful in determining membership of a Reference Relationship. It is called “inferred membership”
To begin let us examine the scenario for the IsMemberOf function.
The IsMemberOf function (or “is a member of”) can be used in two different ways. Firstly as a conclusion, but also as a condition. Let us take a look at them both in a practical example.
Back at our Workshop we want to find out which cars are Italian, since they may require expert care and attention. We might be tempted to write something like this almost straight away, so simple this function sounds.
Hopefully you can see there is a problem. The New Attribute dialog box which appears when you click Compile is showing two boolean Attributes. That does not sound like what we need to make this work. In fact we need firstly to create our “Italian cars” – specifically we need a Relationship to hold the cars we are looking for.
When we compile our simple rule after this, there is a difference:-
And likewise, our Word document shows that the IsMemberOf function is now correctly included in our conclusion.
If we build and debug our rulebase, and populate the new Boolean Attribute “The car is serviced weekly” for each car in the workshop, we will be able to see the results as shown below.
Notice the yellow icon and the nature of the relationship – it is inferred and cannot be directly changed. Only by editing the Boolean Attribute can we change the members of the “Italian Cars”.
IsMemberOf as a Condition
The same function can also be used as a Condition. For example :
The syntax is straightforward as you can see.
The IsMemberOf function gives us flexibility to create inferred relationships.