Creating Global Functions: Explained
To create a global function, do the following:
-
Click Navigator, and select Application Composer.
-
In the Overview window, click Global Functions.
-
For each Groovy script file do the following:
-
Select the row, then click the Action drop-down list, and select Add.
The Create Global Function window appears.
-
In the Function Name field, enter the function name from the first comment in the Groovy file.
-
From the Returns drop-down list, select the return type specified in the second comment in the Groovy file.
-
In the Parameters list, click the Action drop-down list, then click the Add icon.
-
Enter the name and type for the first parameter listed in the comments in the Groovy file.
-
Repeat the previous steps for the remaining parameters.
-
Copy the Groovy code from the file into the Function Body window.
-
Click Validate to validate the function.
Note: When validating, certain functions trigger warnings. This is expected; you can click OK to continue. However, if an error is triggered, then contact Oracle Global Customer Support. -
Click Save and Close.
-