Last active
April 25, 2017 07:25
-
-
Save fganora/d7c4187d4ef8f7506b3bd066f6fbf8d4 to your computer and use it in GitHub Desktop.
Mule: use DataWeave variable for simple translation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 1.0 | |
%output application/json | |
%var statusCodeToStatusDescription = { | |
0 : "Success", | |
1 : "Warning", | |
2 : "Error" | |
} | |
--- | |
payload.jobs map { | |
name : $.name, | |
url : $.url, | |
status : statusCodeToStatusDescription[$.statusCode] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment