Compensation is the act of modifying the effects of a completed activity and can be used to undo or reverse the actions that the activity took.
At build time, users need to know the modeled service flows that require recoverability if a failure occurs at run time. If it is decided that a service flow requires recoverability, the person that models the service flow also needs to model a separate service flow that can be used for compensation.
When the process terminates abnormally in asynchronous mode (due to a runtime system error or an improperly modeled flow), the runtime BTS process is incomplete.
In Inquiry (synchronous mode) processing, even if the process does not execute successfully, the process state is considered complete.
For information on what steps the service requestor can take when the BTS process is incomplete, see Table 1.
Mode | Process execution | Process state | Next step | End result |
---|---|---|---|---|
Asynchronous (update) | Failed | Incomplete BTS resources, including process container information and process state are available for use in subsequent CICS® Service Flow Runtime processes. |
The service requestor can either:
See Deciding on whether to cancel or run compensating flow for more information. |
A cancel request releases the BTS resources and
ends the BTS process. For information on how the compensation flow is invoked for a FEPI adapter, see LU assignment processing for non-unique IDs — asynchronous mode. For information on how the compensation flow is invoked for a Link3270 bridge server adapter, see Link3270 State file processing for non-unique IDs — asynchronous mode. |
Asynchronous (update) | Successful | Complete No BTS resources are left outstanding. No process container information is available for use in subsequent CICS Service Flow Runtime processes. |
None | No BTS resources are left outstanding. No process container information is available for use in subsequent CICS Service Flow Runtime processes. |
Synchronous (inquiry) | Failed | Complete No process state or container information is available for use in subsequent CICS Service Flow Runtime processes and no BTS resources are left outstanding. |
If your site uses LU assignment processing for non-unique
UserIDs, abnormal termination can result in LUs remaining assigned (for
FEPI adapter request processing) or can result in allocated Link3270 bridge
facilities and associated Link3270 State file data on the CICS Service Flow Runtime Link3270
State file (for Link3270 bridge server adapter request processing). Because of the complete state there will be no BTS process container information available for subsequent use to locate, use and logoff assigned LUs (for FEPI adapter request processing) or to locate, use and delete bridge facilities and associated state data (for Link3270 bridge server adapter request processing). |
For FEPI adapter request processing, the LUs that
were assigned will have their sessions (FEPI conversations) terminated and
assignment deleted before the BTS process is complete, successfully executed
or not. See LU assignment processing for non-unique IDs — synchronous mode for a description
of how LU assignments are deleted. For Link3270 bridge server adapter request processing, the bridge facilities (and associated state data) will be deleted before the BTS process is complete, successfully executed or not. See Link3270 State file processing for non-unique IDs — synchronous mode for a description of how this is accomplished. |
Synchronous (inquiry) | Successful | Complete No process state or container information is available for use in subsequent CICS Service Flow Runtime processes and no BTS resources are left outstanding. |
For FEPI adapter request processing, if FEPI LUs are
left assigned for use in subsequent process execution, the service requestor
is responsible to logoff and cleanup LUs for a specific userid when the use
of that userid is no longer required. For Link3270 bridge server adapter request processing, if the delete of bridge facilities fails, those bridge facilities will remain until the expiration of bridge facility maximum keeptime, (BRIH-FACILITYKEEPTIME). For information on how to set the Link3270 bridge facility maximum keeptime, see information on MAT_MAX_FAC_ KEEPTIME in the Service Flow Modeler help in theWebSphere® Developer for System z® infocenter. |
As a normal end of day processing strategy, the service requestor could invoke a modeled flow as a process to locate, logoff and release any assigned LUs. |