使用 Mule 表达式获取消息负载属性
我设置了一个 default-service-exception-strategy
,它将路由和应用程序错误发送到各种出站端点。
该端点之一是 jdbc 连接器端点,它使用错误消息更新数据库。
我想从有效负载中获取一个属性来过滤要更新的行。 我应该使用哪个表达式来获取查询的属性值?
UPDATE dtb_controle_processo.cnpr.tbl_controle
SET cod_situa_seque = 'FAILURE'
WHERE cod_situa_seque = 'INICIADO'
AND cod_modul = #[message.payload.module] --- WHAT EXPRESSION ?
AND cod_proje = #[message.payload.project] --- WHAT EXPRESSION ?
谢谢
I have set a default-service-exception-strategy
which route and application error to various outbound endpoints.
One of this endpoints is a jdbc connector endpoint which updates the database with the error message.
I'd like to get an attribute from the payload which filters the rows to be updated.
Which expression should I use to get the attributes values to my query?
UPDATE dtb_controle_processo.cnpr.tbl_controle
SET cod_situa_seque = 'FAILURE'
WHERE cod_situa_seque = 'INICIADO'
AND cod_modul = #[message.payload.module] --- WHAT EXPRESSION ?
AND cod_proje = #[message.payload.project] --- WHAT EXPRESSION ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
#[bean:module]
和#[bean:project]
应该可以解决问题。请参阅参考。#[bean:module]
and#[bean:project]
should do the trick. See the reference.