When the distributed routing program is invoked

For inbound web service requests that are eligible for enhanced routing, CICS® invokes the distributed routing program at the following points:

On the routing region:
  1. For routing the request.
  2. If an error occurs in route selection, for example, if the target region returned by the routing program on the route selection call is unavailable. This gives the routing program the opportunity to specify an alternate target. This process iterates until the routing program selects a target that is available or sets a non-zero return code.
  3. After CICS has tried (successfully or unsuccessfully) to route the request to the target region.

    This invocation signals that (unless the routing region and the target region are one and the same) the routing region's responsibility for this transaction has been discharged. The routing program might, for example, use this invocation to release any resources that it has acquired on behalf of the transaction.

On the target region:
  1. When the transaction associated with the request starts on the target region.
  2. If the transaction ends successfully.
  3. If the transaction abends.
Figure 1 shows the points at which the distributed routing program is invoked, and the region on which each invocation occurs. Note that the "target region" is not necessarily remote; it could be the local (routing) region, if the routing program chooses to execute the request locally.
Figure 1. When and where the distributed routing program is invoked
The picture shows two rectangles, one representing the requesting region and the other the target region. Within the requesting region, four labels indicate the points at which the distributed routing program is invoked: Route selectionNotificationRoute selection errorRouting attempt completeWithin the target region, three labels indicate the points at which the distributed routing program is invoked: Transaction initiationTransaction terminationTransaction abend