CorrelationToken & CorrelationParameter

I understand the use of a CorrelationToken in case you have an OwnerActivityName that has multiple correlations inside of it. I would think however that with this unique name (correlationtoken+owneractivityname) I would not need to have a unique CorrelationParameter.

How is the correlationparameter related to the CorrelationToken?

Thanks!

[360 byte] By [stombiztalker] at [2007-12-28]
# 1

Correlationparameter defines which formal parameter of the method/event args is to be used for correlation, whereas a correlationtoken is the actual token that the runtime creates when a method is raised/message arrives for an event inside the workflow.

Think of correlationparameter as the type [this can span across methods/events], and correlationtoken as the instance of the type [per method/event].

Look here for some more details: http://msdn2.microsoft.com/en-us/library/ms734588.aspx

Thanks,

Vignesh

VigneshKannappan at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

So, what you are saying then is that I might have multiple CallExternalMethods/HEE that are calling into the same method/expect a message back from the same event within a workflow and that the CorrelationToken identifies which one of these callers it goes back to? Like:

Token1 ->Owner1->param1->CEM
Token1->Owner1->param1->HEE

Token2->Owner1->param1->CEM
Token2->Owner1->param1->HEE

Thanks!

stombiztalker at 2007-9-4 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified