A customer is running CRM 8.1 on-prem with a LOT of workflows. Sometimes these workflows will fail with the error: "An Activity can only get the location of arguments which it owns." This error is not reproducible (i.e. running / triggering the same workflow again will not cause the issue).
Full trace:
Plugin Trace: [Workflow: Workflow.CalculateClearedFees] [Workflow (2.0.0.7): Workflow.CalculateClearedFees] Entered CalculateClearedFees.Execute(), Activity Instance Id: 69, Workflow Instance Id: 3f517f35-4fd1-41b8-8259-010d871a8e23 CalculateClearedFees.Execute(), Correlation Id: 76033beb-d534-4f18-8129-eaf6d4792cb1, Initiating User: ee172285-77e3-e411-b482-005056870a84 Error Message: Unhandled Exception: System.InvalidOperationException: An Activity can only get the location of arguments which it owns. Activity 'CustomActivityStep153' is trying to get the location of argument 'ClearedFees' which is owned by activity 'CustomActivityStep143: Calculate online application fees'. at System.Activities.RuntimeArgument.GetLocation(ActivityContext context) at System.Activities.ActivityContext.SetValueCore[T](LocationReference locationReference, T value) at System.Activities.ActivityContext.SetValue[T](OutArgument`1 argument, T value) at System.Activities.OutArgument`1.Set(ActivityContext context, T value) at Workflow.CalculateClearedFees.Execute(CodeActivityContext executionContext) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
The error is thrown when an OutArgument is being set, which is even stranger. Has anyone seen anything like this?