Several custom scripting functoid with the same method

by eliasen 9. marts 2009 20:51

Hi all

A couple of months ago, while trying to solve the If-Then-Else issue within a map in a nice way, a fellow BizTalk MVP suggested to me that I could just have the script inside a custom scripting functoid and then copy the script from custom scripting functoid to custom scripting functoid.

Naturally (as I assumed it was, back then) I told him that this was impossible, because BizTalk wouldn't let me have two custom scripting functoids which contains the same method, ie. the two methods have the same signature.

"Sure you can", he replied.... So I had to check it out... I fired up my BizTalk 2006 R2 virtual machine, and sure enough: He was right. I was in chock, because I was totally sure i was right. so I fired up a BizTalk 2006 virtual machine and again; He was right and I was wrong.

Now... those who know me will know that when I am convinced I am right, I will usually go to great lengths to prove it :-) So I stepped down a version and tried BizTalk 2004. Again no luck.

But FINALLY, when trying it on BizTalk 2002, it turned out that I was right. Back in BizTalk 2002, scripts were in VBScript and here you can not have multiple custom scripting functoids with methods with the same signature. In versions after BizTalk 2002, the compiler will collapse those methods into one, but in BizTalk 2000 and 2002, this is not done, and therefore an error occurs.

So all in all, I discovered this limitation back in 2003 and never questioned it again since. So let this be a lesson to all (especially me, because I always think I am right :-) ) - that sometimes we need to reevaluate what we think we know.

Hopefully this post will:

  1. encourage people to reevaluate opinions and knowledge
  2. inform others like me, who thinks that you cannot have the same method signature twice in a map, that this is wrong :-)

--
eliasen

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed


Buy from Amazon

Microsoft MVP


6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.

MCTS

Image to show

Month List

Page List