This method queries the failed event database to locate any events that meet the selection criteria.
Syntax
queryFailedEvents (EventQueryDef[] queryOptions, String startDateTime, String endDateTime, int eventStatus, int maxrows)
Parameters
STATUS_ANY_UNRESOLVED
STATUS_FAILED
STATUS_DEFERRED_RECOVERY
STATUS_SERVICECALL_IN_TRANSIT
STATUS_DELIVER_POSSIBLE_DUPLICATE
STATUS_SERVICECALL_WAITING
STATUS_USER_GENERATED
The results returned is dependant on both the eventStatus and
how you specify the time. Table 81 shows the what various time parameters will return in the
results.
Table 81. Results for queryFailedEvents based on time parameters
startDateTime | endDateTime | Results |
---|---|---|
Not null | Not null | All events that meet the eventStatus that occurred between startDateTime and endDateTime |
Null | Not null | All events that meet the eventStatus that occurred before endDateTime |
Not null | Null | All events that meet the eventStatus that occurred after startDateTime |
Not null | Not null | All events that meet the eventStatus regardless of time. |
Returns
An array of failed events, FailedEventInfo, each element having the following structure:
STATUS_ANY_UNRESOLVED
STATUS_FAILED
STATUS_DEFERRED_RECOVERY
STATUS_SERVICECALL_IN_TRANSIT
STATUS_DELIVER_POSSIBLE_DUPLICATE
STATUS_SERVICECALL_WAITING
STATUS_USER_GENERATED
Examples
The following example queries for all events that match the status STATUS_USER_GENERATED.
// 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"; // define query condition array EventQueryDef[] queryOptions = new EventQueryDef[1]; queryOptions[0] = queryOption; // query failed events with status of user_generated, no time // limitation FailedEventInfo[] resultArray = queryFailedEvents(queryOptions, "", "", FailedEventInfo.STATUS_USER_GENERATED);
// get the query result for (int i = 0; i < resultArray.length; i++) { String busObjName = resultArray[i].nameBusObj; logInfo(busObjName + " failed"); }
See also