We attempted to reuse a XAML (declarative activity workflow) in a few places within the same XAMLX and it doesn't appear to allow this. On the WCF client side, it reported an obscure error of something to the effect of unknown message received
and a communication error stating the service instance couldn't be used at this time and to ensure the call order is correct or order delivery guarantee is enabled. However, this appears to mask the true issue which is on the server side.
Apparently, when the server side WCF end point is trying to start the workflow instance, it throws this error building a dictionary of workflow children...
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Activities.Debugger.DebugManager.EnsureInstrumented(Activity activity)
at System.Activities.Debugger.DebugManager.OnEnterState(ActivityInstance instance)
at System.Activities.Debugger.DebugController.ActivityStarted(ActivityInstance activityInstance)
View Complete Post