Request processing patterns for complex service flows
Complex service flows conform to the aggregate connector pattern. Complex service flows are processed in slightly different ways, depending on whether the service flow is persistent. If the service flow is not persistent, the command that DFHMADPL uses to create the navigation manager process has an additional option.
The following steps describe the request processing of a complex service flow:
- A service requester invokes the service flow when it sends a request message using any of the supported interfaces.
- The CICS SFR interface
program DFHMADPL receives the request and, using the request name in the request
message, reads the service flow repository file DFHMAASF.
If the request is in XML, DFHMADPL invokes the XML to COBOL converter program to parse the XML header and return COBOL. DFHMADPL then reads the service flow repository file.
- The processing mode of the service flow is defined in the service flow
repository file. If the service flow is complex, DFHMADPL performs the following
processing:
- Defines the BTS process using the BTS command EXEC CICS DEFINE PROCESS. If your service flow is persistent, a record is added to the BTS repository for the process, allowing CICS to recover if a failure occurs. If the service flow is not persistent and the BTS NOCHECK option is specified, a record is not added to the BTS repository.
- Writes application request data to the process input data-container ADAPTER.INPUT. The flow navigator program reads the input data-container ADAPTER.INPUT to retrieve the application request data that is used to run the service flow.
- Writes state information to the ADAPTER.PROCESS data-container. State information includes the request name, the program name, and the transaction that will process the application request data. For aggregate service flows, the program and transaction is the flow navigator. The flow navigator manages the order and processing of each server adapter, as modeled in the flow.
- Runs the BTS process in synchronous or asynchronous mode, as defined in the service flow properties file, to start the navigation manager.
- The navigation manager performs the following processing:
- Reads the adapter state information from the ADAPTER.PROCESS data-container.
- Defines the flow navigator BTS activity that will process the application request, using the EXEC CICS DEFINE ACTIVITY command:
- Writes adapter state information to the ADAPTER.PROCESS data-container. Additional state information includes the activity ID, the CICS® applid where the navigation manager is running, and the EIBTASKN of the navigation manager.
- Runs the flow navigator as defined by the service flow, either in synchronous or asynchronous mode.
When the Navigation Manager runs the flow navigator, the server adapters perform request processing as modeled in service flow project tools, to complete the request made by the service requester.
- Invoke a server adapter to interact with a CICS and IMS™ application using a 3270 data stream and retain the result. This processing consists of screen navigation.
- Invoke a server adapter to interact with a WebSphere® MQ-enabled application and post the result of the first server adapter's processing to a WebSphere MQ queue.
- Invoke a server adapter to interact with one or more CICS transactions using DPL and send the result of the first server adapter. For example, it could write a record to a DB2® database.
- Invoke a custom program using DPL that executes logic or complex input and output. You can develop a custom program to augment CICS Service Flow Runtime.
- Return application data to the navigation manager. If this data contains the final result, the navigation manager returns to the CICS SFR interface program to pass the response back to the service requester.
Each business request issued by the service requester results in a different BTS process instance to run the appropriate service flow as defined by the service requester. Each process instance consists of a navigation manager activity, a flow navigator activity, and server adapter activities that support the invoked service flow.