Sequence diagram: Pre-request and post-request processing
This diagram shows the interaction between the BCS and Context SPI. Either interface can indicate that is about to start execution or has completed execution.
This diagram shows the interaction between the BCS and the business contexts. Here is the flow on how a business component invokes BCS to indicate that a business service is about to start and has completed.
- Business component calls startRequest() on BCS to indicate a service is about to be invoked.
- Retrieves a list of business contexts of this particular request and associate them to the activity.
- The preInvoke(sessionData) method is called on each of the business context in the returned list. Each business context can use this method to update its context information using the session data that is passed in. It also provides an opportunity for the business context to do any pre processing before the business logic is executed.
- Executes the business logic to provide the requested service.
- Once the service operation is complete, business component calls the endRequest() method on BCS.
- BCS calls the postInvoke() method on each business context for the activity. Each business context can use this method to clean up any unnecessary information.
Related concepts
Business context service
Related reference
Business Context configuration file