MoveDocument
This event triggers when a Verifier or Web Verifier user places a document in the exception batch and the document moves out of the batch.
The ScriptModule provides the following event information.
- Old Batch ID
- New Batch ID
- Reason
- Document state
For the event to trigger, the condition must be set within the program settings that a new exception batch is created when a user places a document to exception.
The event triggers for each document placed into the exception batch within a single batch.
After placing a document into the exception batch, the event triggers in the following ways.
- Batch verification is completed and all other documents are verified or placed in the exception batch.
- The user returns to the batch list after placing the document into the exception batch.
Syntax
ScriptModule_MoveDocument(pWorkdoc as SCBCdrPROJLib.SCBCdrWorkdoc, ByVal OldBatchID as String, ByVal NewBatchID as String, ByVal Reason as SCBCdrPROJLib.CDRMoveDocumentReason)
Parameter | Description |
---|---|
pWorkdoc | The workdoc object used. No changes happen to the workdoc within this event. |
OldBatchID | The batch ID of the document prior to moving a document to exception. |
NewBatchID | The new batch ID where the document moved. |
Reason |
The reason the event triggers. Possible value
|
DocState | The workflow state of the document. |
Sample Code
The following sample code logs a general message for each document placed into exception, showing the old batch ID and the new batch ID.
Private Sub ScriptModule_MoveDocument(pWorkdoc as SCBCdrPROJLib.SCBCdrWorkdoc, ByVal OldBatchID as String, ByVal NewBatchID as String, ByVal Reason as SCBCdrPROJLib.CDRMoveDocumentReason)
If Reason = CDRMoveDocumentToExceptionBatch Then
Project.LogScriptMessageEx CDRTypeInfo, CDRSeveritySystemMonitoring, " Document [" & pWorkdoc.Filename & "] has been moved from Verifier batch [" & OldBatchID & "] to exception batch [" & NewBatchID & "]"
Project.LogScriptMessageEx CDRTypeInfo, CDRSeveritySystemMonitoring, " Current document state is [" & CStr(pWorkdoc.CurrentBatchState) & "]"
End If
End Sub