Logging Groovy expressions
Groovy is a Java-like scripting language that is integrated in the context of ADF business components, and is used in a declarative manner in expressions ranging from attribute and bind variable initializations to entity object validation rules and error messages. It runs in the same JVM as the application, is interpreted at runtime and is stored as metadata in the corresponding business component definitions. JDeveloper does not currently offer a debugging facility for Groovy expressions. In this recipe, we will implement a Groovy helper class that will allow us to log and debug Groovy expressions throughout the application.
Getting ready
We will add the Groovy logger class to the SharedComponents
workspace. This workspace was created in Breaking up the application in multiple workspaces, Chapter 1,Pre-requisites to Success: ADF Project Setup and Foundations.
How to do it…
1. Open the
SharedComponents
workspace and create a new Java class calledGroovyLogger
for...