I am using workflowManager.StartWorkflow to pass the following XML into a standard Approval workflow.
<?xml version="1.0" encoding="UTF-8"?>
<dfs:myFields
xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types"
xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields"
xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields"
xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes"
xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dfs:queryFields />
<dfs:dataFields>
<d:SharePointListItem_RW>
<d:Approvers>
<Assignment>
<Assignee>
<pc:Person>
<pc:DisplayName>Maree Jones</pc:DisplayName>
<pc:AccountId>SOMECOMP\mcjones</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</Assignee>
<d:Stage xsi:nil="true" />
<d:AssignmentType>Parallel</d:AssignmentType>
</Assignment>
</d:Approvers>
<d:ExpandGroups>true</d:ExpandGroups>
<d:NotificationMessage>A skill rating has been created which requires your approval.</d:NotificationMessage>
<d:DueDateforAllTasks xsi:nil="true" />
<d:DurationforSerialTasks>5</d:DurationforSerialTasks>
<d:DurationUnits>Day</d:DurationUnits>
<d:CC />
<d:CancelonRejection>true</d:CancelonRejection>
<d:CancelonChange>false</d:CancelonChange>
<d:EnableContentApproval>true</d:EnableContentApproval>
</d:SharePointListItem_RW>
</dfs:dataFields>
</dfs:myFields>
But I get the following error. Is there something obviously wrong with the XML? How can I go about debugging this error?
inWF Internal Error, terminating workflow Id# 56751cae-35f8-4a3e-bd1a-5458e2bb7cbe 02/04/2013 11:03:43.78 w3wp.exe (0x095C) 0x0BA4 SharePoint Foundation Workflow Infrastructure
98d4 Unexpected System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.Office.Workflow.Actions.StageContainer.UpdateFromString(SPWeb web, SPItemKey itemId, String assignmentString) at Microsoft.Office.Workflow.Actions.OfficeTask.get_ParticipantList()
--- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) ... 02/04/2013 11:03:43.78* w3wp.exe (0x095C) 0x0BA4 SharePoint Foundation
Workflow Infrastructure 98d4 Unexpected ... at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Workflow.ComponentModel.ActivityBindPropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.PropertyInfo.GetValue(Object obj, Object[] index)
at System.Workflow.ComponentModel.MemberBind.<>c__DisplayClass1.b__0(Object sender, PathMemberInfoEventArgs eventArgs) at System.Workflow.ComponentModel.PathWalker.TryWalkPropertyPath(Type rootType, String path) at System.Workflow.ComponentModel.MemberBind.GetValue(MemberInfo memberInfo, Object dataContext, String path) at System.Workflow.ComponentModel.ActivityBind.GetMemberValue(Object dat... 02/04/2013 11:03:43.78* w3wp.exe (0x095C)
0x0BA4 SharePoint Foundation Workflow Infrastructure
98d4 Unexpected ...aSourceObject, MemberInfo memberInfo, String path, Type targetType) at System.Workflow.ComponentModel.ActivityBind.InternalGetRuntimeValue(Activity activity, Type targetType) at System.Workflow.ComponentModel.DependencyObject.GetBoundValue(ActivityBind bind, Type targetType) at System.Workflow.ComponentModel.DependencyObject.GetValueCommon(DependencyProperty dependencyProperty, PropertyMetadata metadata) at Microsoft.SharePoint.WorkflowActions.CoerceActivity.get_Value() at Microsoft.SharePoint.WorkflowActions.CoerceActivity.Coerce() at Microsoft.SharePoint.WorkflowActions.CoerceActivity.Execute(ActivityExecutionContext provider) at System.Workflow.ComponentModel.ActivityExecutor1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workf...
1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()
02/04/2013 11:03:43.78* w3wp.exe (0x095C)
0x0BA4 SharePoint Foundation Workflow Infrastructure
98d4 Unexpected ...low.ComponentModel.ActivityExecutor