IBM BPM, V8.0.1, All platforms > Troubleshooting and support > Tools for troubleshooting your applications > Work with failed events
Manage failed WebSphere MQ events
A WebSphere MQ event might fail if there is a problem such as a data-handling exception in the WebSphere MQ binding export or import used by an SCA module. When problems processing a WebSphere MQ request or response message create a failed WebSphere MQ event in the Recovery subsystem, decide how to manage that event. Use the information in this topic to help you identify and fix the error and clear the event from the Recovery subsystem.
You can use the recovery binding property to enable or disable recovery for each WebSphere MQ binding at authoring time. You can set the recoveryMode property to one of the following settings:
bindingManaged Allow binding to manage recovery for failed messages unmanaged Rely on transport-specific recovery for failed messages Recovery for WebSphere MQ bindings is enabled by default. When it is enabled, WebSphere MQ failed events are created in the following situations:
- The function selector fails
- The fault selector fails
- The fault selector returns the RuntimeException fault type
- The fault handler fails
- The data binding or data handler fails after another attempt in WebSphere MQ
In addition, a failed SCA event is created when the ServiceRuntimeException exception is thrown in a WebSphere MQ binding target component after another attempt in WebSphere MQ.
These failures might occur during inbound or outbound communication. During outbound communication, MQImport sends a request message and receives the response message. A failed event is generated if the WebSphere MQ import binding detects a problem while it is processing the service response. During inbound communication, the following sequence of events occurs:
A failed event is generated if the WebSphere MQ export binding detects a problem while it is processing the service request.
- MQExport receives the request message.
- MQExport starts the SCA component.
- The SCA component returns a response to MQExport.
- MQExport sends a response message.
The Recovery service captures the WebSphere MQ message and stores it in the failed event database. It also captures and stores the module name, component name, operation name, failure time, exception detail, and WebSphere MQ properties of the failed event. You can use the failed event manager to manage failed WebSphere MQ events, or you can use a custom program.
To disable recovery, set the recoveryMode property to unmanaged.
If the recoveryMode property is missing for earlier versions of applications, the recovery capability is regarded as enabled. When recovery is disabled, a failed message is rolled back to its original destination and tried again. The system does not create a failed event.
To manage a failed WebSphere MQ event...
Procedure
- Use the failed event manager to locate information about the failed event, taking note of the exception type.
- Locate the exception type in Table 1 to determine the location and possible causes of the error, as well as suggested actions for managing the failed event.
Failed WebSphere MQ events Exception type Location of error Possible cause of error Suggested action FaultServiceException Fault handler or fault selector There is malformed data in the WebSphere MQ message.
- Inspect the message and locate the malformed data.
- Repair the client that originated the message so it creates correctly formed data.
- Resend the message.
- Delete the failed event.
There was an unexpected error in the fault handler or fault selector.
- Debug the custom fault selector or fault handler, fixing any errors identified.
- Resubmit the failed event.
ServiceRuntimeException Fault handler The fault selector and runtime exception handler are configured to interpret the WebSphere MQ message as a runtime exception. This is an expected exception. Look at the exception text to determine the exact cause, and then take appropriate action. DataBindingException or DataHandlerException Data binding or data handler There is malformed data in the WebSphere MQ message.
- Inspect the message and locate the malformed data.
- Repair the client that originated the message so it creates correctly formed data.
- Resend the message.
- Delete the failed event.
There was an unexpected error in the data binding or data handler.
- Debug the custom data binding or data handler, fixing any errors identified.
- Resend the message.
- Delete the failed event.
SelectorException Function selector There is malformed data in the WebSphere MQ message.
- Inspect the message and locate the malformed data.
- Repair the client that originated the message so it creates correctly formed data.
- Resend the message.
- Delete the failed event.
There was an unexpected error in the function selector.
- Debug the custom function selector, fixing any errors identified.
- Resend the message.
- Delete the failed event.