| What | Documents.xml |
|---|
| Required | no |
|---|
| Description |
|
|---|
| Schema location |
|
|---|
Contents
Introduction
The Document Displays in the Web OC are used to visualise reports produced by the report module, show and edit archive products and visualise sets of archive products in the Document Browser. The configuration of these documents is done in this configuration file.
Document Types
There are three document types that can be configured:
- Archive Product: one archive product.
- Archive Product Set: a set of archive products.
- Compose Product: a compose product.
Archive Product
An archive product is a file stored in the archive. It can be any file type, but it is often a .html, .pdf or .png. Analogous to TimeSeriesSet or reportModuleInstance, it can be more than one product: a collection of products/files that are related and are distinguished by their version (like a T0 for a forecast). In the archiveProduct element the product metadata can be configured. Metadata such as areaId, sourceId and configurable product attributes.
<archiveProduct id="ReportShiftEnd" name="End shift report">
<documentWorkflowId>reportWorkflow</documentWorkflowId>
<areaId>reports</areaId>
<sourceId>fews</sourceId>
<versionKey>timeZero</versionKey>
<versionKey>status</versionKey>
</archiveProduct>
Archive Product Set
Throught the ArchiveProductSet you can easily configure to include large part of your archive products. Through the constraints you configure which ArchiveProducts are part of the set.
<archiveProductSet id="his_products_allValid">
<constraints>
<areaId>products</areaId>
<sourceId>weboc</sourceId>
<allValid>
<attributeTextEquals id="component" equals="his"/>
<attributeTextEquals id="status" equals="approved"/>
</allValid>
</constraints>
</archiveProductSet>
Compose Product
A compose product is essentially a new product, that uses another product as template. One of the use-cases is that you export a report product by the report module as archive product. Subsquently you use this product as template for a new product. In this way you can make the FEWS generated reports adjustable by the end-user.
<composeProduct id="end_shift_form">
<archiveProductId>end_shift_form</archiveProductId>
<template>
<archiveProductId>template_ReportShiftEnd</archiveProductId>
</template>
</composeProduct>
Document Workflow
This is already part of the schema, but not implemented yet.
Example Configuration
<?xml version="1.0" encoding="UTF-8"?>
<documents>
<documentWorkflow id="reportWorkflow">
<status id="concept" name="Concept" default="true">
<attribute key="status" value="concept"/>
</status>
<status id="approved" name="Approved">
<attribute key="status" value="approved"/>
</status>
<transition>
<fromStatus>concept</fromStatus>
<toStatus>approved</toStatus>
<editPermission>operator</editPermission>
</transition>
<transition>
<fromStatus>approved</fromStatus>
<toStatus>concept</toStatus>
<editPermission>operator</editPermission>
</transition>
</documentWorkflow>
<archiveProduct id="end_shift_form" name="Shift End Form">
<documentWorkflowId>defaultWorkflow</documentWorkflowId>
<areaId>products</areaId>
<sourceId>demo</sourceId>
<versionKey>productId</versionKey>
<versionKey>status</versionKey>
<attribute key="author" value="Deltares"/>
<attribute key="productId" value="end_shift_form"/>
</archiveProduct>
<composeProduct>
<archiveProductId>management_summary</archiveProductId>
<template>
<archiveProductId>template_management_summary</archiveProductId>
</template>
</composeProduct>
<archiveProductSet id="weboc_products">
<constraints>
<areaId>products</areaId>
<sourceId>weboc</sourceId>
</constraints>
</archiveProductSet>
</documents>