Correlation tokens are unique identifiers in SharePoint that
bridges to map the objects between the workflow and windows workflow
environment. Windows workflow acts as a intermediate layer to communicate with
other software. When incoming request arrives, runtime receives the request and
determines the request and identifies the workflow instance. Then it process
the request for the instance.
Windows workflow acts as a communication channel for all the
workflow instances. We can have two separate correlation tokens for Workflows
and task references. We cannot assign the correlation token to workflow task
that used for workflow.
We have to declare the correlation token for the workflow in
OnWorkflowActivated activity. We have to bind the this correlation token
to each activity in the workflow.
OnWorkflowActivated activity raises when workflow initiated for SharePoint. This is the first event raised
in workflow. Each task should have its own correlation token that provides the
task related information.