Skip to content

Instantly share code, notes, and snippets.

@marianogonzalez
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianogonzalez/d4658231258bdce19d38 to your computer and use it in GitHub Desktop.
Save marianogonzalez/d4658231258bdce19d38 to your computer and use it in GitHub Desktop.
<flow name="groovyTransformerWithParameters">
<script:transformer name="stringReplaceWithParams">
<script:script engine="groovy">
<property key="oldStr" value="l" />
<property key="newStr" value="x" />
<script:text>
return payload.toString().replaceAll("$oldStr", "$newStr")
</script:text>
</script:script>
</script:transformer>
</flow>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment