Using Mule 3.3, I've got a Payload (which starts out as a JSON and I'm converting it to an Object using java.util.HashMap). I can access the variables just fine from a JDBC query using:
#[message.payload.AddJob.variable1]
How do I go about adding a new variable (say variable2), or modifying the value of an existing variable?
I've tried:
<message-properties-transformer doc:name="Message Properties">
<add-message-property key="message.payload.AddJob.variable2" value=""hello""/>
</message-properties-transformer>
Which had no effect.
I also tried a groovy Script (below) as suggested here: How to add additional data to a mule payload?, but it overwrites the entire payload with "hello", not just variable2.
payload['AddJob.variable2'] = 'hello'