Transformers are less “readable”. To see the input and output mappings, one must expand the transformer. This can make troubleshooting and maintenance (slightly) more difficult.
Transformers are more convenient for pipeline management. The transformer uses its own pipeline, which relieves the need to drop any unwanted output and protects the caller from pipeline litter. On the other hand, inputs and outputs must be explicitly mapped–no implicit variable mapping is possible.
Transformers can be more difficult to work with when they run into errors. getLastError will not work as one might expect if the transformer throws an exception.
Multiple transformers can be used in a single map step. This makes mapping one document to another with relatively minor transforms easier. Depending on the transformers, readability is actually improved in this case.
Whether or not calling a service with a FLOW step or in a transformer makes a performance difference or not should be (mostly) immaterial to the choice of how the service is invoked. Deciding to use one or the other ONLY because of performance is ill-advised. One should factor in other characteristics (readability, maintainability, etc) as well. Performance considerations should be evaluated in conjunction with profiling measurements. It is not safe to assume that one construct will be faster than another–too often intuition is proven wrong.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB