This method queries the failed event database to locate any events that meet the selection criteria.
queryFailedEvents (EventQueryDef[] queryOptions, String startDateTime, String endDateTime, int eventStatus, int maxrows)
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.
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. |
An array of failed events, FailedEventInfo, each element having the following structure:
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"); }