.comment-link {margin-left:.6em;}

Ben Cops

Wednesday, March 28, 2007

Determining the current Service Instance ID

Useful for matching debug info or event info up with whats in HAT. As per this blog entry from Stephen W. Thomas you can get the instance ID in an orchestration with:


OrchestrationInstanceID = System.Convert.ToString(Microsoft.XLANGs.Core.Service.RootService.InstanceId);


You can also have it in an external assembly easily enough. You'll want a reference to:

C:\Program Files\Microsoft BizTalk Server 2004\Microsoft.XLANGs.Engine.dll


public static string GetOrchestrationInstanceID()
{
try
{
return Microsoft.XLANGs.Core.Service.RootService.InstanceId.ToString();
}
catch(Exception exc)
{
return "Exception returning instance ID: " + exc.Message;
}
}

1 Comments:

  • Very well, Hester--very well indeed, said Mrs. doxepin. If a Sandemanian is chosen president of the Young heparin Men's Library, there must be a Methodist vice-president and a Baptist secretary.. He made a fire and cooked supper, propranolol eating enormously and with relish...

    By Blogger bleeeeeeeeeeeeeee, at 1:30 am  

Post a Comment

<< Home