Tuesday, May 27, 2008

System.InvalidOperationException: Correlation value specified does not match the already initialized correlation value

Though you supply the same correlation token for TaskChanged/CompleteTask/DeleteTask as that of CreateTask, if you are getting the following error:

System.InvalidOperationException: Correlation value specified does not match the already initialized correlation value on declaration Task1Token for activity completeTask2. at System.Workflow.Activities.CorrelationService.ValidateCorrelation(ICollection`1 initializerProperties, ICollection`1 followerProperties, String memberName, Activity activity) 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.ActivityExecuto...

then here is the Solution:

SharePoint is giving you the wrong direction. The problem is not with the Correlation Token but with the Task ID! Just like the correlation token, Task ID should be the same as that of Create Task. So, point to the correct Task ID and it will solve the problem!

Friday, May 23, 2008

Failed to find the parent content type ID

If you have created a content type id by appending GUID to the parent type id as follows:

0x010801FBE5603FF6FD4ae3878BFC1D597E826C

and facing the error

Failed to find the parent content type ID="ct-1033-0x010801.......",

then here is the Solution:

append two zeros to the parent type id before adding the new GUID as follows

0x01080100FBE5603FF6FD4ae3878BFC1D597E826C

This should solve it!