Defining and importing the user-defined functions
In this recipe, we will illustrate how to define the custom functions in Java and how to import them into JDeveloper for the XSLT mapper.
How to do it…
The following text will cover the steps needed to define the custom functions and import them into JDeveloper:
- We start by opening an empty Java project in JDeveloper.
- In the Java project, we create the Java class (
ValueWithUnit.java
) that is used as a placeholder for the function logic. What we do is concatenate the value of the field with its corresponding unit as follows:public class ValueWithUnit { public static String formatValueWithUnit(String value, String unit) { return value + " " + unit; } }
- Next, we prepare the configuration file. We create ...
Get BPEL and Java Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.