Document Type Workflow Events

The events in the DocWorkflowEvent category allow you to customize the actions performed by the workflows configured for document types.

ClosedDocument Type Workflow Event Sequences

The events that occur for the document type workflow commands are shown in the following lists in the sequence that they occur.

ClosedChange To-Do Person event sequence

  • DocGenericEvent_PrepareCommand

  • DocWorkflowEvent_InitializeChangeWFPerson

  • DocWorkflowEvent_BeforeChangeWFPerson

  • DocWorkflowEvent_AfterChangeWFPerson

  • DocWorkflowEvent_TerminateChangeWFPerson

ClosedChange Workflow Manager event sequence

  • DocGenericEvent_PrepareCommand

  • DocWorkflowEvent_InitializeChangeWFManager

  • DocWorkflowEvent_BeforeChangeWFManager

  • DocWorkflowEvent_AfterChangeWFManager

  • DocWorkflowEvent_TerminateChangeWFManager

ClosedExecute transition event sequence

  • DocGenericEvent_PrepareCommand

  • DocWorkflowEvent_InitializeChangeWFState

  • DocWorkflowEvent_BeforeChangeWFState

  • DocWorkflowEvent_AfterChangeWFState

  • DocWorkflowEvent_TerminateChangeWFState

ClosedRevoke event sequence

  • DocGenericEvent_PrepareCommand

  • DocWorkflowEvent_PreInitializeRevokeWF

  • DocWorkflowEvent_InitializeRevokeWF

  • DocWorkflowEvent_PreBeforeRevokeWF

  • DocWorkflowEvent_BeforeRevokeWF

  • DocWorkflowEvent_AfterRevokeWF

  • DocWorkflowEvent_TerminateRevokeWF

ClosedDocWorkflowEvent_*ChangeWFManager Events

Occurs when the manager of a document type workflow is manually changed to a different user.

Syntax

DocWorkflowEvent_*ChangeWFManager(Batch, Person)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

Person

An object that represents the user that is selected as the new workflow manager.

ClosedDocWorkflowEvent_*ChangeWFPerson Events

Occurs when the to-do person of a document type workflow is manually changed to a different user.

Syntax

DocWorkflowEvent_*ChangeWFPerson(Batch, Person, Comment)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

Person

An object that represents the user that is selected as the new workflow manager.

Comment

A string that contains the comment entered by the user that is assigning the to-do person.

ClosedDocWorkflowEvent_*ChangeWFState Events

Occurs when a document type workflow is routed to a different state.

Syntax

DocWorkflowEvent_*ChangeWFState(Batch, TargetState, Person, Comment)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

SourceState

A long integer that represents one or more AS_WF_STATE constants. Passed only to the Before and After events.

TargetState

A long integer that represents one or more AS_WF_STATE constants.

Person

An object that represents the user to whom the documents are being assigned.

Comment

A string containing the comment entered by the user.

ClosedDocWorkflowEvent_*RevokeWF Events

Occurs when a document type workflow is revoked by a user.

Syntax

DocWorkflowEvent_*RevokeWF (Batch)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

Remarks

The PreBeforeRevokeWF event is used to add a confirmation page before the revoke a document workflow action, and the PreInitializeRevokeWF event is used to add a confirmation page before initializing the action.

Learn how to create confirmation pages. You can also see examples of this functionality in this Knowledgebase article.

ClosedAfterReplaceReleased Event

Occurs for a document after a document that replaced it has been released from a workflow.The released document must have been made by the Replace Document command.

Syntax

AfterReplaceReleased (Batch, ReplacingDoc)
Parameters
Name Description

Batch

An object that represents the batch of documents the user has selected.

ReplacingDoc

An object that represents the document that is being released.

Remarks

This event occurs after all other events for the document. It can be used to perform such actions as:

  • Sending email notification of the release of the replacement

  • Flagging the replaced document for archiving

  • Removing the replaced document from the Data Library repository

  • Setting a custom status property value on the replaced document

  • Moving the replaced document to another location

2021 R2