映射后的物业促销 [英] Property Promotion After Mapping

查看:91
本文介绍了映射后的物业促销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的行程中,我收到一条XML消息,将其映射为另一种格式然后发送。最终的XML消息模式已经提升了我们想要用于跟踪目的的属性。但是,由于映射是在入口匝道上的XML反汇编管道阶段之后由ESB执行的,因此不会提升属性。越野车没有进行房产促销的阶段。如果此解决方案是作为业务流程实现的,则属性很容易提升。

如何在ESB中执行此操作?

我看到ESB Dispatcher Disassemble Component结合了XML反汇编,映射和组合。路由。但是这发生在行程选择之前,所以我不相信我可以在这个阶段创建一个自定义管道 - 只有当行程在SOAP标题中或者行程已被缓存时它才有效。

到目前为止,我想到这一点的唯一方法是相当混乱:1)行程映射到新格式&将其发送到接收端口
2)接收端口管道接收新消息,提升属性&然后使用行程选择器将新消息路由到最终目的地。

感谢您的建议。

Hi,

in my itinerary I receive an XML message, map it into another format and then send it. The final XML message schema has promoted properties which we want to use for tracking purposes. However the properties don't get promoted because the mapping is performed by ESB after the XML disassembler pipeline stage on the on-ramp. Off-ramps don't have the a stage to perform property promotion. If this solution was implemented as an orchestration, then the properties are easy to promote.

How can I do this within ESB?  

I see that there is ESB Dispatcher Disassemble Component that combines XML disassembling, mapping & routing. But this happens before itinerary selection, so I don't believe I could create a custom pipeline with this stage in - it only works if the itinerary is in the SOAP header or the itinerary has been cached.

The only way I have thought of doing this so far is rather messy:
1) An itinerary that does the mapping to the new format & sends it to a receive port
2) The receive port pipeline receives the new message, promotes the properties & then uses an itinerary selector to route the new message to its final destination.

Thanks for your suggestions.

推荐答案

首先关闭你的是没错,促销不会发生在发送方面。简单地说,消息未发布到消息框中,它由适配器创建以发送到关联的端点。

促销仅用于将消息发布到消息框。
<另外,ESB Dispatcher Disassm组件仅在选择之前发生,如果在执行之前阶段中没有itin选择器。因此,为了找到itinierary,它检查Soap Header,然后检查MEssage上下文,然后检查Cache,而不是按顺序。如果它无法在任何一个中找到它,那么就会引发异常。

现在有了这个方法,我不太确定你要完成什么,但是要应用一个map,然后推广它的值有很多解决方案:
)1)只需构建一个使用行程选择器的自定义管道(不是管道组件),选择Decode阶段内的行程,然后在解码阶段的Itin选择器之后使用ESB Dispatcher(非反汇编程序),然后在反汇编程序阶段使用常规的Xml反汇编程序。 - 此处唯一的问题是您不能使用任何提升的属性来检查行程,如果您使用消息内容,则将整个消息加载到内存中以确定要使用的行程。

2)使用在路由步骤之前映射的行程步骤。

3)使用自定义管道组件,该组件在自定义管道的验证或解决方阶段内进行升级。

4)将接收端口上的Map与Xml反汇编器一起分配。 (非ESB-ish)

HTH

First Off you're right, promotion does not occurr on the Send side of things. Simply becase the message is not being published to the message box, it's being created by the Adapter to send to the associated endpoint.

Promotion is only for publishing messages to the message box.

Also the ESB Dispatcher Disassm component only happens before itin selection if there is no itin selector in a stage before it being executed. Thus to find the itinierary it checks the Soap Header, then the MEssage context, and then the Cache, not necesarrily in that order.  If it can't find it in any of those then it throws an exception.

Now with that out the way, I'm not quite sure what you're attempting to accomplish, however to apply a map and then have its values promoted there are many solutions to this:

1) just build a custom Pipeline (not pipeline component) that uses an Itinerary Selector, to select the itinerary inside the Decode stage, then use the ESB Dispatcher (Not disassembler) after the the Itin Selector in the Decode stage and then a regular Xml Disassembler in the Disassembler stage. - The only issue here is that you can't use any promoted properties to check for the Itinerary and if you use the message content, then you load the whole message into memory to determine which Itinerary to use.

2) Use an Itinerary step that maps before the routing step.

3) Use a Custom pipeline Component that promotes inside the Validation or Resolve Party Stages of a custom pipeline.

4) Assign the Map on the Receive Port in combination with an Xml disassembler. (Non ESB-ish)


HTH


这篇关于映射后的物业促销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆