OPA – Entities Adventures #8 IsMemberOf()

[vc_row][vc_column][vc_column_text]

More Functions

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.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_text_separator title=”If you get Error 500 just click the Back button and try again”][/vc_column][/vc_row][vc_row][vc_column width=”1/2″][vc_column_text]

[stamper_download_button_for_wp_user file_url=”http://www.theopahub.com/mainfiles/OPAL/STRING/TextFunctions.pdf” button_text=”Download Text Functions Now”]

[/vc_column_text][/vc_column][vc_column width=”1/2″][vc_column_text]

[stamper_download_button_for_wp_user file_url=”http://www.theopahub.com/mainfiles/OPAL/DATETIME/DateAndTime.pdf” button_text=”Download Date Time Functions Now”]

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_separator][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

The Workshop

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.[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

IsMemberOf

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.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9090″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

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.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9091″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

When we compile our simple rule after this, there is a difference:-

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9092″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

And likewise, our Word document shows that the IsMemberOf function is now correctly included in our conclusion.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9093″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

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.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9094″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

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”.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

IsMemberOf as a Condition

The same function can also be used as a Condition. For example :

The syntax is straightforward as you can see.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column][vc_single_image image=”9101″ img_size=”large” alignment=”center”][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

Conclusion

The IsMemberOf function gives us flexibility to create inferred relationships.[/vc_column_text][/vc_column][/vc_row]

Richard Napier

Author: Richard Napier

Richard Napier joined Siebel Systems in 1999 and took up the role of managing the nascent Siebel University in Southern Europe. He subsequently was Director of Business Development and Education for InFact Group (now part of Business & Decisions) for 8 years. He now runs his Consulting and mentoring company, On Demand Consulting & Education Ltd and has run ODCE since 2010. Owner of the OPA Hub, he also is Co-Founder of the Siebel Hub.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Worldwide
Logo by Southpaw Projects LLC