Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16152

XML DSL tokenize with token in simple language and group does not set the delimiter correctly

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      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.

       

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              michalstepan Michal Stepan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: