高级行程 - 何时使用HasNextService以及在何种上下文中使用。 [英] Advance Itinerary - When is HasNextService used and in what context.

查看:79
本文介绍了高级行程 - 何时使用HasNextService以及在何种上下文中使用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ESB Toolkit 1.0时 - 是Microsoft提供代码时的那个。如果您在业务流程中实现服务,通常会检查行程中的下一个服务实例。然后,您通常会检查下一个服务,如果在提升相应的属性后将其指定到MessageBox中。
ESB Toolkit 2.0的权利,并假设使用版本2.0行程(严格)。有人可以指导我如何构造代码来派生HasNextService标志?我的理解是以下应该是有效的...


从AdvanceItinerary消息分配形式获取的代码


_hasNextService = _itinerary.Itinerary.HasNextService( );
_itinerary.Itinerary.Advance(msgESBMessageToForward,_step.ItineraryStep);
_itinerary.Itinerary.Write(msgESBMessageToForward);



我指定的行程有一个行程服务。但是,当我使用上面的代码时,_hasNextService标志始终为[true]。这意味着当我点击我的条件分支时,即使没有附加服务,我总是尝试将消息持久保存到消息框中。


发生了什么......


另一个注意事项 - 如果我在行程中将导出模式切换为(默认)工作良好。你不喜欢ESB指导;)...

解决方案

除了用HasNextService()检查,你可以还检查当前服务nextId ==" 00000000000000000000000000000000",对于严格模式下的最后一个服务是否为真。 


When using the ESB Toolkit 1.0 – yes the one when Microsoft supplied the code. If you where implementing a service within an orchestration you would typically check for a next service instance within the itinerary. You would then typically check for the next service and if specified forward into the MessageBox after promoting the appropriate properties of course. Right to the ESB Toolkit 2.0 and assuming the use of version 2.0 itineraries (strict). Can someone please guide me as to how the code should be structured to derive the HasNextService flag? My understanding is the following should be valid... Code taken from AdvanceItinerary message assignment shape _hasNextService = _itinerary.Itinerary.HasNextService(); _itinerary.Itinerary.Advance(msgESBMessageToForward, _step.ItineraryStep); _itinerary.Itinerary.Write(msgESBMessageToForward); I have an itinerary specified which has a single itinerary service. However when I use the code above the _hasNextService flag is always [true]. This means when I hit my condition branch I always try to persist the message into the messagebox even though there is no addition services. What is going on.... Just another note - If I switch the export mode to (default) on the itinerary all works fine. Don't you just love the ESB Guidance ;)...

解决方案

In addition to checking with HasNextService(), you may also check if current service nextId == "00000000000000000000000000000000", 
which will be true for the last service in Strict mode.


这篇关于高级行程 - 何时使用HasNextService以及在何种上下文中使用。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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