Handling SOAP/JMS Message Timeouts on a Request-Response Operation

If you are using a service task to invoke a request-response operation over SOAP/JMS, you can configure JMS message timeouts to prevent the service task from hanging if the called web service does not respond in a timely fashion. These timeouts can also prevent duplicate messages from being submitted if the receiver was not able to receive and process the initial message(s) - for example, when communication to a mainframe system is intermittent.

You can configure SOAP/JMS message timeout behavior by using the following properties of the service task's endpoint:

  • Request-Response Timeout (default 6 seconds): defines the time period after which a web service call will time out if a response message has not been received from the web service. If this occurs, a Timeout exception error is thrown by the web service task.
  • Request Expiration Timeout (default 3 seconds): defines the time period within which the called web service must pull the request message from the JMS message queue. If this timeout expires, the JMS server will be instructed to purge the request message from the JMS message queue. (This ensures that if the web service call is retried, the JMS message queue does not contain duplicate copies of the same request message for the web service to consume.) The web service call itself does not timeout when this timer expires, so no Timeout exception error is thrown.
Note: If you migrate a pre-4.0 version of a process to this version, default values are not automatically set for these properties. You must set them manually.

Procedure

  1. In Project Explorer, select the Participant used by the web service task to invoke the SOAP/JMS web service operation.
  2. On the General tab of the Properties view, in the Message Configuration section:
    1. Set the Request-Response Timeout to an appropriate value (in seconds) for the web service that you are calling.
      You can delete this property or set it to 0, so that the web service call will wait indefinitely until the response message is received from the called web service. This is not recommended, because if the called web service is slow to respond or does not respond at all, the process instance will be stuck. A validation warning is displayed if you do this.
    2. Set the Request Expiration Timeout to an appropriate value (in seconds) for the web service that you are calling. This value must be less than the value of the Request-Response Timeout.
  3. Optionally:
    1. Add a catch intermediate error event to the boundary of the web service task and configure it to catch the Timeout exception error thrown if the Request-Response Timeout expires.
    2. Add appropriate error handling to your process flow to deal with the timeout error.
    If you do not use a catch intermediate error event, the web service task will fail with TimeoutException error. The Process Instance will halt or fail based on process implementation. Using the Force special action on halted process instance(s) from Openspace Process Views, you can progress halted processes. However, you cannot progress process instances that are in a failed state. For more information about progressing halted process instances, see "Progressing Halted Processes" in TIBCO ActiveMatrix® BPM Openspace User's Guide.