Apr 20th, 2011, 03:39 AM
Header Enricher & Groovy
Hello, Mark, Oleg & Dave
You all are authors of integration with Groovy.
So, here's my wish to improve that solution.
Why not implement an evalutaion of value for one header through <groovy:script>?
You already support that through SpEL.
But SpEL is single line script, and in my case it doesn't solve my problem.
And further I don't see reason to write separate Java-class or to move solving of my task to Transformer.
My sample is:
1. Payload is XML
2. I have a delayer
3. I have to set a header for delayer
4. The value for this header is Date based on content of payload
5. So, I evalute xPath -> parse result to Date -> add delay from SpringContext -> and put final Date to header for delayer.
I think it is a reason where we can use short Groovy scripts.
I see no reason to write a complete transformer for setting value of only one header.
Thanks in advance
Tags for this Thread