获取特定应用程序的所有跟踪消息。 [英] Get all tracked messages of particular application.

查看:50
本文介绍了获取特定应用程序的所有跟踪消息。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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.


这篇关于获取特定应用程序的所有跟踪消息。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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