com.filenet.api.engine
Interface DocumentLifecycleActionHandler
-
public interface DocumentLifecycleActionHandler
An interface to be implemented to handle state changes for documents assigned a lifecycle policy. ADocumentLifecycleActionHandler
implementation 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
changeState
method is called with theflag
parameter set to the appropriateLifecycleChangeFlags
constant.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
CodeModule
object, 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 void
onDocumentClearException(Document doc, DocumentLifecyclePolicy policy)
Executes when the lifecycle exception is cleared (changeState
flag
parameter is set toCLEAR_EXCEPTION
).void
onDocumentDemote(Document doc, DocumentLifecyclePolicy policy)
Executes when the lifecycle state is demoted (changeState
flag
parameter is set toDEMOTE
).void
onDocumentPromote(Document doc, DocumentLifecyclePolicy policy)
Executes when the lifecycle state of a document is promoted (changeState
flag
parameter is set toPROMOTE
).void
onDocumentResetLifecycle(Document doc, DocumentLifecyclePolicy policy)
Executes when the lifecycle state is reset (changeState
flag
parameter is set toRESET
).void
onDocumentSetException(Document doc, DocumentLifecyclePolicy policy)
Executes when the lifecycle state is set to the exception state (changeState
flag
parameter 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 (changeState
flag
parameter 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 (changeState
flag
parameter 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 (changeState
flag
parameter 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 (changeState
flag
parameter 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 (changeState
flag
parameter is set toRESET
).- Parameters:
doc
- A document whose lifecycle state is being changed.policy
- The lifecycle policy of the document.- Throws:
EngineRuntimeException
-
-