Custom Functions – Use Cases and Usage #4

In part four of this three part series 😉 we look at how custom functions can operate with Decision Services. This opens up even more exciting ways to leverage custom functions and streamline rules that access decision services, for example in the domain of reference data (but not only). The behaviour of the decision service once again is conditioned by the fact that a custom function is an entity. Let’s look at the example process and work through it.

Find the other parts in this series : one / two / three.

I have a decision service set up on my Hub, with the same structure as the Excel file I showed you in an earlier article. The ease of maintenance of the Decision Service format means it is a logical choice for large reference data tables.

Custom Functions DS

As you can see above, the value of the reference data item is set up as the output.

Let’s set up our custom function so that we are ready to consume the reference data.

Custom Functions Definition

Our custom function definition maps completely to the decision service, as you would expect. Now we can connect the two parts of this by adding a reference to the decision service, as usual, in Oracle Policy Modeling:

DS Reference for Custom Function

I’ve highlighted the important part. Our Decision Service is referenced in the context of the custom function “entity” ensuring that if we call it multiple times from our project we can get different values for different reference data. Now let’s add a simple rule to the person entity and calculate the reference data item “SMIC” per person.

Dropping this into an interview, we can see that the decision service is being called each time the custom function is used, and returning a suitable value.

Going one step further, we can add an attribute or two. It is very common in some legislative environments to need the reference data at different dates for the same person. A familiar one might be, you apply for something on the 15th of the month, but the reference data is used that was valid on the first day of that month. In our case we will add a simple extra attribute that calls the reference data function for a value 300 days before the application date, and we will add another attribute for a second reference data item.

Our interview responds with the following information, as expected:

There are plenty more reasons to like custom functions, and they are no doubt going to be enhanced as time goes on, but this is a great start!

Documentation about custom functions is online, of course.

Author: Richard Napier

After 8 years in case management and ERP software roles, 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 Intelligent Advisor IT Consulting OÜ. Owner of intelligent-advisor.com, 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.

Intelligent Advisor IT Consulting Serving Customers Worldwide
Hide picture