Context Separation
Because the Service resource separates the service definition from the transport and the implementation of operations, your implementations may require context information from the underlying request on the specific transport. For example, you may wish to alter processing of the request based on the user ID of the requestor, or you may wish to access the client’s digital signature. The Context resource allows you to define a schema for storing relevant context information.
You can define Context resources, each containing the schema for the data you wish to use. Each operation within a Service resource can then reference a particular Context resource. You can map data from the incoming request (for example, MIME message attachments, authentication and SSL information, and so on) into the elements of the schema defined in your Context resource.
When a Context resource is specified, the data from the incoming request is passed to the implementation defined for an operation. The process definition that implements the operation can use the Get Context and Set Context activities to retrieve or set values for elements within the context.
See
for more information about the Context resource and the Get Context and Set Context activities.