Martijn Hoogendoorn has re-posted the link to his utility to programmatically generate orchestrations (now that he is working for Microsoft the old link on his previous blog no longer works). Check it out at:  http://blogs.msdn.com/martijnh/default.aspx . He has used the Microsoft.Biztalk.IMS.dll which contains interfaces such as IBtsVsDocument and the Biztalk Object Model dll to do most of the generation. This is quite different to Jon Flanders Pattern Wizards which have a wizard written over a bunch of VS2005 templates to generate what you need. In this codebase, Martijn has one class which generates a sample akin to the SDK CallOrchestration sample. Its pretty nifty and demonstrates how one can use the Biztalk TypeSystem to generate ports, message references etc. One thing which puzzled me is where he got the Biztalk.IMS.dll from!! Jon has that in his codebase too but i couldnt find that anywhere on my machine! Does anyone know where we can get that or where some documentation would be available?

So when would you want to code gen orchestrations? After all, using the orchestration designer isnt exactly rocket science and now that there is a wealth of community wisdom in the realm of patterns (encapsulated in Jons tool), why do we need this? I look at this technique as facilitating one layer of abstraction over the designer itself. Take the “Solution Designer” that Eddie Churchill demo’ed in a channel9 video  If you look at that, it shows how the Team Architect AD surface can be used to sketch your solution end to end and then generate the solution structure with stub orchestrations, schemas, maps etc. Thats a good application of DSL technology (although in the demo version it used windows forms, not the DSL toolkit which wasnt stable enough to be used at that time).

Anyway, back to the discussion. One thing about good architectures is that they should also be consistent (along with being flexible). So if you have a bunch of backend systems that expose similar interfaces to be integrated with (WS, queues, file ports etc) and if you have a choice of which interface to use, while you are well within your rights to use any way of connecting to them, IMO, a better way would be to establish a consistent pattern of connecting to them so that you can make sure your bases are all covered, your development team knows whats expected and you have a standard base for delivering estimates. So if you do this, then you can fairly well predict exactly what your “connector” looks like and then, if you have worked out the contract for your schemas etc, then you can just go ahead and code gen the entire lot. Use the VS automation model to generate the solution structure, add the various projects in programmatically and then inside each of them, use these utilities (like Martijns) to generate the rest (and in a future version of BizUnitExtensions, autogen your tests as well). This way we can maximize our “design contracts”.

I do wish the Biztalk team would make the WebService Publishing Wizard available programmatically. (I guess the WSE publishing wizard is probably on its way out now that WCF is in production). This would help even more code generation. By the way, i heard that Eddie has left the BTS team and so the
solution designer has been discarded. Anyone know the skinny on this? I
would be terribly disappointed if this is the case because to me, that was the
most compelling feature in the “future/vNext” Biztalk release (perhaps
it was post R2).

By the way, I also came across another tool named BridgeWerx sometime ago that used a custom interface to sketch your biztalk solution and generate the codebase. I wonder if they have moved into the Microsoft DSL space now.

I’ve asked Martijn about the possibility of making this into a CodePlex
project (although the source code is available with the download, putting it up as a project would make it more visible and get more collaboration). I’m sure that with more hands and more time (overall) there
could be much more powerful things that could be done with the tool.