Confirmation Pages for Revoke Document

The following use case is supported by this configuration:

  • Documents move through a Review and Approval workflow.

  • In the last workflow state ‘Distribution’ the approved document is distributed.

  • If a user revokes the document in the ‘Distribution’ state, a confirmation is asked.

Configuration

You can download the configuration which implements this use case here. This configuration does not depend on any external components. It can be imported into an empty Vault and will be fully functional.

Helper Functions

Configurable Workflow Setting

In the Review and Approval Workflow Definition, a property assignment is configured on the Approve transition which sets the customer property Approved to True. This property is used to control asking for the confirmation.

Prepare for processing a document (repeated for each document)

Functionality implemented:

  1. Set dialog title.

  2. Check if the document is approved.

  3. If so, set up a confirmation.

Copy
Sub DocWorkflowEvent_PreBeforeRevokeWF(Batch)
    If Document.Approved Then
        Batch.ConfirmationTitle = "Revoke Document - " & Document.FileName
        Batch.AskConfirmation "CONF_RevokeWF", "This document has been approved. Are you sure you want to revoke it?", AS_CDV_NO, AS_COMMENT_NONE 
    End If
End Sub

Processing a document (repeated for each document)

Functionality implemented:

  1. Check if the document is approved.

  2. If so, check confirmation response and fail the document if the user did not confirm to revoke.

  3. Log an aborted revoke in the document log.

Copy
Sub DocWorkflowEvent_BeforeRevokeWF(Batch)
    If Document.Approved Then
        If GetConfirmation (Batch, "CONF_RevokeWF", AS_CDV_NO) <> AS_CDV_YES Then
            Batch.FailCurrent "Not revoked - document is approved"
        End If
    End If
End Sub