Details
Description
We discovered a problem within <tokenize> component in <split>.
We have tokenize with:
- token is simple expression
- group
When the route gots executed, following wrong behaviour occur:
- the simple expression is not evaluated
All can be seen in example route:
<route id="test-foo-route"> <from uri="timer://foo?repeatCount=1"/> <setHeader name="test"> <constant>B</constant> </setHeader> <setBody> <constant>aaBaaBaaB</constant> </setBody> <split> <tokenize token="${headers.test}" group="2"/> <log message="Body in tokenize ${body}"/> </split> </route>
Log:
14:03:29.943 | INFO | Camel (camel-1) thread #1 - timer://foo | test-foo-route | ID-michal-desktop-1612530209931-0-2 | test-foo-route | Body in tokenize aa${headers.test}aa 14:03:29.943 | INFO | Camel (camel-1) thread #1 - timer://foo | test-foo-route | ID-michal-desktop-1612530209931-0-3 | test-foo-route | Body in tokenize aa
The correct behaviour would be that the body will contain evaluated simple expression given in token.