In the source-to-destination transformation, the first step is extracting data from the source. When it happens, the Integrator reads either the source file or a response from the web service in memory before parsing and converting it to the internal data structure.
In many cases, it makes sense to modify the source document before transforming it, for example:
- When the source is empty or null.
- When the source is incorrectly formatted and requires preprocessing before Integrator can read it as standard XML, JSON or CSV.
- When the source would need to be modified to add extra information, for example, metadata.
To create a preprocessor use the following steps:
Step 2. When creating the format, select
Preprocessor as the Transformation type.
You can assign the new, modified message to the
value = message.substring(12);
Storing source message in a global variable
SystemConfig.instance().getProperties().put('unique key', message);
value = message;
importPackage(com.toolsverse.config); var message = SystemConfig.instance().getProperties().get("unique key");
The preprocessor is not getting executed
Read how to troubleshoot why the preprocessor is not getting executed.