A service provider pipeline

In a service provider pipeline, CICS® receives a request, which is passed through a pipeline to the target application program. The response from the application is returned to the service requester through the same pipeline.

When CICS is in the role of service provider, it performs the following operations:
  1. Receive the request from the service requester.
  2. Examine the request, and extract the contents that are relevant to the target application program.
  3. Invoke the application program, passing data extracted from the request.
  4. When the application program returns control, construct a response, using data returned by the application program.
  5. Send a response to the service requester.
Figure 1 illustrates a pipeline of three message handlers in a service provider setting:
Figure 1. A service provider pipelineA service requester is connected to CICS Transaction Server. The pipeline contains three handlers: handler 1 and handler 2 are non-terminal handlers; handler 3 is the terminal handler, which links to the application program.
  1. CICS receives a request from the service requester. It passes the request to message handler 1.
  2. Message handler 1 performs some processing, and passes the request to handler 2 (To be precise, it returns control to CICS, which manages the pipeline. CICS then passes control to the next message handler).
  3. Message handler 2 receives the request from handler 1, performs some processing, and passes the request to handler 3.
  4. Message handler 3 is the terminal handler of the pipeline. It uses the information in the request to invoke the application program. It then uses the output from the application program to generate a response, which it passes back to handler 2.
  5. Message handler 2 receives the response from handler 3, performs some processing, and passes it to handler 1.
  6. Message handler 1 receives the response from handler 2, performs some processing, and returns the response to the service requester.