BizTalk Orchestration从XML接收多个消息从双向发送端口接收管道吗? [英] BizTalk Orchestration to receive multiple messages from XMLReceive pipeline from two-way send port?

查看:103
本文介绍了BizTalk Orchestration从XML接收多个消息从双向发送端口接收管道吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有双向发送端口的业务流程,用于从数据库中检索一个或多个项目.我使用WCF-SQL适配器,并成功地将传入的结果分批发送到单独的StoredProcedureResultSet0消息中.但是,编排仅处理一条消息并结束.

接收流程是否有办法在结束之前循环返回的消息?

我现在收到有关未处理消息的错误消息:

该实例已完成,而没有消耗其所有消息.该实例及其未使用的消息已被暂停.

我知道有些人已经从业务流程内部使用管道启动了分批处理.我认为最好在离源头尽可能近的地方进行分批处理.

想法?

解决方案

最终的解决方案是直接在接收管道中进行分批处理.在Orchestration中使用XPath会带来性能风险,而使用相关集(如@Dijkgraaf已回答)也会带来风险.

但是,尝试实施选择的解决方案时,我跳入了以下问题:

如果存储过程没有返回结果,则XMLReceive管道无法对消息进行分批处理.这是因为,如果没有返回任何行,则WCF-SQL适配器会忽略结果元素,并且分批处理(Body XPath)要求该元素存在.另外,即使使用XPath函数count()没有结果,也尝试使Body XPath正常工作,但是BizTalk不允许复杂"的XPath表达式(错误消息,找不到参考).

因此,我必须开发一个接收解码自定义管道组件,以在缺少元素时添加该元素.然后XML Disassmebler工作并使用消息,即使element为空.

I have an orchestration with a two-way send port to retreive one or many items from a database. I use WCF-SQL adapter, and successfully managed to debatch incoming result into separate StoredProcedureResultSet0 messages. However, orchestration only processes one message and ends.

Is there a way for the receiving orchestration to loop over returned messages before ending?

Error message I receive now for the unprocessed messages:

The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended.

I am aware that some people have initiated debatching using pipeline from within the orchestration. I thought that it would be preferable to debatching as close to the source as possible.

Ideas?

解决方案

Final solution was to do debatching directly in receiving pipeline. Using XPath in Orchestration have performance risks, and using correlation sets, like @Dijkgraaf answered, also comes with risks.

However, trying to implement choosen solution, I bounced into the following problem:

XMLReceive pipeline failed to debatch message if there were no results returned from the stored procedure. This is because WCF-SQL adapter omits the resulting element if no rows are returned, and debatching (Body XPath) requires it to exist. Also, tried to have the Body XPath to work even if there was no results using XPath function count(), but BizTalk does not allow "complex" XPath expressions (given by error message, no reference found).

So, I had to develop a receive decode custom pipeline component to add the element if missing. Then XML Disassmebler works and consumes the message even if element is empty.

这篇关于BizTalk Orchestration从XML接收多个消息从双向发送端口接收管道吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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