Hi Everyone,

I am trying to create a Sequential workflow that will dynamically create tasks, that are actually a list of workflow steps that are loaded from a WSS3 list.

The workflow I have implemented contains the ForEach action, and inside this I have placed the CreateTask and OnTaskChanged actions (WSS 3), which I configure each time with the appropriate details. The first pass works fine, but the second gives the following error. I have also tried changing the CorrelationToken properties, but this is not possible at runtime.

0x07FC Windows SharePoint Services Workflow Infrastructure

98d4 Unexpected System.InvalidOperationException: Correlation value on declaration "taskToken" is already initialized. at System.Workflow.Runtime.CorrelationToken.Initialize(Activity activity, ICollection`1 propertyValues) at System.Workflow.Activities.CorrelationService.InvalidateCorrelationToken(Activity activity, Type interfaceType, String methodName, Object[] messageArgs) at System.Workflow.Activities.CallExternalMethodActivity.Execute(ActivityExecutionContext 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(IW...

Does anybody know how to resolve this error, and perhaps of an alternative approach to implementing the same functionality

Re: Windows Workflow Foundation Creation of Workflow Tasks inside a Loop

Tom Lake - MSFT

This question should be asked in the SharePoint - Workflow forum since it is specific to SharePoint activities.