Calling a .NET Assembly from Orchestration

Home Page Forums BizTalk 2004 – BizTalk 2010 Calling a .NET Assembly from Orchestration

Viewing 1 reply thread
  • Author
    Posts
    • #15839

      Hi All,

      How can i call to  .NET Assembly from Orchestration?

      i'm looking for some tutorials or step by step example.

       

      TNX

       

    • #15840

      1 – From the BizTalk project that contains the orchestration add a reference to the assembly you wanna call

      ** before doing this, ensure that the assembly has a strong name (signed) (use sn.exe from the .NET SDK)

      2 – A. If you want to instantiate an object from your assembly and call methods from it, add a variable to your orchestration, and assign it the desired type from the referenced assembly. Initialize this object before using it, in an expression shape.

      B. If you want to call a static method provided from a class that is included in you assembly, there is no need to declare a variable of the class type. In an expression shape, call the method from the class, supplying it the required parameters.

       Hope this is useful,

       

      • #15841

        Thank u YouseT. Omar, it's exactly what i need.

         

        TNX

        • #15842

          For step two.

          When you add your a .NET class variable to the orchestration there is a property, Use Default Constructor.

          If this property is true, the following code will be added to when the orchestration is compiled  

          yourvariable = new yourclass();

          If your class does not have a default constructor then you need to set the property to false and explicitly instantiate the object yourself in the expression shape.

          yourvariable = new yourclass(parameter);

          • #15849

            is it possible to call to some method asynchronously ??

            • #15871

              You could wrap the functionality in another orchestration and use the Start Orchestration shape to call it.  Start Orchestration calls other orchestreations asynchronously while the Call Orchestration shape calls it synchronously

            • #15878

              As was noted you could wrap the call in an orchestration and simply start that orchestration which would give you a 'fire and forget' asynchronous call.  On the other hand, if you want to perform the call, do some other work and then later act upon the data then a better solution would be to use the Parallel orchestration shape to perform this work.

               Tim Rayburn

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.