We have developed a custom visual studio workflow for SharePoint MOSS. It creates tasks for a document approval process and works fine on our development machines. We are using a main workflow activity and one custom child activity. We use binding on the properties to pass them throughout the workflow, all standard stuff for windows workflow, we think.
When we deploy this workflow to our test server, which is a small farm, our taskproperties/workflowproperties all seem to evaluate to null.
We have tried many, many different ways to solve this, including running the workflow as the admin account, manually recreating the the taskproperties in code etc. etc. without any success.
Can anyone shed any light on what could be the problem, the error is detailed below, all the best,
This error below is an Internal error, and seems to point to a error when a Task is created with a content type (SPWinOETaskService.CreateTaskWithContentType).
11/23/2009 19:09:54.47 w3wp.exe (0x1FB8) 0x1CDC Windows SharePoint Services Workflow Infrastructure 88xr Unexpected WinWF Internal Error, terminating workflow Id# 07ab6631-c656-4918-8ffe-7a09da3a3628
11/23/2009 19:09:54.47 w3wp.exe (0x1FB8) 0x1CDC Windows SharePoint Services Workflow Infrastructure 98d4 Unexpected System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPWinOETaskService.CreateTaskWithContentTypeInternal(Guid taskId, SPWorkflowTaskProperties properties, Boolean useDefaultContentType, SPContentTypeId ctid, HybridDictionary specialPermissions) at Microsoft.SharePoint.Workflow.SPWinOETaskService.CreateTaskWithContentType(Guid taskId, SPWorkflowTaskProperties properties, String taskContentTypeId, HybridDictionary specialPermissions) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAtt...
11/23/2009 19:09:54.47* w3wp.exe (0x1FB8) 0x1CDC Windows SharePoint Services Workflow Infrastructure 98d4 Unexpected ...ributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Workflow.Activities.CallExternalMethodActivity.Execute(Acti...
11/23/2009 19:09:54.47* w3wp.exe (0x1FB8) 0x1CDC Windows SharePoint Services Workflow Infrastructure 98d4 Unexpected ...vityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()