com.filenet.api.engine
Interface DocumentLifecycleActionHandler


public interface DocumentLifecycleActionHandler

An interface to be implemented to handle state changes for documents assigned a lifecycle policy. A DocumentLifecycleActionHandler implementation runs on the server.

To implement this interface, create a class and implement the methods with applicable actions for state changes defined in the document's lifecycle policy. The state of a document is changed when its changeState method is called with the flag parameter set to the appropriate LifecycleChangeFlags constant.

When implementing a lifecycle action handler, consider the following points:

For restrictions and best practices on implementing action handlers, see Implementation Concepts.

See Also:
DocumentLifecyclePolicy, DocumentLifecycleAction, changeState, Working with Lifecycle-related Objects

Method Summary
 void onDocumentClearException(Document doc, DocumentLifecyclePolicy policy)
          Executes when the lifecycle exception is cleared (changeState flag parameter is set to CLEAR_EXCEPTION).
 void onDocumentDemote(Document doc, DocumentLifecyclePolicy policy)
          Executes when the lifecycle state is demoted (changeState flag parameter is set to DEMOTE).
 void onDocumentPromote(Document doc, DocumentLifecyclePolicy policy)
          Executes when the lifecycle state of a document is promoted (changeState flag parameter is set to PROMOTE).
 void onDocumentResetLifecycle(Document doc, DocumentLifecyclePolicy policy)
          Executes when the lifecycle state is reset (changeState flag parameter is set to RESET).
 void onDocumentSetException(Document doc, DocumentLifecyclePolicy policy)
          Executes when the lifecycle state is set to the exception state (changeState flag parameter is set to SET_EXCEPTION).
 

Method Detail

onDocumentPromote

void onDocumentPromote(Document doc,
                       DocumentLifecyclePolicy policy)
                       throws EngineRuntimeException
Executes when the lifecycle state of a document is promoted (changeState flag parameter is set to PROMOTE).

Parameters:
doc - A Document object that specifies the document whose lifecycle state is being changed.
policy - A DocumentLifecyclePolicy object that specifies the document's lifecycle policy.
Throws:
EngineRuntimeException

onDocumentDemote

void onDocumentDemote(Document doc,
                      DocumentLifecyclePolicy policy)
                      throws EngineRuntimeException
Executes when the lifecycle state is demoted (changeState flag parameter is set to DEMOTE).

Parameters:
doc - A Document object that specifies the document whose lifecycle state is being changed.
policy - A DocumentLifecyclePolicy object that specifies the document's lifecycle policy.
Throws:
EngineRuntimeException

onDocumentSetException

void onDocumentSetException(Document doc,
                            DocumentLifecyclePolicy policy)
                            throws EngineRuntimeException
Executes when the lifecycle state is set to the exception state (changeState flag parameter is set to SET_EXCEPTION).

Parameters:
doc - A Document object that specifies the document whose lifecycle state is being changed.
policy - A DocumentLifecyclePolicy object that specifies the document's lifecycle policy.
Throws:
EngineRuntimeException

onDocumentClearException

void onDocumentClearException(Document doc,
                              DocumentLifecyclePolicy policy)
                              throws EngineRuntimeException
Executes when the lifecycle exception is cleared (changeState flag parameter is set to CLEAR_EXCEPTION).

Parameters:
doc - A Document object that specifies the document whose lifecycle state is being changed.
policy - A DocumentLifecyclePolicy object that specifies the document's lifecycle policy.
Throws:
EngineRuntimeException

onDocumentResetLifecycle

void onDocumentResetLifecycle(Document doc,
                              DocumentLifecyclePolicy policy)
                              throws EngineRuntimeException
Executes when the lifecycle state is reset (changeState flag parameter is set to RESET).

Parameters:
doc - A Document object that specifies the document whose lifecycle state is being changed.
policy - A DocumentLifecyclePolicy object that specifies the document's lifecycle policy.
Throws:
EngineRuntimeException


© Copyright IBM Corporation 2006, 2009. All rights reserved.