I got a slightly obscure error message when trying to run a DeleteTask activity in my workflow:
System.InvalidOperationException: Correlation value specified does not match the already initialized correlation value on declaration taskToken for activity deleteTask1.
Hmm. I checked the correlation token though – and it was fine. And what’s it doing initialising another token? Found the answer though, courtesy of Matt Morse – I’d not set the task ID property for the delete task activity.
This did lead me around to wondering why I have to? I mean, we’ve a correlation token for the task. The correlation token contains the TaskID. And yet I have to specify both of these things to the DeleteTask activity to identify the task I want deleted? Something ain’t right there…