Home Page › Forums › BizTalk 2004 – BizTalk 2010 › External assembly vs. BT map
- This topic has 7 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
March 11, 2007 at 11:01 AM #17931
Hiyas. I have been working with biztalk maps for awhile now and frequently find myself frustrated for 2 reasons.
- Large complex maps I have created tend to be "monsters". Even using the the page features of the design UI, it seems like when I have to come back to the map to do some maintenance several monhs later, it is a major headache to reorient myself on how the map works. I work with a team of developers and it is even worse trying to figure out how a map somebody else created works.
- While I can accomplish most of what I need to do with a map, it always seems like there is 1 or 2 things I just can't do and what I typically end up shelling out to C# via expression shape to "finish" my mappings.
I feel vaguely guilty about resorting to a external assembly and because somebody with much more experience than me once told me "that which can be done in biztalk, should be done in biztalk" I am hoping someone could share their advice/experience on this topic.
I should mention that, the corporation I work for is currently migrating all of our messaging infrastructure to biztalk. RIght now we have a handful of trading partners switched over, but ultimately we will have well over 100 trading partners sendings us docs in a wide variety of formats (EDI, XML cXML, CSV, flat file and more). My fear is that when we are completely migrated to Biztalk, we will have a serious maintentance overhead with all that message transform specific logic residing in C# code.
-
March 14, 2007 at 1:17 PM #17978
To start with, I generally try to solve mapping issues with a pattern of built-in functoids. If it doesn't work, then I use this forum and Google to find suggestions before resorting to calling everyone I know. I've stayed away from that option for months, but it's always there.
After I exhaust my options or figure out that the pattern is too unwieldy, I head to C# and a quick windows app with simple logic in a button. If it’s 3 lines or less, I’m happy to use a script. If it will possibly be used again, I build a custom functoid. Recent additions were DateTime conversion (any localized .NET acceptable DateTime format that gets converted to xsd:dateTime) and a RegEx validator so I can return an error on a particular field.
You can build a library of custom functoids and refactor them as needed. Just remember they need to be deployed ahead of any application that uses them.
-
March 15, 2007 at 1:29 PM #18004
Give up trying to use the BizTalk mapping for anything more than simple maps and move entirely to custom XSLT maps.
They're much easier to read, maintain and all that inline code in C# or Javascript etc. can be easily run if the base XSLT functions don't offer enough functionality.
Custom XSLT, Custom XSLT, Custom XSLT!!!
Nick.
-
October 10, 2007 at 11:12 AM #18179
How do you go about developing an assembly that can be referenced from a Transform Shape in an Orchestration. Is there an Interface that can be inheirited? What public methods do I need, what do those methods need to return?
Any help would be…well…helpful :p
-
October 10, 2007 at 4:26 PM #18183
For external assembly stuff, try this … http://seroter.wordpress.com/2007/04/02/calling-net-components-from-inline-xslt-in-biztalk/, and for inline code try .. http://seroter.wordpress.com/2007/05/24/calling-inline-net-code-from-inline-xslt-in-biztalk/
-
October 11, 2007 at 5:32 AM #18185
Thanks…
I think I may have been going about this incorrectly. I have a separate .NET solution where I am developing my XSLT and I was thinking of compiling a DLL that could be called from a Transform Shape. The XSLT is quite long and complex and modifying it in an Inline XSLT dialog box is not my idea of fun :S
The Transform shape in the Orchestration designer allows you to select a referenced assembly, but I don't know which interface I need to implement in order to see my XSLT map in my DLL. I have developed custom functoids and pipeline components and I have to say that my disappointment with MS in documenting these things is extremely high. I received all the info I needed from Blog and Forums.
-
October 11, 2007 at 12:24 PM #18190
rseroter,
Thanks for the links. You solved the most difficult transform I was trying to do. I have been looking for a custom iterator for months and was always told that you can't have global variables…or even variables for that matter…in a map.
Have you encountered any threading issues with global variables? Is there a chance that two Orchestrations would access the same global variable at the same time? Or is it only global to a single Orchestration map?
Thanks again for the help…GREATLY appreciated!!!
-
October 11, 2007 at 3:18 PM #18196
I originally had a threading issue using an external assembly as it seemed that map instances were sharing the object, even though it wasn't set up as a singleton. So, that what spawned the second post on putting the whole thing inline instead.
I've been in production with this for 3 months, and no problems have surfaced regarding shared variables.
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.