com.filenet.api.engine
Interface DocumentLifecycleActionHandler
-
public interface DocumentLifecycleActionHandlerAn interface to be implemented to handle state changes for documents assigned a lifecycle policy. ADocumentLifecycleActionHandlerimplementation runs on the server.Implement the methods of this interface with applicable actions for state changes defined in the document's lifecycle policy. The state of a document is changed when its
changeStatemethod is called with theflagparameter set to the appropriateLifecycleChangeFlagsconstant.When implementing a lifecycle action handler, consider the following points:
- A lifecycle action handler runs synchronously.
- An exception thrown by the handler will return to the client and the transaction will be rolled back.
- You cannot update the source object passed to a lifecycle action handler. It is not supported.
- You can implement a lifecycle action handler as a Java or JavaScript component.
You can check in a Java lifecycle action handler as a
CodeModuleobject, or you can specify the action handler in the classpath of the application server where the Content Engine is running.
-
-
Method Summary
Methods Modifier and Type Method and Description voidonDocumentClearException(Document doc, DocumentLifecyclePolicy policy)Executes when the lifecycle exception is cleared (changeStateflagparameter is set toCLEAR_EXCEPTION).voidonDocumentDemote(Document doc, DocumentLifecyclePolicy policy)Executes when the lifecycle state is demoted (changeStateflagparameter is set toDEMOTE).voidonDocumentPromote(Document doc, DocumentLifecyclePolicy policy)Executes when the lifecycle state of a document is promoted (changeStateflagparameter is set toPROMOTE).voidonDocumentResetLifecycle(Document doc, DocumentLifecyclePolicy policy)Executes when the lifecycle state is reset (changeStateflagparameter is set toRESET).voidonDocumentSetException(Document doc, DocumentLifecyclePolicy policy)Executes when the lifecycle state is set to the exception state (changeStateflagparameter is set toSET_EXCEPTION).
-
-
-
Method Detail
-
onDocumentPromote
void onDocumentPromote(Document doc, DocumentLifecyclePolicy policy) throws EngineRuntimeException
Executes when the lifecycle state of a document is promoted (changeStateflagparameter is set toPROMOTE).- Parameters:
doc- A document whose lifecycle state is being changed.policy- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
onDocumentDemote
void onDocumentDemote(Document doc, DocumentLifecyclePolicy policy) throws EngineRuntimeException
Executes when the lifecycle state is demoted (changeStateflagparameter is set toDEMOTE).- Parameters:
doc- A document whose lifecycle state is being changed.policy- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
onDocumentSetException
void onDocumentSetException(Document doc, DocumentLifecyclePolicy policy) throws EngineRuntimeException
Executes when the lifecycle state is set to the exception state (changeStateflagparameter is set toSET_EXCEPTION).- Parameters:
doc- A document whose lifecycle state is being changed.policy- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
onDocumentClearException
void onDocumentClearException(Document doc, DocumentLifecyclePolicy policy) throws EngineRuntimeException
Executes when the lifecycle exception is cleared (changeStateflagparameter is set toCLEAR_EXCEPTION).- Parameters:
doc- A document whose lifecycle state is being changed.policy- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
onDocumentResetLifecycle
void onDocumentResetLifecycle(Document doc, DocumentLifecyclePolicy policy) throws EngineRuntimeException
Executes when the lifecycle state is reset (changeStateflagparameter is set toRESET).- Parameters:
doc- A document whose lifecycle state is being changed.policy- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
-