How can we access payload value in mule EE jdbc-ee query? -
the issue insert query, there 2 steps 1) select value table1 2)insert values in table2.
here #[map-payload:id] working fine in jdbc mule ce not in jdbc-ee mule ee.
below code,
<flow name="allflows_dev_eeflow"> <poll doc:name="poll"> <fixed-frequency-scheduler frequency="3000"/> <db:select config-ref="generic_database_configuration" doc:name="database1"> <db:parameterized-query><![cdata[select * table1]]></db:parameterized-query> </db:select> </poll> <db:insert config-ref="generic_database_configuration" doc:name="ebs database"> <db:parameterized-query><![cdata[insert table2 (id, company, status) values (#[map-payload:id], #[map-payload:company], #[map-payload:status])]]></db:parameterized-query> </db:insert> <logger message="order1 #[payload[0].id] #[map-payload:id]" level="info" doc:name="logger"/> </flow>
do not use map-payload:: it's old , deprecated expression evaluation language. use mel instead, ie:
<db:parameterized-query><![cdata[insert table2 (id, company, status) values (#[message.payload[0].id], #[message.payload[0].company], #[message.payload[0].status])]]> </db:parameterized-query>
Comments
Post a Comment