This project is read-only.

HTTP Message Correlation

In order to support long running workflows or workflows that live for more than one Http message exchange we must support Correlation.

When a message is received, correlation allows the host to determine if the message is meant for a new or existing workflow instance. To make this determination it must have a method to obtain a correlation key.
Correlation Key Methods
  • Custom - provide a class which returns an instance ID and set a host property to use it.
  • Uri template arguments - use a value from the template as a instance key
  • Cookies - stores the instance ID in a cookie

Content Based Correlation

Content based correlation is useful because it does not require the message sender to do anything different when sending a message to a workflow.
Content based correlation will be implemented by specifying the name of a Uri Template argument to be considered the correlation key. The requirement will be that the key be passed as a part of the Uri as is commonly done with HTTP services.
  • Not implemented yet


The HttpReceive activity will add a cookie with the Workflow Instance ID
HTTP/1.1 200 OK
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Set-Cookie: WorkflowInstance=efdb14c5-b591-4401-83f9-09ce68a52756
Date: Mon, 29 Aug 2011 22:57:47 GMT

When a client application wants to send a message to an existing instance, they need to set the cookie
Cookie: WorkflowInstance=efdb14c5-b591-4401-83f9-09ce68a52756

Last edited Aug 30, 2011 at 12:16 AM by ronjacobs, version 7


No comments yet.