MULE ESB: Saving result from Sql query in Session Variable -
i have created sample mule application fetches 1 row database. fetches user_name , user_id database. when convert result json or xml output
[{"user_id":"u001","user_name":"dharmin"}]
now want save user_id , user_name in session variables. can guide me ?
edit: updated basic flow image
after converting json add :-
<json:json-to-object-transformer returnclass="java.util.hashmap" doc:name="json object"/>
and after put value session variable using following :-
<set-session-variable doc:name="session variable" value="message.payload.user_id" variablename="user_id"/>
and
<set-session-variable doc:name="session variable" value="message.payload.user_name" variablename="user_name"/>
Comments
Post a Comment