I have an issue with a SP2010 state machine workflow. The workflow contains two activities, in each of them I'm trying to send mails using the "SendMail" component.
I receive instead the following error:
System.InvalidOperationException: Correlation value has not been initialized on declaration X for activity Y.
There is definitely a problem with the correlation tokens that I can't figure out. From what I understand I must somehow use the same correlation token for both "SendMail" tasks even if they are in different activities.
Is that correct? The same correlation token must be used for both? Where do I get that from? I've tried to create the same token with the workflow as the "OwnerActivityName", tried different combinations, nothing...
I don't really get how I must set them up. Can someone guide me on this?