Digitaal Archief Vlaanderen
Configuration
Before documents can be archived to DAV the steps below should be done.
Filling in the DAV Profile
To use DAV for archiving in the framework we first need to fill in the provided DAV profile. The username, password, client ID and client secret are required to fill in to make a connection to DAV.

More information about the required fields can be found in template documentation of the interface.
(Optional) Filling in the SharePoint Building Blocks Profile
Make sure the SharePoint Building Blocks profile is filled in when archiving the documents from SharePoint to DAV. This is not needed when archiving DMS documents from a MinIO / S3 storage.
Ensuring the Page to Configure the Archive Settings
Before we can configure the archive settings we ensure the page with ADM's to configure those settings. The page can be ensured using the 'Ensure Modern Page' building block. The page can also be configured manually. This page is usually ensured on a dashboard where only the archivist has access to. You can also setup a custom HTML page or application and integrate those views and ADM's in a page as you like.

The following views should be configured on the page:
- Lifecycle Dropdown: Object DCS.Archive.ArchiveMapping, view Lifecycle Filter
- Mappings: Object DCS.Archive.ArchiveMapping, view All DAV Archive Mappings
- Default Lifecycle - DAV Dossier Property Links: Object DCS.Archive.LifecyclePropertyLink, view Default DAV Lifecycle Property Links
- Default Document Metadata Links: Object DCS.Archive.MetadataLink, view Default Metadata Links
Configuring Archive Settings
Mappings
To configure the archive mappings for DAV we should use the Mappings overview.
An archive mapping is set on a lifecycle, list and DAV series. Take the following configuration as an example:
- Lifecycle: Project
- DAV Series: Stukken betreffende het kassabeheer door een dienst
- Filter: Rubriek: 0.4 Inkomsten & Document Type: Verslag
- List: empty
This means all documents from of the cases of the lifecycle Project will be archived to a DAV dossier of the series Stukken betreffende het kassabeheer door een dienst. The filter is set set to the field Rubriek '0.4 Inkomsten' & Document type 'Verslag', more info on the field value filters in the next section. The method Get Documents of object Document ADM - CAD will be executed on profile CASE ODBC to retrieve the metadata for this archive mapping.
If a list was filled in, only documents if this list will be archived.

Field Value Filters
By default all documents of the document libraries are archived. If we want to archive documents with specific metadata, the field values on an archive mapping can be configured. Those can be configured via the filter icon in an archive mapping row.
Take the following configuration as an example:
- Field: Document Type
- Values: Verslag
- Field: Rubriek
- Values: 04. Inkomsten

Depending on the source system the filters are applied different:
- On a SharePoint source you don't need to implement anything. If you have mutiple values for a field, the item must contain one of the values.
- On MinIO / S3 storage you need to implement the filters yourself on the metadata method setting you configured on the archive mapping in the first step. The field is the name of the input field it will be send to.
Lifecycle - Dossier Property Links
For each archive mapping of a DAV series, a dossier will be created for the case. To create a dossier with the needed information the dossier fields and lifecycle fields should be linked. Those links can be set using the link icon of an archive mapping or by setting the default values. When opening the view the required fields to create a dossier are shown in red or with a warning sign.
Those links can be set on an archive mapping or default for a lifecycle. If the lifecycle property link is set default for a lifecycle it is applied to all archive mappings which have no link. The default lifecycle property links can be overwritten or removed, they are shown in gray. Fields from extensions of the series of the archive mapping are shown
The default lifecycle properties can be set with the Default Lifecycle - DAV Dossier Property Links overview. A lifecycle must be set using the dropdown on the page.
Warning
If one of the required field is not linked the dossier cannot be created and the documents will not be archived. Make sure the case properties for the required fields are always set.

As you can see in the screenshot above, not all required fields are linked with a lifecycle property. The field Opening Date is required and needs to be linked in this overview or for every archive mapping.
Document Metadata Links
Document metadata can be set on a document in DAV. To send the metadata of the source document of SharePoint, we must set the links between the source and destination fields. The metadata links can be set on every archive mapping or as a default for all archive mappings. Click on the document icon to open the metadata links for the archive mapping.
The default metadata links can be overwritten or removed, they are shown in gray. The destination archive name must match the JSON object external name, consult the DAV interface configuration documentation for more information. The source archive name is the output field name of the metadata field returned in the metadata method setting configured on the archive mapping or the title / internal name when using SharePoint.
The default document metadata links can be set with the Default Document Metadata Links overview.

Configuring the Archive Trigger
The last step to set up the archiving of documents to DAV is configuring the trigger of the archive method. Use the following methods in the object Ometa.DAV.Document:
Those methods can be used in case management or as an item function on a view for example. Make sure the method is added as a 'DCS method' when using this method in case management.
- Archive DMS Documents To DAV: use this method to archive DMS documents from a local MinIO / S3 storage to DAV.
Fill in the following fields:
Case.Id: the ID of the case to archive. This will be automatically filled when using the method in case management.
Path To Archive: The path of the documents to archive. This is optional, if left empty, all documents of the case are archived. If a path is given, for example: 'Folder A/InnerFolder', only folders in this path are archived.
Re-archive For Existing Dossier: use the existing dossier in DAV to archive the documents to, by default a new dossier in DAV will be created for the case. This option can be used to archive documents again in DAV eventhough they were succeeded before. This can be used when documents are deleted in DAV in for example.
Archive SharePoint Documents To DAV: use this method to archive from SharePoint to DAV.
Fill in the following fields:
- Case ID: the ID of the case to archive. This will be automatically filled when using the method in case management.
- Re-archive Documents: whether all documents need to be archived again. This will ignore the succeeded documents from the archive logs. This option can be used when the documents were removed from DAV and we want to re-archive the documents again.
- Re-archive For Existing Dossier: use the existing dossier in DAV to archive the documents to, by default a new dossier in DAV will be created for the case. This option can be used when errors occurred on a case and you don't want to create a new dossier for the new documents in DAV. For example when a social file has been archived 5 years ago and it was opened again recently. When archiving the case of the social file again a new dossier in DAV will be created by default. We could enable this option to use the existing dossier in DAV.
- Url: the url of the SharePoint site containing the documents. If left empty the url from the case is used.
- Folder: the name of the folder containing the documents to archive. If left empty all documents from the document library will be archived.
In the screenshot below we have placed the method as an action on an archive state (transition).

(Optional) Add Status Fields to the SharePoint Library
If we want to have an archive indicator on the documents in SharePoint as metadata we can be add extra fields on the library. This step is optional as the archiving can also be consulted via the archive logs or DAV, if those fields don't exist the document metadata will not be updated.
The text fields with the following internal names can be added on the library using the 'Ensure Text Field' building block:
- DAVDocumentID: the ID of the document in DAV.
- DAVDossierID: the ID of the dossier in DAV.
- DAVStatus: the status of the dossier in DAV, 'Success' / 'Error: {message}'.