Groovy Script support by Oracle ADF 11g gives us good flexibility to operate attribute values and implement business logic. Often you need to parse String type attribute values - it can be easily done using Groovy script directly in ADF BC.
Download sample application - GroovyStringMethods.zip. This sample implements validation rule for Salary attribute:
Validation logic is pretty basic, it compares old and new values, if attribute value was changed - it fails:
Now is interesting part - validation execution rule. Here I'm calling substring() method for String type Salary attribute directly in Groovy script. If JobId of current employee starts with IT, only then validation rule is triggered:
I can use toUpperCase() method as well. Using Groovy, LastName attribute is converted to upper case:
On runtime, String type attributes are successfully parsed, validation rule is invoked and it prints LastName in upper case:
Special thanks for researching this, going to my colleague - Inno from Soweto :)