BizTalk Maven

A few notes on BizTalk

Posts Tagged ‘Orchestration’

Failed while creating a [orchestration type] service

Posted by Jeremy on 19/08/2010

This is more of a note to self, every time I see this one (it’s quite rare), I’m kinda wondering where I’ve seen it before.
I was running some tests, after having made a few changes to an orchestration, and to my surprise I found this error (source: XLANGs) in the eventLog:


Failed while creating a [my orchestration name] service.
Exception type: ServiceCreationException

The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._serviceCreator(Guid& instanceId, Object objCurrMsg)
at Microsoft.XLANGs.Core.ResourceContainer._allocateResource(Guid& key, UInt32 hashKey, ResourceCreator resCreator, Object creationContext)
at Microsoft.XLANGs.Core.ResourceContainer.Dispense(Guid& key, ResourceCreator resCreator, Object creationContext)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._dispenseService(Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count)
at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg)
at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)

Additional error information:
Could not load type ‘[my orchestration full name]‘ from assembly ‘[the assembly]‘.
Exception type: TypeLoadException

Source: mscorlib
Target Site: Void* _GetTypeByName(System.String, Boolean, Boolean, Boolean, System.Threading.StackCrawlMark ByRef, Boolean)
The following is a stack trace that identifies the location where the exception occured
at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.Resolve()
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createNewService(Guid& serviceId, Guid& instanceId, BTXServiceStaticState staticState)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


You have to agree, it looks pretty nasty.
Simple to fix though : you just have to rebuild and re-GAC. But make sure you do it properly, even if you have to un-GAC the old assembly.

Posted in BizTalk, Errors | Tagged: , , , | Leave a Comment »

Shortcuts for the BizTalk orchestration Editor

Posted by Jeremy on 26/07/2008

Something I’ve noticed while working on an orchestration:
To add a shape, you can either right-click on a Shape connector line or use the BizTalk Orchestration Toolbox.
It can be quite frustrating sometimes when you use the first way because the shapes are not in alphabetical order so you have to read them all in order to get what you want.
If you right click on the shape connector line, show the choice of shapes and press one of the key below, the corresponding shape will appear.
Not such a big deal, but still useful.

W: Throw Exception
E: Send
T: Start Orchestration
Y: Delay
U: Construct Message
I: Decide
O: Loop
P: Parallel
A: Terminate
S: Scope
D: Suspend
F: Transform
G: Group
L: Listen
X: Expression
C: Call Orchestration
V: Receive
M: Message Assignment
R: Call Rules (works only in atomic scopes…)
N: Compensate (provided you’re in a compensation block)

Posted in BizTalk, Tips and Tricks | Tagged: , , | Leave a Comment »

Weird Error in orchestration

Posted by Jeremy on 26/07/2008

Sometimes, even though the orchestration does not show any error , when you build your project, you get a lot of them and when double-clicking the error it shows you something perfectly normal.

You can close VS ten times but it doesn’t help…

This thing drove me crazy for a while until I knew what to do.

What do you do then?

Well, you know the orchestration is formed of 2 parts, right?

One is XML of type <om:MetaModel  xmlns:om=”http://schemas.microsoft.com/BizTalk/2003/DesignerData”/> and the other is in X# (or Xlang if you want).

If you look at the Xlang part, you’ll see that your error is showing there instead of the relevant piece of code.  However, in the XML, the code appears and not the error.

The conclusion is that it’s the XML part that builds the Xlang part and not the opposite.

Great! Now what?

Edit the orchestration, get rid of the second one (basically everything below the #endif // __DESIGNER_DATA line), when rebuilding the project, it will behave as normal – showing no errors (provided that you really don’t have any error there).

Now if after building you open your orchestration with the XMLEditor (right click -> open with -> XMLEditor), you’ll see that the Xlang part has not been generated…

The thing is that the X# won’t be generated unless you change something in the orchestration.

Just open any shape like an expression shape and add a random space anywhere and that will do the trick.

Edit again and you’ll see the X#.

#if __DESIGNER_DATA#error Do not define __DESIGNER_DATA.<?xml version=1.0 encoding=utf-8 standalone=yes?>

<om:MetaModel MajorVersion=1 MinorVersion=3 Core=2b131234-7959-458d-834f-2dc0769ce683 ScheduleModel=66366196-361d-448d-976f-cab5e87496d2 xmlns:om=http://schemas.microsoft.com/BizTalk/2003/DesignerData>

</om:MetaModel>

#endif // __DESIGNER_DATA          <– Everything below this line should be removed

[Microsoft.XLANGs.BaseTypes.BPELExportable(false)]

module xxxxxxxxxxxxxxxxx

{

Posted in BizTalk, Errors, Tips and Tricks | Tagged: , | 1 Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 85 other followers