Question & Answer
Question
How do I use the dropFailedEvent() method to delete failed events?
Answer
WebSphere InterChange Server provides an application programming interface (API) that you can use to manage failed events. The existing documentation for the dropFailedEvent() method has some errors in the Example section. The correct example for using the method to delete failed events is as follows:
Example
The following example obtains a vector of failed events and then drops them from the queue.
// Set up to query the failed events of a specific type for the collaboration.
EventQueryDef queryOption = new EventQueryDef();
// set query condition of busobj name
queryOption.nameBusObj = "TestBO";
// set query condition of connector name
queryOption.nameConnector = "SourceConnector";
// set query condition of collaboration name
queryOption.nameCollaboration = "CollaborationName";
// define query condition array
EventQueryDef[] queryOptions = new EventQueryDef[1];
queryOptions[0] = queryOption;
// query failed events with status of
// STATUS_FAILED, no time limitation
FailedEventInfo[]resultArray = queryFailedEvents(queryOptions, "", "", FailedEventInfo.STATUS_FAILED);
// get the query result
for (int i = 0; i < resultArray.length; i++) {
String ownerName = resultArray[i].nameOwner;
String nameConnector = resultArray[i].nameConnector;
int wipIndex = resultArray[i].wipIndex;
// Drop the failed events with status FAILED from the queue.
dropFailedEvent (ownerName, nameConnector, wipIndex);
}
Related Information
Was this topic helpful?
Document Information
More support for:
WebSphere InterChange Server
Software version:
4.3.0.6, 4.3.0.5, 4.3.0.4, 4.3.0.3, 4.3.0.2, 4.3.0.1, 4.3
Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows
Document number:
402565
Modified date:
15 June 2018
UID
swg21424408