DMS Utility Apps
DMS Utility Apps are purpose-built workflow applications designed for document management approval processes. They provide a fully provisioned, ready-to-use multi-level approval workflow that integrates with Leena AI's Document Management System (DMS). Out of the box, a DMS Utility App includes configurable approval stages, permission-controlled forms, automated notifications, and a direct status sync back to the DMS — all generated automatically from a single template.
This utility accelerates the deployment of document approval processes by eliminating the need to build approval chains, forms, and permissions from scratch.
When to Use a DMS Utility App
DMS Utility Apps are ideal when you need to:
- Establish a multi-level document approval process where documents pass through one or more approvers before being finalized.
- Enforce permission-controlled visibility so that approvers can review but not modify document details.
- Automatically notify approvers via bot messages and email when a document is pending their review.
- Sync approval status back to the DMS so that document records reflect the latest workflow outcome (approved or rejected).
- Support both dedicated approver assignments and admin-based fallback routing for maximum flexibility.
Example: An HR team needs a policy document approval workflow. When a new policy is uploaded to the DMS, the DMS Utility App routes it first to the Department Head for review, then to Legal for compliance sign-off, and finally to the CHRO for final approval. At each stage, the approver receives a notification, reviews the document in a read-only form, and either approves or rejects. The final decision is automatically synced back to the DMS.
How It Works
Overview of the Execution Flow
The DMS Utility App follows a structured, sequential approval lifecycle:
- Trigger — The workflow is initiated either manually by a user or automatically via a webhook from the DMS when a document requires approval.
- Document Submission — The initiator fills out (or the system pre-fills) the document details form, which captures metadata such as folder location, document attributes, employee ID, and the document file itself.
- Sequential Approval — The workflow moves through N configurable approval stages. At each stage:
- The designated approver receives a notification (bot and/or email).
- The approver reviews the document details in a read-only view (permissions are pre-configured to prevent editing).
- The approver either approves (advancing to the next stage) or rejects (terminating the workflow).
- Status Sync — Upon final approval or rejection, the system calls the DMS proxy to update the document's workflow task status in the Document Management System.
- End — The workflow concludes and the execution is recorded for reporting.
Workflow Structure
The DMS Utility App is provisioned from the DMS Utility Template, which dynamically generates a workflow based on the number of approval levels you specify during creation.
For a 2-level approval, the generated workflow looks like:
| Node | Type | Purpose |
|---|---|---|
| Manual Trigger | TRIGGER | System entry point for the workflow. |
| Document Submission | TRIGGER_INPUT | Collects document metadata and configuration. Linked to both the Configuration and Document Details forms. |
| 1st Approval | APPROVAL | First approval stage — assigned to the configured first-level approver or admin. |
| 2nd Approval | APPROVAL | Second approval stage — assigned to the configured second-level approver or admin. |
| End Node | END | Concludes the workflow and triggers the DMS status sync. |
Note: The number of approval nodes is dynamic. If you specify 3 levels of approval during app creation, the template generates 3 sequential approval nodes.
Creating a DMS Utility App
Step 1: Create a New Application
Navigate to Workflows Studio > App Listing and click Create App. In the creation dialog:
- Set the Utility Type to
DMS. - Provide a descriptive Name (e.g., "Policy Document Approval").
- Specify the Number of Approval Levels in the utility metadata (e.g.,
2for a two-stage approval).
The system automatically provisions the entire workflow, both forms, all approval nodes, edges, and field-level permissions.
Step 2: Review the Configuration Form
The template generates a Configuration form with the following pre-built fields:
| Field | Type | Purpose |
|---|---|---|
admins | Multiple Select (User) | Defines the system administrators who serve as fallback approvers. Uses a dynamic user lookup against the bot's audience. |
approverWithoutAdmin1 | Multiple Select (User) | The designated approver(s) for the 1st approval stage. |
approverWithoutAdmin2 | Multiple Select (User) | The designated approver(s) for the 2nd approval stage. |
| (Additional approver fields) | Multiple Select (User) | One field per approval level, dynamically generated based on the number of levels specified. |
Step 3: Review the Document Details Form
The Document Details form captures all document-related metadata:
| Field | Type | Purpose |
|---|---|---|
parentFolderId | Text | The ID of the parent folder in the DMS. |
parentFolderName | Text | The display name of the parent folder. |
rootFolder | Text | The root folder name. |
rootFolderId | Text | The root folder ID. |
attributes | Field Array | A repeatable group containing id, value, and Label — used for flexible document tagging and metadata. |
employeeId | Text | The ID of the employee associated with the document. |
expiry | Date | The document's expiration date. |
document | File Upload | The actual document file. |
createdByName | Text | Name of the document creator. |
createdByEmail | Text | Email of the document creator. |
Step 4: Customize Approval Routing (Optional)
Each approval node is pre-configured with a hybrid assignment model:
- Primary Approver — The specific user(s) assigned in the
approverWithoutAdmin{N}field. - Admin Fallback — If no specific approver is set, the approval falls back to the
adminsdefined in the Configuration form.
The rejection behavior is set to Terminate by default — meaning any rejection at any stage immediately ends the workflow.
Step 5: Publish
Review the workflow, forms, and permissions. When ready, Publish the app to activate it.
Pre-configured Permissions
One of the key advantages of the DMS Utility template is that field-level permissions are automatically configured during provisioning:
| Stage | Document Details Fields | Behavior |
|---|---|---|
| Document Submission (Trigger Input) | All fields | Editable — The initiator can fill in all document metadata. |
| Approval Stages (1st, 2nd, etc.) | All fields | Read-Only — Approvers can view the document details but cannot modify them. |
This ensures data integrity throughout the approval chain — approvers review exactly what was submitted without the risk of accidental edits.
Notifications
The DMS Utility template includes automated notifications at each approval stage using the Default Approval Notification Template:
- Bot Notification — The approver receives an in-app message through the Leena AI assistant prompting them to review and act on the pending document.
- Email Notification — An email is sent to the approver with document summary details and a direct link to the approval task.
Notifications are triggered automatically whenever the workflow transitions to a new approval stage.
DMS Status Sync
A critical integration point is the automatic status synchronization between the workflow and the Document Management System. When the workflow reaches its conclusion (either through final approval or a rejection at any stage), the system calls DmsProxy.updateWorkflowTaskStatus to push the outcome back to the DMS.
This ensures that:
- The document record in the DMS reflects the most current approval status.
- Downstream DMS processes (e.g., document publication, archival, or notification to the document owner) can be triggered based on the workflow result.
- There is no manual step required to update the DMS after the approval process completes.
Curated Builder Experience
To maintain the integrity of the pre-configured template, the DMS Utility App provides a curated builder experience:
- The Form Builder is disabled — the pre-configured forms cannot be modified through the form builder UI. This prevents accidental removal of fields that the approval logic depends on.
- Specific approval node properties remain editable — you can still customize the approval assignment rules, notification templates, and approval behavior through the node configuration panel.
- The Flow Builder allows adding additional nodes (such as Decision, Action, or Function nodes) between the existing structure for custom business logic.
- The Permissions Builder is available for fine-tuning field visibility if the defaults need adjustment.
Key Considerations
- Dynamic Approval Levels: The number of approval stages is set at creation time via the
levelOfApprovalsmetadata. To add or remove approval levels after creation, you would need to create a new DMS Utility App with the desired number of levels. - Visibility: Like other utility apps, DMS Utility Apps are classified separately and can be filtered in the App Listing dashboard using the utility app filter.
- Reject Behavior: By default, rejection at any stage terminates the entire workflow. This behavior is configured in the approval node settings and can be reviewed in the workflow builder.
- Template Publishing: DMS Utility Apps cannot be published as global templates (the
ASYNC_UTILITYrestriction applies to template publishing). They are designed to be created fresh from the utility template each time. - Auto-Documentation: The platform supports AI-assisted documentation generation for DMS Utility Apps, using a specialized strategy that covers Summary, Integrations, Forms, Workflow Steps, Success Output, and Edge Cases.
- Versioning: The standard versioning system applies — all changes are made on a draft version and published as an immutable snapshot, with full version history and the ability to restore previous versions.
Updated about 16 hours ago
