Package Events

The package events occur during the life cycle of export and import packages in Meridian Enterprise Server.

ClosedExportPackage_ChangeState Event

Occurs when the status of an export package is changed by a user.

Syntax

ExportPackage_ChangeState(Package, PreviousState, User)
Parameters
Name Description

Package

An object that represents the export package.

PreviousState

The previous state of the export package represented by one of the AS_EXPORTPACKAGE_STATUS_VALUES constants.

User

The name of the user that changed the package status.

Remarks

This event is intended for use with the Vault.SendNotification method to alert appropriate users about documents exported from a folder. Because that method requires a Document object context, pass it a document object and not the package object.

Example

Sub ExportPackage_ChangeState(Package, PreviousState, User)
  Dim doc
  'GlobalID of a document related to the package
  Set doc = Vault.GetDocument("{0F002100-998A-11E5-0000-56598CDC4B23}")
  doc.Log "The export package named " & package & " was changed from the " & _
  PreviousState & " state by " & User
  Vault.SendNotification "PACKAGEMAIL", doc
End Sub

ClosedImportPackage_AfterImportedFromPortal Event

Occurs after a document is imported from Meridian Portal.

Syntax

ImportPackage_AfterImportedFromPortal ()

ClosedImportPackage_AfterReadProperties Event

Occurs after the properties are read for a document that was imported from an import package.

Syntax

ImportPackage_AfterReadProperties (Batch, Package)
Parameters
Name Description

Batch

An object that represents the documents contained in the import package.

Package

An object that represents the import package.

ClosedImportPackage_ChangeState Event

Occurs when the status of an import package is changed by a user.

Syntax

ImportPackage_ChangeState(Package, PreviousState, User)
Parameters
Name Description

Package

An object that represents the import package.

PreviousState

The previous state of the import package represented by one of the AS_IMPORTPACKAGE_STATUS_VALUES constants.

User

The name of the user that changed the package status.

Remarks

This event is intended for use with the Vault.SendNotification method to alert appropriate users about documents imported from a package. Because that method requires a Document object context, pass it a document object and not the package object.

Example

Sub ImportPackage_ChangeState(Package, PreviousState, User)
  Dim doc
  'GlobalID of a document related to the package
  Set doc = Vault.GetDocument("{0F002100-998A-11E5-0000-56598CDC4B23}")
  doc.Log "The import package named " & package & " was changed from the " & _
  PreviousState & " state by " & User
  Vault.SendNotification "PACKAGEMAIL", doc
End Sub

2022 R2