Mule Performing a string manipulation
Posted
by
user2910309
on Stack Overflow
See other posts from Stack Overflow
or by user2910309
Published on 2013-10-31T15:08:10Z
Indexed on
2013/10/31
15:53 UTC
Read the original article
Hit count: 304
mule
What is the best way to perform a string manipulation. I wish to perform a substring on a email address to extract the domain detail and populate this to a variable. a java transformer is a possibilty, but i was hoping if i could use a message enricher with a expression to perform this operation. pardon me but i am still a greenhorn on Mule.
here is the excerpt from my mule flow which is failing with error cannot resolve method string length.
<enricher target="#[flowVars['FromAddressDomain']]" doc:name="Message Enricher">
<expression-transformer expression="#[ payload.fromAddr.substring(payload.fromAddr.lastIndexOf('@')+ 1,payload.fromAddr.lenth())]" doc:name="Expression"></expression-transformer>
</enricher>
© Stack Overflow or respective owner