Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Calling a .NET Assembly from Orchestration
- This topic has 6 replies, 1 voice, and was last updated 9 years, 5 months ago by
community-content.
-
AuthorPosts
-
-
September 26, 2006 at 12:22 AM #15839
Hi All,
How can i call to .NET Assembly from Orchestration?
i'm looking for some tutorials or step by step example.
TNX
-
September 26, 2006 at 2:15 AM #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,
-
September 26, 2006 at 3:25 AM #15841
Thank u YouseT. Omar, it's exactly what i need.
TNX
-
September 26, 2006 at 3:51 AM #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);
-
September 26, 2006 at 8:58 AM #15849
is it possible to call to some method asynchronously ??
-
September 27, 2006 at 11:05 AM #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
-
September 27, 2006 at 10:08 PM #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
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.