recoverInProgressEvents()

Recovers any In-Progress events in the event store.

Syntax

public int recoverInProgress();
 

Parameters

None.

Return values

An integer that indicates the outcome status of the recovery operation. Compare this integer value with the following outcome-status constants to determine the status:

CWConnectorConstant.SUCCEED
The recovery of in-progress events succeeded.

CWConnectorConstant.FAIL
The recovery of in-progress events failed.

Exceptions

InvalidStatusChangeException
Thrown when the status is being changed to an invalid status value for the application.

StatusChangeFailedException
Thrown when the status change from IN_PROGRESS to READY_FOR_POLL fails.

AttributeNullValueException
Thrown if the InDoubtEvents connector configuration property is not defined and set.

Notes

The recoverInProgressEvents() method checks the event store for any events that currently have the IN_PROGRESS status. An event might remain in the event store with an event status of IN_PROGRESS if the connector was unexpectedly shutdown. If such events exist, the method takes one of the following actions, based on the setting of the InDoubtEvents connector configuration property:

Value of InDoubtEvents recoverInProgressEvents() action taken
Reprocess Change all events with the IN_PROGRESS status to the READY_FOR_POLL status so that they are sent to the connector framework in subsequent poll calls.
FailOnStartup Log a fatal error and return a FAIL outcome status to agentInit(), which in turn throws the InProgressEventRecoveryFailedException exception. This action also sends an automatic email, if LogAtInterchangeEnd is set to True.
LogError Log a fatal error but do not return FAIL outcome status to agentInit().
Ignore Ignore the In-Progress events.

Note:
For recoverInProgressEvents() to work as described, the InDoubtEvents connector configuration property must be defined. If InDoubtEvents is not defined, recoverInProgressEvents() throws the AttributeNullValueException exception.

The recoverInProgressEvents() methods is usually called as part of the connector initialization process, from within the agentInit() method. The agentInit() should check for the status from recoverInProgressEvents() and catch any exceptions as well. The agentInit() method should throw an exception in either of the following cases:

See also

agentInit()

Copyright IBM Corp. 1997, 2003