Create Task Activity has correlation token conflict when in While Loop

Hi everyone,

First time posting here. I'm having a problem with developing a MOSS Workflow.

The scenario is this:

Within my workflow, I have a while loop construct. Within this while loop, there is a series of CreateTask->Wait for Task to be Changed -> CloseTask. It works fine until it loops back around to try to create another task with the same correlation token. In fact, that's the error I get.

How do I get around this issue by disassociating the token or something like that.

Thanks in advance for any help.

rnellis2002



Answer this question

Create Task Activity has correlation token conflict when in While Loop

  • Muhammad Azeem Azam

    What you can do is use a replicator that contains a sequence activity, within that sequence you can then use CreateTask, onTaskChanged, and CompleteTask.

    Your problem is probably the OwnerActivityName of the task Correlation token. You need to set the OwnerActivityName to the sequence activity that is inside the replicator.



  • obulay

    Hi rnellis,

    I belive you need to create a sequence inside a Replicator activity in order to accomplish this. Eliene Hao mentions it in her post here:

    http://blogs.msdn.com/sharepoint/archive/2006/11/23/developing-workflows-in-vs-part-3-five-steps-for-developing-your-workflow.aspx

    Cheers,
    Nick

  • Create Task Activity has correlation token conflict when in While Loop