Oracle EPM is a global tool that offers its services in a wide range of languages. However, when it comes to error messages, most consultants only consider English. This may have been the case in the pre-EPM Groovy era, when we had to use the @RETURN statement from Essbase to show error messages.
In the EPM Groovy era, we have more flexibility in how we show error messages. We can use the Groovy language to internationalize our error messages, so that they can be displayed in the user’s preferred language. This is important for providing a good user experience for users who do not speak English.

USE CASE:
In my Groovy script, I want to write a validation condition that will check if the user inputs sales numbers in negative figures. If the user does input negative figures, the script will throw an error explaining the issue and stop the user input.
The steps are:
- Iterate only edited cells in a webform
- throw error if the cell.data < 0 with an error message
I am using MessageBundleLoader in EPM Groovy API to create localized error messages.
The languages that I chose for this demo are:
- English
- Japanese
Define the English Message:
def englishMessageBundle = messageBundle(["invalidInput":"Sorry! Inputs with negative values are not allowed {0}"])
Define the Japanese Message:
def japaneseMessageBundle = messageBundle(["invalidInput":"申し訳ございません。マイナスの値は入力できかねます。{0}"])
Load the Message bundles
def messageBundleLoader = messageBundleLoader(["en" : englishMessageBundle, "ja": japaneseMessageBundle]);
Utilize the Message bundle in the exception definitions
Multiple error messages can be defined based on the requirement. I am calling only invalidInput error message loaded.
operation.grid.dataCellIterator{DataCell cell-> cell.edited}.each { DataCell cell ->
if(cell.data < 0) {
throwVetoException(messageBundleLoader, "invalidInput", "${cell.getMemberName('Account')},$cell.periodName : $cell.data")
}
}
EXECUTION
I added a rule to my webform that will execute before the data is saved. This rule will check if the value is negative. If it is, the rule will stop the data from being saved to the system.
VALIDATING ENGLISH MESSAGES
01 – English – User preference

02 – English – Updating Negative Value

03 – English – Save data

VALIDATING JAPANESE USER
I have updated my language to Japanese in my user preference window.
01 – Japanese – User preference

02 – Japanese- Updating Negative Value
I don’t have multiple Alias tables now. So my form shows member names in English.

03 – Japanese – Save data

EXCEPTIONS
Let’s assume the error messages are defined only for Japanese and English. What happens if a user chooses a different language?
I have changed my language to ‘German’ this time.

I get the below error message when the user tries to enter a negative number.

The system is unable to load the resource files. It is important to specify the required language messages in the bundle loader.
CONCLUSION
Considering that we are serving numerous regions and utilize the max potential of the Oracle EPM platform. It indicates that the Oracle product development team gave careful consideration to and created those interfaces for the API build. I hope we get to see more features in the EPM Groovy library.
I hope this information is helpful.