1

I have a flow that calls a MS SQL stored procedure which returns a value. The output that i get from the DB is {resultset1=[{id=30}]} i would like to store the value of id to flow variable

couldn't find a successful way to do this, Could somebody please help me in this

I'am using mule server 3.4.0 EE

Thank you in Advance

madhu
  • 87
  • 2
  • 12

1 Answers1

2

First place a json-to-object-transformer and then try the following :-

<json:json-to-object-transformer returnClass="java.util.HashMap" />
<set-variable variableName="id" value="#[payload.resultset1[0].id]" doc:name="Variable"/>
Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81
  • That's strange, the payload is a list of maps after a database query. You should have been able to accomplish this without the JSON to Object Transformer. – Ryan Hoegg Sep 24 '14 at 15:54