Skip to content

Instantly share code, notes, and snippets.

@ddossot
Last active December 16, 2015 23:39
Show Gist options
  • Save ddossot/5515112 to your computer and use it in GitHub Desktop.
Save ddossot/5515112 to your computer and use it in GitHub Desktop.
import org.mule.util.StringUtils;
def extractAttendeeData(payload, boothId) {
csv = StringUtils.strip(StringUtils.substringAfter(payload, 'QR-Code:'));
data = StringUtils.splitAndTrim(csv, ',');
flowVars.attendeeId = data[0];
[
'boothId': boothId,
'attendeeId' : data[0],
'fullName' : data[1],
'companyName' : data[2],
'email' : data[3]
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment