resubmitFailedEvent()

This method resubmits a failed event to a collaboration for processing.

Syntax

resubmitFailedEvent (String ownerName, String connectorName, int index, 
     int option, int flowTraceLevel)

Parameters

ownerName
OwnerName is the name of the collaboration to which you are submitting the failed event.
connectorName
ConnectorName is the name of the connector to which you are submitting the failed event.
index
Index is the index of the failed event.
option
Option specifies how to resubmit the failed event. Option can have one of the following values:
FailedEventInfo.RESUBMIT_ORIGINAL_BUSOBJ
The method is to resubmit the original business object that failed.
FailedEventInfo.RESUBMIT_NEW_BUSOBJ
The method is to request a new business object from the connector and submits the new business object for processing.
flowtracelevel
flowtracelevel is an integer that indicates the trace level for the resubmitted failed flow.

Examples

The following example resubmits business objects with event status STATUS_SERVICECALL_IN_TRANSIT for reprocessing.

// 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 STATUS_SERVICECALL_IN_TRANSIT, 
// no time limitation 
FailedEventInfo[]resultArray = queryFailedEvents(queryOptions, 
     "", "", FailedEventInfo.STATUS_SERVICECALL_IN_TRANSIT);
int newStatus = FailedEventInfo.RESUBMIT_ORIGINAL_BUSOBJ;
int myFlowTraceLevel = 3;
// get the query result
for (int i = 0; i < resultArray.length; i++) {
 String busObjName = resultArray[i].nameBusObj;
 String nameConnector = resultArray[i].nameConnector;
 int wipIndex = resultArray[i].wipIndex;

// Resubmit the failed events with status STATUS_SERVICECALL_IN_TRANSIT
// from queue.
 resubmitFailedEvent (busObjName, nameConnector, wipIndex, newStatus,
 myFlowTraceLevel);
 }

See also

Copyright IBM Corp. 2004, 2005