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

Add script to the DSL to invoke a expression language and allow noop changes on the Exchange

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.16.0
    • Component/s: camel-core, eip
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      See nabble
      http://camel.465427.n5.nabble.com/Changing-POJO-attribute-from-the-body-using-the-Simple-Expression-Language-tp5727971.html

      We should have a script in the DSL

      <route>
        ...
        <script>
          <groovy>some groovy stuff here</groovy>
        </script>
        ...
      </script>
      

      The script is then invoked and allows noop to avoid changing the message body.

      Currently you can only do

      <transform>
        <groovy> ... </groovy>
      </transform>
      

      ... and that may change the message body with the return value from groovy.

      With <script> you can avoid this.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: