Red Hat Training

A Red Hat training course is available for Red Hat Fuse

7.3. Groovy Tips

  • The visited element is available to the script through the variable appropriately named element. (It is also available under the variable name which is equal to the element name but only if the name of the latter is limited alpha-numeric characters.)
  • Execute Before/Execute After: by default, the script executes on the visitAfter event. Direct it to execute on the visitBefore by setting the executeBefore attribute to true.
  • Comment/CDATA Script Wrapping: the script can be wrapped in an XML Comment or CDATA section if it contains special XML characters.