Calling an external assembly in BizTalk Mapper

October 11, 2011 at 4:32 pm Leave a comment

There are occasions in which you need to incorporate in your maps certain transformations or functions already available in an existing assembly. In this cases the Scripting function is a very powerful tool to attain this goal.

image

To use it you simply need to perform the following steps:

1) Add a reference to the assembly you wish to invoke from within your map

image

2) Drag the Scripting functoid to your map and access its configuration screen:

image

3) Select “External Assembly” as script type and the choose from the proper drop down lists the assembly name, script class and ´method you would like to invoke.

image

4) Make the needed inbound and outbound connections to and from the Scripting functoid

image

5) Test your map and make sure the invoked method is performing as expected.

Keep in mind that if you use of configuration data inside the called assembly you will need to add the corresponding information to the devenv.exe.config located in “C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE” for debugging and in the BTSNTSvc.exe.config in “C:\Program Files (x86)\Microsoft BizTalk Server 2009” for production deployments.

Also refrain yourself from using complex data types like Xml and stick to the basic ones, otherwise you’ll receive an error like this when testing your map:

Function ‘ScriptNS1:MyFunction()’ has failed. Cannot convert the operand to ‘Result tree fragment’.

Some time ago Ben Cops compiled a very complete list of considerations to take into account when using the Scripting functoid to call external assemblies, you can find more information in the following link:

External assembly script functoid troubleshooting tips

Advertisements

Entry filed under: BizTalk. Tags: , , .

Clearing the Silverlight Isolated Storage cache .Net Framework 4.0 disrupts BizTalk ENTSSO Service

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


October 2011
M T W T F S S
« Sep   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories


%d bloggers like this: