Share via


Be careful! Duplicate Correlation Tokens!

This is a nice one,

One of the bad things of copying and pasting in Visual Studio (Workflow extensions :) ), is missing up  your correlation tokens

look at this:

image

where in code (workflow1.designer.cs) you find this:

correlationtoken4.Name = "workflowtoken";

correlationtoken2.Name = "workflowtoken";

 

This will compile fine, your workflow might not work.

specially if you have a set of activities that all relate to each other,

deal with the token to be your sort of a session thing or a scope that your workflow activities live together in that token.

image

all of these activities are related with one Token and be careful they are not duplicate. it might have the same token name but not the same token.