Performance used to differ, but it doesn’t any more. IMO, one doesn’t use transformers (or avoid them) for performance reasons. Although the documentation implies this, transformers are not run in separate threads nor do they run in parallel. The intent of the documentation was to emphasize that the order of execution of the transformers is not defined/guaranteed.
The only benefit, IMO, is that the pipeline visibility is limited–the service invoked as a transformer sees only the vars explicitly passed to it, and output vars must explicitly be mapped out to the calling service’s pipeline. This, as you mention, can reduce pipeline clutter.
Can you elaborate on “Variables from the main service are not preserved…”? Variables in the calling service will not be affected in any way unless you explicitly map from/to them. If the calling service has var named “foo” the transformer will never see that var (unless it is declared as an input and mapped in). The transformer can do anything it wants with its own var named “foo” and it will not impact the calling service variable. Even if “foo” is passed in and the tranformer modifies it, the value of foo will not change in the calling service unless you map it from the output of the transformer.
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods