当目录中有新的xml文件时,使用BizTalk业务流程来调用.NET类库以读取xml. [英] Using a BizTalk orchestration to call .NET class library to read xml when there is new xml file in the directory

查看:52
本文介绍了当目录中有新的xml文件时,使用BizTalk业务流程来调用.NET类库以读取xml.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了接收消息和接收端口以监视XML文件. 我还使用

I have set up receive message and receive port to monitor for XML files. I also added expression shape to execute .NET class library by using

System.Diagnostics.Process.Start
        (@"C:\TEMP\XmlReader\XmlReader\bin\Release\XmlReader.exe");

当我部署BizTalk时,一旦在接收位置接收到新文件,文件就会消失并且什么也没有发生.我还有其他编排项目,带有接收和发送端口,文件消失了,并且没有移动到发送位置

When I deploy the BizTalk, as soon as new file gets received on the receive location, file disappears and nothing happens. I have other orchestration project with receive and send port where the file disappears and does not move to send location

推荐答案

我不确定我是否遵循您的逻辑.但是,假设您已经正确地在业务流程和接收端口发布的消息之间建立了预订. 在激活业务流程时,原始文件系统XML永远消失了.实际上,一旦启用了接收位置并使用了接收位置,它便消失了. 因此,如果您尝试从业务流程中手动从文件系统中读取原始XML文件,那么您将不会成功.

I am not sure I am following your logic. However, assuming that you have correctly set up a subscription between the orchestration and the message published by the receive port. By the time the orchestration is activated, the original file system XML is gone forever. In fact it is gone once the receive location is enabled and consumes it. So if you are trying to manually read the original XML file off the file system, from the orchestration, you will not be successful.

BizTalk有一些陷阱,如果有疑问,请坚持使用增量方法;

BizTalk has some pitfalls, when in doubt, stick to the incremental approach;

  1. 直接从管理控制台创建/启用接收端口和位置(暂时忘记VisualStudio).
  2. 传入XML(或其他任何内容)
  3. 使用管理控制台查看是否创建了任何消息以及它们的状态.
  4. 创建包含以下内容的业务流程

  1. Create/Enable the receive port and location straight from the administration console (forget VisualStudio for now).
  2. Pass in an XML (or whatever)
  3. Use the management console to see if any message were created and what their status is.
  4. Create the orchestration that includes

System.Diagnostics.Debug.WriteLine()

System.Diagnostics.Debug.WriteLine()

声明,将其订阅到接收端口.

statements, subscribe it to the receive port.

这篇关于当目录中有新的xml文件时,使用BizTalk业务流程来调用.NET类库以读取xml.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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