One Star

Syntax for cMessageRouter 'when' clause with 'header' type

Hi,
I am new to this forum.
My question is:
How is the syntax for accessing header information in a 'when' clause of the cMessageRouter?
See the figure for illustration.
Thank you in advance
Norbert
4 REPLIES
Employee

Re: Syntax for cMessageRouter 'when' clause with 'header' type

Hello Norbert,
Can't find the figure unfortunately, but you may chose from many available methods, for example XPath would work like that:
http://screencast.com/t/kQHfz0gSUdPf
Exported route you may find here:
http://dl.dropbox.com/u/218306/ContentBasedRoutingRoute.zip
It will be released as part of ESB Demo scenarios in the Talend Open Studio for ESB 5.0.1
Renat
One Star

Re: Syntax for cMessageRouter 'when' clause with 'header' type

Hello Renat,
thanks for the answer. The image is visible now. How can I solve the problem with the 'header' type?
Norbert
One Star

Re: Syntax for cMessageRouter 'when' clause with 'header' type

Hi All:
a way to user header expression on When Clause is specifing the type as "simple".
Assuming you want to check the header value of "foo" equals "hello" or not, then you can:
1.specify the expression "type" as "simple"
2.in the text area, write the expression as "${in.header.foo} == 'hello'"
That's all
To be honest, the expression of When Clause is not that intuitive, we may improve this part in future.
Five Stars

Re: Syntax for cMessageRouter 'when' clause with 'header' type

Hello,
I have a problem to filter JMSType from activeMQ in my route.
I use 2.in the text area, write the expression as "${in.header.foo} == 'hello'" 
But i don't have result
How can i filter type message (there is a header type), how can i use it ?
thanks