if any one knows replyfor this
Please review the documentation.
There have been several threads on this topic already. Bottom line–it doesn’t much matter which way you call a service.
Transformers have their own dedicated pipeline so they consume less memory.
But then you can’t use tranformers inside loop.
For multiple transformations on a single flow step, the order of execution of transformation is not guaranteed. ( correct me if am wrong).
The best way to perform multiple transformations could be by using a custom java service. This will be much faster.
Sort of. They have a restricted pipeline, holding only the variables that are explicitly passed to the service.
Hmm. Years later and we still have this misconception.
Transformers can be used in a loop. What they do not do is accept a list when a single item is expected. The error message generated in this case is completely misleading. If you receive this error, you’re passing a list instead of a single item. Pass a single item and the error will disappear.
The “best way” will depend entirely what is being done and needs to consider maintenance and debugging aspects. Whether doing it in Java is “much faster” is debatable.
I agree with you Rob.
But what about the order of execution, does my statement holds true?
Yes, order of execution is undefined.
Thank you very much for the clarification. I must agree that i had this misconception. I also agree that error is way to misleading.
One more clarification, Lets say i have a document list a and i am looping over a. Inside loop i am calling a transformer with inputs from document list a (a will be a document in pipeline because of loop). can i pass values from a or not?
Yes. I do it all the time.