Uploaded image for project: 'Fuse Tooling'
  1. Fuse Tooling
  2. FUSETOOLS-186

Adding a 2nd when to a CBR may cause a id clash for auto assigned ids in the xml source

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.32
    • 1.1.32
    • Camel Editor
    • None

    Description

      I have a CBR example

        <camelContext xmlns="http://camel.apache.org/schema/spring" trace="false">
          <route id="myRoute">
              <from uri="file:src/data?noop=true"/>
              <choice id="choice1">
                  <when id="when1">
                      <language language="xpath">/person/city = 'London'</language>
                      <to uri="file:target/messages/uk"/>
                      <log id="log1" logName="camel" loggingLevel="WARN" message="UK message received"/>
                  </when>
                  <otherwise id="otherwise1">
                      <to uri="file:target/messages/others"/>
                      <log id="log2" logName="camel" loggingLevel="INFO" message="other message received"/>
                  </otherwise>
              </choice>
          </route>
      </camelContext>
      

      In the GUI I added a 2nd when to the CBR (the one who invokes the bean) but as you can see the id attribute is "when1" which is already taken. So the XML is invalid.

        <camelContext xmlns="http://camel.apache.org/schema/spring" trace="false">
          <route id="myRoute">
              <from uri="file:src/data?noop=true"/>
              <choice id="choice1">
                  <when id="when1">
                      <language language="xpath">/person/city = 'London'</language>
                      <to uri="file:target/messages/uk"/>
                      <log id="log1" logName="camel" loggingLevel="WARN" message="UK message received"/>
                  </when>
                  <when id="when1">
                      <language language="simple">${file:ext} == 'csv'</language>
                      <to uri="bean:csvService"/>
                  </when>
                  <otherwise id="otherwise1">
                      <to uri="file:target/messages/others"/>
                      <log id="log2" logName="camel" loggingLevel="INFO" message="other message received"/>
                  </otherwise>
              </choice>
          </route>
      </camelContext>
      

      Attachments

        Activity

          People

            jastrachan_jira James Strachan (Inactive)
            cibsen@redhat.com Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: