Previous Topic: Synchronous Cooperative FlowsNext Topic: Unit of Work


Asynchronous Cooperative Flows

For an asynchronous cooperative flow, the DPC does not wait for a response from the DPS before continuing its execution. The requesting DPC can continue with other processing while the target server is processing the outstanding request.

A DPC is not obligated to complete an outstanding asynchronous flow request prior to initiating a flow to another DPS. A DPC can have multiple outstanding flows.

The action language that supports an asynchronous cooperative flow consists of four action language statements; USE ASYNC, GET ASYNC, CHECK ASYNC, and IGNORE ASYNC. The USE ASYNC statement initiates a cooperative flow. The GET ASYNC retrieves a cooperative flow response. The other two statements allow the generated application to query the status of an outstanding cooperative flow, or direct that flow's response be ignored.

An asynchronous cooperative flow request is generated when the action language coded in a PStep contains a USE ASYNC action language statement. Similar to the Procedure Step USE statement, the target PStep must be packaged in a Server Manager. The calling PStep and the target PStep may not be packaged in the same load module.

A generated proxy provides an interface that lets a DPS be invoked in an asynchronous manner. This interface is optional and generates the user-written application which uses asynchronous proxy interface.

Using asynchronous cooperative flows is more complicated than using the more traditional synchronous cooperative flow. The logic that initiates the flow to a target DPS is separate from the logic that is involved in retrieving the response. The mechanics of initiating and completing the cooperative flow are the responsibility of the application developer. Additionally, the application developer is given the opportunity to provide error handling within the action diagram using WHEN clauses that can be specified on the asynchronous action language statements.

Note: Asynchronous support is not available to every execution environment and TP Monitor offered by CA Gen. Supported environments are documented in the Asynchronous Support section in the current release of the CA Gen Technical Requirements document.