Skip to Main Content

Intelligent Advisor

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error rules using error() and custom functions

Jonas Ringer SVBDec 10 2024

Hi,

Being very excited about the possibilities of custom functions, I tried adding some to one of our existing OPM projects. Unfortunately on doing so I got an error telling me to use an entity-function (OPA-E00209). The error could be traced back to an error rule for one of the project's entities, that uses the error()-function.

I recreated this scenario in a small test project with one entity (the person) and I got exactly the same problem. The error rule (in this case for the entity ‘the person’) works fine as long as there is no custom function:

Error(“The person’s birth date cannot be in the future!”) if
the person’s birth date > the current date

As soon as I add a custom function, the error rule no longer works and I get an error telling me to use an entity function.

In my project I need the error rule to fire for every instance of the entity, so for me I don't think using an entity function is really an option.

My guess is this behaviour is somehow related to custom functiones being faux entities. But I don't know how or why.

Any help is greatly appreciated!

Best regards,
Jonas

This post has been answered by Fiona Guy-Oracle on Dec 16 2024
Jump to Answer
Comments
Post Details
Added on Dec 10 2024
10 comments
131 views