Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Mapping Data in Flow Services | Working with Transformers
 
Working with Transformers
 
Using Built-In Services as Transformers
Inserting a Transformer
Linking Variables to a Transformer
Transformers and Array Variables
Validating Input and Output for Transformers
Copying Transformers
Renaming Transformers
Debugging Transformers
Transformers are services that are inserted into and executed within a MAP step. You can use any service as a transformer. This includes any Java, C, or flow service that you create and any built-in services in WmPublic, such as the pub.date.getCurrentDateString and pub.string.concat. Additionally, you can insert multiple transformers into a single MAP step. By using multiple transformers, you can perform multiple data transformations on the pipeline contents in a single flow step.
Transformers act as collection of INVOKE steps embedded in a single MAP step. However, transformers in a MAP step are independent of each other, do not execute in a specific order, and might not execute in the same order each time the MAP step runs. Consequently, the output of one transformer cannot be used as the input to another transformer. These characteristics make transformers different than a set of INVOKE steps that execute sequentially in a flow service. Because transformers are contained within a MAP step, they do not appear as a separate flow step in the editor.
The purpose of transformers is to accomplish multiple data transformations on the pipeline data in a single step as opposed to using succession of INVOKE steps. As a result, transformers are well suited to use when mapping data from one document format to another. When mapping data between formats, you often need to perform several name, structure, and value transformations. With the use of transformers, the flow service in which you map data between formats could potentially consist of a single MAP step in where transformers and links between variables handle all of the data transformations. This provides a single view of document-to-document mapping. For example, you could create a flow service that uses transformers to convert data between document formats (such as an IDOC to an XML document or RosettaNet PIP to a proprietary format). Each time you need to convert between the specific document formats, you could invoke the mapping service.
Note:
When determining which services to use as transformers, Software AG recommends avoiding services that are subject to transient failures, such as a connection failure, as these services may be difficult to debug when used as a transformer.