在业务流程内分配新的行程 [英] Assign New Itinerary Inside Orchestration

查看:97
本文介绍了在业务流程内分配新的行程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个业务流程(事务类型= Atomic),其接收形状过滤器订阅了某种类型的消息的消息框(BTS.MessageType过滤器) 。消息实例=入站。


 


< span style ="font-size:9pt">在接收形状之后,我有一个构造消息形状,构造一个新的消息实例(收到相同类型的消息)。消息实例=出站。


 


< span style ="font-size:9pt">在我的构造消息形状中,我有一个消息分配形状。在此消息分配形状中,我尝试执行以下操作:


 


a。


调用自定义接收管道(以ItinerarySelectReceiveXml为模型)。


- 解码阶段=空


- 反汇编阶段= XML反汇编程序(具有默认管道组件属性)


- 验证stage = ESB行程选择器(ConnectionString = BRI:\\Policy = PolicyName; version =; useMsg = True;)(ItineraryFactName = Resolver.Itinerary)


- ResolveParty stage = ESB Dispatcher(具有默认管道组件属性)


< span style ="font-size:9pt"> 


b。


什么是在消息分配中需要执行的步骤?我有以下代码:


 


msgOutbound = null;


 


//通过接收管道运行消息分配正确的行程


<跨度风格= "字体大小:8磅;字型家族:索拉">。theReceivePipelineOutputMessages = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline( System.Type.GetType(QUOT; InnovatorGateway.Pipeline.InnovatorGatewayReceivePipeline" ;,真),msgInbound);


<跨度风格="字体大小:8磅;字体家庭:索拉 "> theReceivePipelineOutputMessages.MoveNext();


<跨度风格=" 字体大小:8磅;字型家族:索拉"> theReceivePipelineOutputMessages.GetCurrent(msgOutbound);


 


//检索当前行程步骤。


itinerary = new Microsoft.Practices.ESB.Itinerary.SerializableItineraryWrapper();


itineraryStep = new Microsoft.Practices.ESB.Itinerary.SerializableItineraryStepWrapper();


itinerary.Itinerary = Microsoft.Practices.ESB.Itinerary.ItineraryOMFactory.Create(msgOutbound);


itineraryStep.ItineraryStep = itinerary.Itinerary.GetItineraryStep(msgOutbound);


 


//获取解析器


resolvers = itineraryStep.ItineraryStep.ResolverCollection;


 


//将解析器配置传递给ResolverMgr进行解析。


resolverDictionary = Microsoft.Practices.ESB.Resolver.ResolverMgr.Resolve(msgOutbound,resolvers [0]);


 


//设置适配器属性


Microsoft.Practices.ESB.Adapter.AdapterMgr.SetEndpoint(resolverDictionary,msgOutbound);


 


//设置传送端口地址


msgOutbound(BTS.OutboundTransportLocation)= resolverDictionary.Item(" Resolver.TransportLocation");


msgOutbound(BTS.OutboundTransportType)= resolverDictionary.Item(" Resolver.TransportType");


 


我创建了以下相关集(要关联的属性):


- BTS.OutboundTransportLocation


- BTS.OutboundTransportType


- Microsoft.Practices.ESB.Itinerary.Schemas.IsRequestResponse


- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceName


- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceState


- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceType


  


c。


将形状(msgOutbound)发送到直接端口。


< span style ="font-size:9pt"> 


有没有人知道我的代码在哪里不正确b,毫无疑问在多个地方?具体的编排引擎错误表明:


 


内部异常:索引超出范围。必须是非负数且小于集合的大小。


 


看来解析器集合又回来了?????这是为什么?


 


我一直在关注这个主题的上一篇文章作为指南,但我仍然无法让它发挥作用。以下是原始帖子的链接:


 


http://social.msdn.microsoft.com/Forums/en-US/biztalkesb/thread/da780370-2402-4bfd-bc1f-8f3a6e345f66/


 




解决方案

您当前的行程步骤可能没有解析器...


 


您必须确保您当前的行程步骤是您实际需要的步骤并且不是"下一步"步骤QUOT ;.你可能需要提前一步才能进入你感兴趣的步骤。


 


HTH


I have an orchestration (transaction type = Atomic) with a receive shape filter subscribing to the message box for messages of a certain type (BTS.MessageType filter). Message instance = inbound.

 

After the receive shape I have a construct message shape constructing a new message instance (of the same type received). Message instance = outbound.

 

Inside my construct message shape I have a message assignment shape. Inside this message assignment shape I’m trying to do the following:

 

a.

Invoke a custom receive pipeline (modeled after ItinerarySelectReceiveXml).

- Decode stage = empty

- Disassemble stage = XML disassembler (with default pipeline component properties)

- Validate stage = ESB Itinerary Selector (ConnectionString = BRI:\\Policy=PolicyName;version=;useMsg=True;) (ItineraryFactName = Resolver.Itinerary)

- ResolveParty stage = ESB Dispatcher (with default pipeline component properties)

 

b.

What are the steps required to be performed in the message assignment? I have the following code:

 

msgOutbound = null;

 

// Run the message through the receive pipeline to assign the correct itinerary.

theReceivePipelineOutputMessages = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(System.Type.GetType("InnovatorGateway.Pipeline.InnovatorGatewayReceivePipeline", true), msgInbound);

theReceivePipelineOutputMessages.MoveNext();

theReceivePipelineOutputMessages.GetCurrent(msgOutbound);

 

// Retrieve the current itinerary step.

itinerary = new Microsoft.Practices.ESB.Itinerary.SerializableItineraryWrapper();

itineraryStep = new Microsoft.Practices.ESB.Itinerary.SerializableItineraryStepWrapper();

itinerary.Itinerary = Microsoft.Practices.ESB.Itinerary.ItineraryOMFactory.Create(msgOutbound);

itineraryStep.ItineraryStep = itinerary.Itinerary.GetItineraryStep(msgOutbound);

 

// Get resolvers

resolvers = itineraryStep.ItineraryStep.ResolverCollection;

 

// Pass the resolver configuration to the ResolverMgr for resolution.

resolverDictionary = Microsoft.Practices.ESB.Resolver.ResolverMgr.Resolve(msgOutbound, resolvers[0]);

 

// Set the adapter properties

Microsoft.Practices.ESB.Adapter.AdapterMgr.SetEndpoint(resolverDictionary, msgOutbound);

 

// Set the delivery port address

msgOutbound(BTS.OutboundTransportLocation) = resolverDictionary.Item("Resolver.TransportLocation");

msgOutbound(BTS.OutboundTransportType) = resolverDictionary.Item("Resolver.TransportType");

 

I’ve created the following correlation set (properties to correlate on):

- BTS.OutboundTransportLocation

- BTS.OutboundTransportType

- Microsoft.Practices.ESB.Itinerary.Schemas.IsRequestResponse

- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceName

- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceState

- Microsoft.Practices.ESB.Itinerary.Schemas.ServiceType

  

c.

Send shape (msgOutbound) to direct port.

 

Does anyone know where my code is incorrect in part b, no doubt in multiple locations? The specifc orchestration engine error indicates:

 

Inner exception: Index was out of range. Must be non-negative and less than the size of the collection.

 

It appears the resolver collection is coming back empty????? Why is this?

 

I’ve been following the previous post on this topic as a guide but I still can’t get it to work. Here is the link to the original post:

 

http://social.msdn.microsoft.com/Forums/en-US/biztalkesb/thread/da780370-2402-4bfd-bc1f-8f3a6e345f66/

 


解决方案

It is possible that your current itinerary step has not resolvers...

 

You have to make sure your current itinerary step is the one you actually require and that it's not the "Next Step". You might have to advance the step to get to the step you're interested in.

 

HTH


这篇关于在业务流程内分配新的行程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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