IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Defining and transforming data > Transforming data > Transforming data using a business object map
Writing Java code in the Custom, Custom Assign, and Custom Callout transforms
In the Details tab, you can construct Java™ code in one of the editors embedded in the Properties view.
Constructing Java code visually
Use the visual snippet editor, you can construct Java code visually.For example:
- Transform input can be found under the Inputs category.
- Transform output can be found under the Variables category. This category also contains the temp variables, and other variables, such as change summary and logging.
For more details, refer to the documentation for the visual snippet editor in the information center.
Writing Java code in Text editor
If Java is selected, you can write the Java code directly as though using the normal Java editor. In most cases, the input and output of the transform appear at the beginning of the generated Java snippet and is cast to the appropriate data type.There is an exception to this behavior. When the input/output of the transform is the top level business object, then the casting will not be generated.
You can find the available variables in the transform by opening the code assistant window (by pressing Ctrl + SPACE).
Advanced info: Generated code in Java
This information shows how the Java snippet is being executed. Each Custom, Custom Assign, and Custom Callout transform generates an inner class in the generated Java code.The naming convention is Custom_ x_Class where x is the run order. There are 3 methods in the inner class:
- custom_x(): user code (specified in the embedded editor)
- initializeValues(): executed before custom_x(), to get the values from the business objects
- storeValues(): executed after custom_x(), to store the values back to the business objects
For more information about APIs to use within your Java code, see the
IBM Process Server information center.
If as well that the visual snippet editor displays a diagrammatic representation of the Java programming language. You can use this tool to graphically create and manipulate snippets of Java code. For more information on using the visual snippet editor, see the related link below.