none
have biztalk trigger my console application RRS feed

  • Question

  • I have a BizTalk application  taking X12 and spitting out several XML's and I have a console application which is responsible for taking those XML's and writing them in SQL.
    I need to know if there is any way to trigger the console application from BizTalk? in other words having BizTalk start the console app once the send folder satrt recievings XML's . Thanks
    • Edited by WizBiz Thursday, August 13, 2009 6:51 PM typo
    Thursday, August 13, 2009 6:50 PM

Answers

  • After adding a reference to a .Net assembly, you can add a variable in your orchestration and set its type to a class declared in the assembly. Then you can call its method in expression shapes.

    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    • Marked as answer by WizBiz Monday, August 17, 2009 1:31 PM
    Friday, August 14, 2009 12:01 AM

All replies

  • You can write a class library that calls the console app and use the class library in orchestration, or run the console app regularly using task scheduler to pick up the xml files.

    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    Thursday, August 13, 2009 8:14 PM
  • I already made a couple of demo app using threading and window service as well to complete this task but apparently specification only allow me to use BizTalk for triggering this call.
    When you say make a class library to call the console app and use the "class library in orchestration ", can you shed some more details on it . I am totally new to BizTalk and if yo you can provide me some detailed steps to achieve this I will really appreciate it..
    Thanks
    Thursday, August 13, 2009 9:51 PM
  • After adding a reference to a .Net assembly, you can add a variable in your orchestration and set its type to a class declared in the assembly. Then you can call its method in expression shapes.

    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    • Marked as answer by WizBiz Monday, August 17, 2009 1:31 PM
    Friday, August 14, 2009 12:01 AM
  • I don't understand why you need a console application for processing of XML to Database. YOu can just create another orchestration to process it. Just submit the splitted xml using direct (to msgBox) then that orchestration would subscribe to the Xml.

    You can call any .EXE application inside the biztalk by creating a .NET Library that uses System.Diagnostics.ProcessStartInfo procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + Exe app here). Just make sure to make the method static otherwise you need to put [Serializable] attribute on the class.
    • Edited by R Paulo Thursday, November 12, 2009 12:59 PM
    Monday, August 17, 2009 7:49 AM
  • I gave it a thought that there should be some way to completely take the console app out of the picture after all it is BizTalk. So what I end up in doing using WCF-Custom binding for the send port and end up in sending the XML straight to the Database and trigger my Stored proc to open th XML.

    Have some ongoing issue with MSMQ Transport as no matter what I tried can't get the message straight from a MSMQ to the Biztalk, have to dump it in a folder and pick it up using FILE transport. :(.. Wierd part is it is the same message from MSMQ which I am dumping in the File location for BizTalk to recieve apparently BizTalk doesn;t like if that same thing is coming from MSMQ Transport..
    Monday, August 17, 2009 1:31 PM