public interface LifecyclePolicyAction
Modifier and Type | Method and Description |
---|---|
LifecyclePolicyActionOutcome |
execute(LifecyclePolicyEntry lpe,
Document doc)
Execute the action for the specified document.
|
LifecyclePolicySearchCondition |
getSearchCondition(LifecyclePolicyEntry lpe)
Gets the search condition to be used to select documents eligible for
processing.
|
void |
initialize(LifecyclePolicyActionSpecification lpas)
Initialize this instance.
|
LifecyclePolicyActionOutcome |
notify(LifecyclePolicyEntry lpe,
Document doc)
Notify action that the specified document has advanced to the lifecycle
state as indicated by the specified LifecyclePolicyEntry.
|
void initialize(LifecyclePolicyActionSpecification lpas) throws IfsException
Called immediately after construction (via the default constructor) and used so that the implementation can initialize session-independent state. Subsequent calls on this interface will often be called with a different session context than is specified in this method.
This instance may be used concurrently by multiple threads. Therefore if any state is sensitive to this, the implementer must properly synchronize.
lpas
- the LifecyclePolicyActionSpecification that
references this actionIfsException
- if the operation failsLifecyclePolicySearchCondition getSearchCondition(LifecyclePolicyEntry lpe) throws IfsException
Implementation can return null, in which case the standard default
search condition will be used, namely:
where lifecycledate < ? and lifecyclepolicyentryid = ?
and lifecyclepolicy = ?
, where the date specified takes into
account the time period of the LifecyclePolicyEntry.
lpe
- the entry that references the
LifecyclePolicyActionSpecification that indicates
this implementation of LifecyclePolicyActionIfsException
- if the operation failsLifecyclePolicyActionOutcome execute(LifecyclePolicyEntry lpe, Document doc) throws IfsException
The caller establishes a transaction context for the execution of this action. If the LifecyclePolicyActionOutcome indicates that the execution was successful, the transaction will be committed by the caller. Additionally, the LifecyclePolicyActionOutcome may indicate the nature of the updates performed on the document to indicate the new lifecycle state (if any) for the document. The standard behavior is to perform the following updates:
This implementation can decide not to execute the action based on custom logic, and indicates this by returning an appropriately constructed LifecyclePolicyActionOutcome. The caller will then abort the current transaction context. Similarly, if an exception is thrown, the caller will also abort the transaction, and log the exception information.
lpe
- the entry that references the
LifecyclePolicyActionSpecification that indicates
this implementation of LifecyclePolicyActiondoc
- the Document to processIfsException
- if the operation failsLifecyclePolicyActionOutcome notify(LifecyclePolicyEntry lpe, Document doc) throws IfsException
The caller indicates that the specified document will be updated to reflect the new state, as declared by the specified LifecyclePolicyEntry. The caller creates a transaction context before calling this method, and will perform the document lifecycle state update in this transaction.
The only way this implementation can affect the operation is by throwing an exception.
lpe
- the entry that references the
LifecyclePolicyActionSpecification that indicates
this implementation of LifecyclePolicyActiondoc
- the Document that is being updated to the state
indicated by the specified LifecyclePolicyEntryIfsException
- if the operation failsCopyright © 2023. All rights reserved.