Called Orchestrations do not Produce Service Instances in HAT

I’m currently on Microsoft ‘Developing Business Process and Integration Solutions using MS BizTalk Server 2006’ course and in the process of working through a lab, noticed some interesting behaviour when attempting to debug orchestrations that are called from other orchestrations.

It would appear that only asynchronous (aka ‘started’) orchestrations will appear as service instances in HAT and not synchronous (aka ‘called’). I presume this is due to the fact that the called orchestration exists in the thread of the caller, rather than spawning a new thread as in the case of a started orchestration, possibly due to optimisation?

Either way, it would be helpful to receive a service instance in HAT so I can attach and debug…

Inline C#, Javascript and JScript in XSLT

(Final) Update: I’ve uploaded a sample project to demonstrate using the StripWhitespace method in an XSL transformation. The project is provided as a zip file and contains a sample input message – download the sample project here.

Update: The stylesheet I’m using on appears to be shrinking the images in this post on Firefox (IE appears to be unaffected) – simply right-click the image to view the correct size.

I’ve used inline Javascript in XSLT for BizTalk maps in the past, but came across the article Extending XSLT with JScript, C#, and Visual Basic .NET by Aaron Skonnard on MSDN last night that discusses, among other things, embedding C#!

Its faily simple to use – the following inline C# method strips whitespace from the input:

XSLT C# Snippet

Before the inline code will work, you’ll need to inform the XSLT processor about the msxsl and user prefix (user can be anything you want):

XSLT C# XML Namespace Declaration

Finally, you’ll need to call the inline method from the actual XSLT template:

XSLT C# Value-of

$InputField here is just an example, you can use any valid input to the value-of element.

This has been tested in BizTalk 2006 but not yet in 2004 (although I have Javascript working in 2004 so I can’t see any reason why it wouldn’t…)