获取特定应用程序的所有跟踪消息。

编程入门 行业动态 更新时间:2024-10-28 10:24:43
本文介绍了获取特定应用程序的所有跟踪消息。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个Windows应用程序,它有下面的控件,下拉列表是选择应用程序名称。

如何获取所选应用程序的所有跟踪消息? 我正在使用Microsoft.BizTalk.Operations dll获取跟踪消息, TrackingDatabase dta = new TrackingDatabase("。"," BizTalkDTADb"); BizTalkOperations操作=新的BizTalkOperations(); IBaseMessage message = operations.GetTrackedMessage(MessageInstanceId,dta); string body = string.Empty; 使用(StreamReader streamReader = new StreamReader(message.BodyPart.Data)) { body = streamReader.ReadToEnd(); }

我无法找到任何内容,以便根据应用程序名称过滤消息。

请告知..!

谢谢

解决方案

您需要从 BizTalkDTADb 获取此信息。

消息实际上没有与它们相关的应用程序,模式,端口和业务流程。你必须做一些加入才能得到你想要的东西。

最终你要从数据库中选择 MessageID 然后枚举通过并将ID传递给您的BizTalkOperations.GetTrackedMessage()调用。

在生产系统上小心这样做,因为我可以很容易地看到您有数千条适用的消息。

I have an windows application which has below controls, a dropdown is to select the application name.

how can I get all tracked messages of selected application ? I am using Microsoft.BizTalk.Operations dlls getting tracked messages, TrackingDatabase dta = new TrackingDatabase(".", "BizTalkDTADb"); BizTalkOperations operations = new BizTalkOperations(); IBaseMessage message = operations.GetTrackedMessage(MessageInstanceId, dta); string body = string.Empty; using (StreamReader streamReader = new StreamReader(message.BodyPart.Data)) { body = streamReader.ReadToEnd(); }

I am not able to find anything so that I can filter messages based on application name.

Please advise..!

Thanks

解决方案

You will need to get this information from the BizTalkDTADb.

Messages do not really have an Application Related to them, schemas, ports and orchestrations do. You'll have to do a little bit of joining to get exactly what you want.

Ultimately you want to select the MessageID from the database and then enumerate through that and pass the ID into your BizTalkOperations.GetTrackedMessage() call.

Be careful doing this on a production system, as I can easily see you having thousands of applicable messages.

更多推荐

获取特定应用程序的所有跟踪消息。

本文发布于:2023-10-26 17:04:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530774.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   消息

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!