auto_stories Bilgi Bankası chevron_right Form chevron_right Makale

DMS — Document Management (Document Library and DMS File Element)v5

DMS (Document Management) manages the documents of your Xpoda applications as numbered, versioned and approved documents. Procedures, instructions, contracts and similar documents belong to a document type; the type sets the number, the approval workflow, the read (distribution) workflow, the review period and who can do what. Documents are listed in the Document Library component, and the file element of any form can be marked as a DMS document. Approval, read and review tasks run on Xpoda workflows.

The article follows the setup order: (1) server settings, (2) document type, (3) record form and DMS file element, (4) library form, (5–7) approval, distribution and review modules, (8) menus and permissions, (9) using DMS in the Client, (10) actions, (11) generating documents from templates, (12) content search and AI summary, (13) organization seal, (14) personal e-signature, (15) troubleshooting.

Parts

PartWhereWhat it does
Document TypesStudio, organization-wideNumber pattern, approval/distribution/review modules, review period, watermark, storage, template and permissions
Document Library componentStudio, formLists documents with a folder tree; view, download, edit, send for approval, versions and audit trail
DMS file element (Add file + DMS document settings)Studio, record formTurns the file on a record into a numbered, versioned DMS document when the record is saved; writes the number, state and review date back to the form
Approval module + Publish Document / Return for Revision nodesStudio, workflowGets the version sent for approval approved and published, or returns it for revision
Distribution module (read task)Studio, workflowAssigns read tasks on every publish; closed with a "Read" button
Review module + Mark Document Reviewed / Revise Document nodesStudio, workflowStarts when the review date is near; marks the document as current or opens a new draft
Actions: Change Document State, Read Data From DocumentStudio, button/eventChanges the state of the selected document; reads data from an Excel/Word document into form fields
Document Editor (DMS mode)ClientEdits Word and Excel documents in the browser; saving creates an interim revision
Important - Documents are always viewed as a PDF generated on the server. Unpublished versions are watermarked when viewed and downloaded (default: UNAPPROVED / ONAYSIZ). - Who can do what is set on the document type; the form's Authority settings also apply to the component. - The component and the DMS file element are designed for flexible forms.

1. Preparation: server settings

The DMS tables (XPODA_DOCUMENT_*) are created automatically on first use. You also need:

  • Service, scheduler: Review workflows are started by the Service's assistant scheduler. AppSettings:RunAssistantJobs must be 1 on one Service instance only.
  • Service, Client folder: AppSettings:ClientPath must point to the Client folder. Document types stored on the file system and document templates are kept in the Client's Uploads folder.
  • PDF generation: Service and Client must be built with a licensed DevExpress; otherwise the PDFs show an "evaluation" stamp.
  • E-mail: For approval and read task e-mails, SMTP must be configured and Client admin panel → General Settings → Client Address must be filled (links in e-mails are built from it).
  • File access (optional): FileAccess:Mode on the Client sets the permission check of the file endpoints: Audit (default, logs only), Enforce (rejects unauthorized requests), Off.

2. Document type

Document types are organization-wide and can be used in all modules. In Studio, add a Document Library component to a form, select it and click Document Library → Document Types in the Properties panel. New type creates a type; Save type saves it.

Document Types dialog: the Procedure type

FieldDescription
NameName of the type (e.g. Procedure, Contract).
Number patternDocument number pattern. A counter is required: {seq} or {seq:000}. Date parts: {yyyy}, {yy}, {MM}, {dd}. Example: PRS-{yy}-{seq:000} → PRS-26-001.
Watermark textWatermark of unpublished versions. If empty, UNAPPROVED / ONAYSIZ is printed in the user's language.
StorageDatabase or File system (Client Uploads folder).
Approval moduleThe module that holds the approval workflow. With "none" the document is published directly, without approval (requires the Publish right).
Review period (months)Review period after publishing, in months. 0 = no review.
Distribution moduleModule of the read (distribution) workflow that starts on every publish.
Review moduleModule of the review workflow. Without it, the document owner uses the "Mark reviewed" button in the library.
Start review workflow (days)The review workflow starts this many days before the review date (default 30).
LifecycleDraft and Published always exist. Optional: Review, Obsolete, Archived.
OptionsAllow download, Allow print, Active.
TemplateOptional .docx template. Placeholders like $PFieldName$ are filled with the record's field values when a document is generated ("Generate from template").

Permissions

Permissions table of a document type

  • Who: Everyone (all logged-in users), User (a single user) or SQL (a query whose first column returns UserIDs; works like a role).
  • View view, Upload new documents, Edit edit, Publish publish without approval and change state, Delete delete.
  • With no rows the library is open: everyone can view and upload. With rows, only the listed people get the ticked rights.
  • Admins can do everything; the owner can always edit their own document.
  • Drafts are visible only to users who can edit. Approvers see the document through their approval task, readers see the published version.

3. Record form and DMS file element

The metadata of each document is kept in a record of a form. A sample "Procedures" form has these fields:

FieldTypePurpose
TitleText boxDocument title (the file name is used when empty)
DepartmentDrop DownFolder; the library's folder tree is built from this value
Document NoText boxWritten by DMS (read-only)
StateText boxWritten by DMS, e.g. "Published · v1.1 Draft" (read-only)
Review dateDateWritten by DMS (read-only). Set the default value to 31.12.1899 so that it stays empty.
DocumentAdd fileDMS file element

Select the file element and click DMS document → DMS document settings in the Properties panel.

DMS document settings dialog

  • Tick This file element is a DMS document and choose the Document type.
  • Field mapping: Title, Folder and Owner (user id or user name) are read from these fields when the document is created. If Owner is empty, the user who saves the record becomes the owner.
  • DMS updates Number, State and Review date on every lifecycle change (approval, publishing, revision, review). Make these fields read-only on the form.
  • Generate from the type's template: instead of uploading a file, the document is generated from the type's template with the record's data.

Turn on Do not refresh after save on the form so that the document number and state appear right after saving.

What happens on save? When the form is saved, the files on the record become DMS documents: they get a number and a first version in Draft state. Supported formats: PDF; Word (doc, docx, rtf, txt, odt, htm, html); Excel (xlsx, xlsm, xls, csv); images (png, jpg, jpeg, gif, bmp, tif, tiff). Unsupported formats (e.g. zip, gz) stay as plain files and the user is told so. If the user has no Upload right on the type, the files also stay plain and a warning is shown.

4. Document Library form

Create a form for the library and add the Document Library component. When the component is selected, the Properties panel shows:

Properties panel of the Document Library component

  • Metadata form: the record form that holds the documents' metadata (section 3). Required.
  • Folder column / Title column: fields that provide the folder tree and the title (e.g. Department, Title).
  • Data query (optional): filters the records to list; must return UserTableID.
  • Height / Width: on a flexible form the component fills its cell; give the cell enough room, e.g. 24 columns × 15 rows.

The Library, Types & View button opens the component settings:

Document Library settings dialog

  • Library → Mode: Library (records of the metadata form) or Documents of the current record (documents of the record on this form; used on approval, distribution and review forms). Show folder tree and Allow new documents (the "New document" button) are set here.
  • Document types: types used in this component. None selected = all active types.
  • View: title, height and list columns (Number, Title, Type, State, Version, Owner, Updated, Review date).

To show different types such as procedures and contracts on separate tabs, put a library component on each tab and bind it to its own record form.

5. Approval module

The approval workflow is built in a separate module and chosen in the type's Approval module field. On "Send for approval", DMS creates a record on that module's workflow form and starts its workflow.

Approval form

Approval form: document fields and a Document Library in record mode

  • Create columns with these names; DMS fills them when they exist: DocumentID, VersionID, DocumentNo, DocumentTitle, VersionNo, DocumentType. Optional: OwnerID, ReviewDate, LinkRecordID, Folder (e.g. to choose the approver in a Find User query).
  • Add a Document Library in Documents of the current record mode; the approver sees the version sent for approval as a watermarked PDF.
  • Optional E-Signature field: the signature drawn by the approver is printed on the approval record page.
  • Approve button: first a Save action, then Update Flow (Complete); turn on "Do not refresh after save" on the form so the signature is saved before the workflow moves on. Reject button: Update Flow (Reject).

Approval workflow

Approval workflow: approval step, Publish Document and Return for Revision

  • When the approval step (Send to Approval or Task Form) is approved, the Publish Document node publishes the version: it becomes Published, the previous published version becomes Superseded, the review date is calculated, the signatures are recorded and the distribution workflow starts.
  • When rejected, the Return for Revision node sets the version to Revision; the author corrects it and sends it again.

6. Distribution (read) module

The distribution module assigns read tasks every time a document is published. Add a Document Library in record mode and a Read button (Update Flow → Complete) to the module's form. Workflow: Start → Find User (SQL returning the UserID list of readers) → Task Form → End. Recipients, e-mail and reminders are set in the workflow. Choose the module in the type's Distribution module field.

The reader opens the task from the bell icon, sees the published document and confirms it. In the library, the Read status tab shows who has read it and the My reading tasks filter shows the user's pending reads.

7. Review module

The review module is started by the Service scheduler "Start review workflow" days before the review date (one open workflow per document). Put a Document Library in record mode and two decision buttons on its form. After the Task Form in the workflow:

  • Mark Document Reviewed: the document stays current; the review date moves forward by the review period.
  • Revise Document: a new draft is opened from the published version and goes through the normal approval path.

Without a review module, the document owner uses the Mark reviewed button in the library.

8. Menus and permissions

  • Add the library form to the menus of DMS users (Client admin panel → Users → Menu operations).
  • Adding the record form to the menu is optional: New document (needs the Upload right) and Open record (needs the Edit right) in the library open the form according to the user's rights. Users with view-only rights cannot open the record.
  • Approval, read and review tasks are opened from the bell icon; you can also add the task forms to the menus of the users involved.

9. Using DMS in the Client

Document Library

Document Library and document details in the Client

  • Folder tree, search and the My reading tasks filter; state labels show the published and the working version together (e.g. Published + Draft, 1.0 → 1.1).
  • Selecting a document opens its details: Open record, View, Download, Signed PDF, Check out, Send to review, Send for approval, Make obsolete, Revise (shown according to rights and state).
  • Tabs: Versions (version, state, file, author, approver, note), Read status, Audit trail (created, viewed, downloaded, edited, approved, published…).

New document and the record form

Record form and the Managed documents (DMS) panel

  • New document opens the record form. Fill in the fields and choose the file; until the form is saved, "Not saved yet · uploads when you save the form" is shown under the file.
  • After saving, the document number, state and review date are written to the form; the Managed documents (DMS) panel under the file element shows the document with View, Edit and Download.

Editing a document

Document Editor (DMS mode)

  • Edit opens the Word or Excel document in the Document Editor in an Xpoda window and checks it out to you; nobody else can edit it meanwhile.
  • Save stores an interim revision; the version number does not change. Closing the window releases the check-out.
  • If the document is published, you are asked first and a new revision (draft version) is opened; the published version stays published until the new one is approved.

Version history panel

The History panel lists the versions and the interim revisions of each version: View opens the version's PDF, Open opens a revision read-only; select two Word revisions and Compare Selected to see the changes tracked. All viewing, editing and comparing opens in a closable Xpoda window.

Approval and publishing

  • Send for approval starts the approval workflow; the approver opens the task from the bell icon, sees the watermarked document, signs and approves it.
  • Unpublished versions are watermarked:

Unpublished version with the UNAPPROVED watermark

  • Every page of a published document gets a footer with the document number, revision and publish date, and an APPROVAL RECORD page is added at the end (author, approver, publisher, dates, signature and the SHA-256 fingerprint of the file). Signed PDF downloads this version.

APPROVAL RECORD page of a published document

Version numbers

The first publication is 1.0. Revising a published document opens a new draft version: a minor change gives 1.1, a major change 2.0. When the new version is published, the previous one becomes Superseded.

10. Actions

ActionSettingsWhat it does
Change Document StateDocument library (target component), Target stateMoves the document selected in the library to the target state: Send for approval, Send to review, Back to draft, Publish (types without an approval workflow), Make obsolete, Archive.
Read Data From DocumentMapping: each row Source|Type|Field — 0: a cell in the document (Sheet1!B3, B3), a defined name or a Word bookmark; 1: fixed value; 2: SQLReads values from the Excel/Word file chosen by the user and writes them to the form fields.
Generate Document From Template (101)No settings; uses the form's DMS file element that has a templateGenerates the record's document from the template, or regenerates it (a published document gets a new draft version). Warns on an unsaved record. In a workflow the Generate Document step does the same; an error does not stop the workflow.

11. Generating documents from templates

A Word (.docx) or Excel (.xlsx) template is uploaded to the document type; when the record is saved, or from a button or workflow step, the document is generated from the template with the record's data and starts as a DMS draft.

  • Uploading templates: Studio › Document Types › type › Upload template. After upload the placeholders found in the file are listed. A type can have several templates; one is the default, and uploading a file with the same name replaces it.
  • On the form: in the DMS file element's DMS document settings pick the type and tick Generate from the type's template. The template can be fixed (Template file) or chosen by a field value (Choose the template by field). With Update the document every time the record is saved, a draft/revision document is refreshed on every save.
  • Placeholders: $PColumn$; formatted $PAmount:N2$, $PAmount:C$, $PDate:dd MMMM yyyy$; the text of a drop-down $PCustomerID:text$; yes/no $PActive:Yes/No$; grid rows $PD.Column$ and $PD.RowNo$ (the table row / Excel row that holds them repeats for every grid row); $PActiveUserName$, $PToday$. The type's Template data query adds extra data ($PName.Column$). Word headers and footers are filled too.
  • Excel: a cell that holds only one placeholder and no format gets a real number/date; give the format to the cell in Excel. Total formulas cover the added rows.
  • An unknown placeholder stays as it is and a warning is written to the document history.

12. Content search, OCR and AI summary

Every version is indexed in the background: the text of Word, Excel and PDF files is extracted; scanned PDFs and images go through OCR (Tesseract, or the vision model of the type's AI model). Results are filtered by DMS permissions: a document the user cannot see is never listed.

  • Search content: with Search content ticked next to the library's search box, the search also looks inside the document text; the matching sentence is shown highlighted. Turkish letter and suffix differences are matched.
  • AI summary and “Ask this document”: pick an AI model for the type in Studio › Document Types (models from Studio › Xpoda AI; the model's privacy level applies). A short summary is generated and stored for every version and shown in the detail panel; users can ask questions about the document. Each question is written to the document history.

Content search result with the matching sentence highlighted

Document detail: AI summary, Signed PDF and E-sign buttons

13. Organization seal

The Signed PDF of the published version gets a PAdES signature with the organization's e-seal certificate and shows as a valid signature in Adobe Reader. The whole file, including the approval record page, is signed; the Service verifies the signature before sending the file.

  1. Studio › Document Types › Organization seal: upload the organization's PFX/P12 certificate and its password. On save the certificate is opened, its private key and validity are checked and a blank PDF is signed as a test. The certificate and password are stored encrypted and never shown again. Timestamp server, location and reason are optional.
  2. Tick Seal the signed PDF with the organization certificate on the document type.
  3. In the Client the button becomes Signed PDF (e-seal); every download is written to the document history with the seal owner.

Organization seal window

14. Personal e-signature (mobile signature, smart card, cloud signature)

Users sign the published version with their own qualified e-signature. The signature licence and the operator or provider account belong to the organization; Xpoda provides the connection and the details are entered in Studio. Each signature is added to the file and earlier signatures stay valid; the Signed PDF = the file frozen at the first signature (content + approval record) + the personal signatures + (if enabled) the organization seal.

Setup: add the provider in Studio › Document Types › E-signature and tick Allow personal e-signature (mobile signature / smart card) on the document type. Provider settings and passwords are stored encrypted.

Document Types: seal, e-signature and template options

TypeWhat is neededHow the user signs
Operator mobile signature (MSSP)From the organization's contract with the mobile operator: service address, AP_ID, password, MSSP ID; if needed signature profile, response format, timeout. Send test request reads the certificate of a phone (nothing is signed).Enters the mobile number and approves the request on the phone with the PIN. The first time, one more approval reads the certificate.
Smart card via local signing toolArkSigner (built in): ArkSigner and the card driver on the user's computer; the ArkSigner API key in Client › General Settings (the same as e-signature login). For another signing tool, enter the address of its adapter script.Picks the certificate on the card and enters the PIN.
Cloud signature (CSC API)The common standard of EU qualified trust service providers (Cloud Signature Consortium API 1.0 / 2.x). The provider's API address, OAuth client id and secret; sign-in mode (user or organization account). Register /DocLib/CscReturn as the redirect address at the provider. Test connection checks the connection.Signs in at the provider in a pop-up window, picks the certificate and approves the signature with PIN/SMS code or on the provider's page.

E-signature window: cloud signature (CSC) provider

E-signature window: operator mobile signature

In the Client: the published version shows an E-sign button (when the type allows it, at least one provider is active and the user has not signed that version yet). The user picks the provider in the window; the last provider and number/certificate are remembered. The E-signatures tab shows who signed, with which certificate and provider, and when; every signature is written to the document history.

E-sign window: smart card

E-sign window: mobile signature

E-signatures tab

Technical note: only the document digest leaves the server; the private key stays on the card, the phone or at the provider. RSA and ECDSA certificates are supported; with a timestamp server an RFC 3161 timestamp is added to the signature.

15. Troubleshooting

SymptomCause / fix
"Bind a metadata form to this document library in Studio (Properties › Metadata form)."Set the component's Properties → Metadata form.
The file was saved but did not become a DMS document, with a warning that the user may not upload documents to this type or folderGive the user the Upload right on the document type.
"DMS cannot open these formats, so they were saved as plain files."The file format is not supported (see section 3).
Document No / State stay empty on the formMap Number and State in DMS document settings; turn on "Do not refresh after save" on the form.
No "Open record" button, or the record does not openThe Edit right on the document type is required.
The review workflow does not startThe type needs a Review module and a Review period; one Service must have RunAssistantJobs=1.
The approval link in the e-mail does not openClient admin panel → General Settings → Client Address.
"evaluation" stamp in the PDFService/Client must be built with a licensed DevExpress.
The library overflows the fields below itMake the component's cell larger on the flexible form (e.g. 15 rows).
“Unknown placeholder” warning or an empty valueCompare the placeholder with the field name on the form; add :text for the text of a drop-down.
Content search does not find a scanned documentOCR needs Tesseract on the server or an AI model with a vision model on the type; indexing runs in the background and can take a few minutes.
“This document type requires the organization seal but no valid seal certificate is configured”Upload a valid PFX in Studio › Document Types › Organization seal, or untick the seal option on the type.
The E-sign button is missingThe type must allow personal e-signature, the version must be published and at least one provider active; the button is hidden for a user who already signed that version.
“The local signing tool could not be reached” / ArkSigner licence messageArkSigner must be running and the card inserted on the user's computer; enter the ArkSigner API key in Client › General Settings.
The provider window does not open for cloud signatureAllow pop-ups for the site in the browser; /DocLib/CscReturn must be registered at the provider as the redirect address.
“The signature request was declined on the phone” / “Signature provider error”The operator/provider code in the message points to the settings or the user's account; check the connection with the test button in Studio.