服务注入当前行程 [英] Service injection into current itinerary

查看:105
本文介绍了服务注入当前行程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在行程执行期间(fe ItineraryA有服务(A,B,C))服务B需要在当前服务步骤之后注入服务D,E,F(因此它将是A,B, D, E,F 下,C)。实现这一目标的最佳方法是什么?


Dejan Petkovic

During the Itinerary execution (f.e. ItineraryA has a services (A,B,C)) service B needs to inject services D,E, F after current service step (so it would be A,B,D,E,F,C). What is the best way to achieve this ?


Dejan Petkovic

推荐答案

ESB工具包中有几个选项可以使用我能想到的。

1. 使用您的行程中的行程经纪人。 这允许使用过滤器来确定代码中的潜在分支。 当前过滤器使用Xpath表达式,还包括可能路由的消息属性。 把这看作非常像基于消息中的匹配的决策形状可以沿着D,E,F的路线走。 这是关于潜在路线的设计时决定(只能在行程中定义的内容上进行分支。 请参阅主要方案和开发任务下的文档 - >使用基于行程的路由 了解更多详情。

1.     Use the Itinerary Broker in your itinerary.  This allows a filter to be used to determine potential branches in the code.  The current filter uses Xpath expression and also includes message properties to potentially route on.  Think of this very much like a decision shape that based on a match in the message could go down a route with D, E, F.  This is a design time decision though about potential routes (only can branch on what is defined in the itinerary).  Please see the documentation under Key Scenarios and Development Tasks -> Using Itinerary-Based Routing  for more details.

2. 在出站呼叫返回期间在接收位置使用BRI解析器。 例如,如果服务A和B导致调用Web服务,请使用ItinerarySelectSendReceivePipeline Off-Ramp(动态发送端口)接收管道,其中包含行程选择器组件。 您可以使用BRI解析器来决定传入的消息并注入新的行程。 这更加动态,因为决定是在运行时做出并由BRE驱动。 这将是b虽然更难以实施,但如果启用BAM跟踪,行程基本上会在跟踪数据库中重新开始。

2.     Use the BRI resolver on a receive location during the return from a outbound call.  For example, if service A and B result in a call to a web service, use the ItinerarySelectSendReceivePipeline on the Off-Ramp (Dynamic Send Port) receive pipeline which contains the Itinerary selector component.  You could use the BRI resolver to make a decision about the incoming message and inject a new itinerary.  This is much more dynamic since the decision is made at runtime and driven by BRE.  This would be more difficult to implement though and if BAM tracking is turned on, the itinerary would essentially start over in the tracking database.

如果你觉得一个选项比其他选项效果更好,让我知道,我可以为你提供更多细节。

谢谢,


这篇关于服务注入当前行程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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