Sequence diagram: Retrieving and updating business contexts
This diagram illustrates how a business component retrieves and updates context information. The following example shows how the preferred language of a user is set on the GlobalizationContext.
- Business component calls startRequest() on BCS to have the contexts set up and cached for the request.
- Executes the business logic to provide the requested service.
- During the execution of the business operation, findContext() is called on BCS, usually by using the CommandContext object that is available for each command, to retrieve a business context. In the following, the GlobalizationContext for the request is returned.
- The business logic then retrieves and updates information as required from the business context. In the following example, the preferred language ID is updated.
- Once the service operation is complete, business component calls the endRequest() method on BCS.
- During the endRequest() execution, BCS determines whether any business contexts is modified during the request and requires to be updated in the database. In this example, since the preferred language ID is modified, the GlobalizationContext will be updated.
Related concepts
Business context serviceRelated reference
Business Context configuration file