Inflow.aiDocs

Optional technical reference. This material is for developers, integration specialists and platform administrators. For the consultant lesson, read the practical guide.

Preserved from source baseline d4587c7c0e073e58c2d430342f65ac55dd701bf4; source/static examples retain their stated scope. They are not new runtime verification or required consultant setup steps.

Add governed evidence and PDF output to the leave application

This tutorial extends the synthetic Leave requests application with a document library, task evidence and ordinary DMS conversion. It uses actual DMS/task/screen contracts but is not a built-in application, complete importable fixture or a newly executed runtime demonstration. All sample documents contain fictional information only.

Prepare the vacation workflow, the published interface and the intended ordinary users from identity/permissions. Existing storage encryption, renderer trust and deployment dependencies must already be admitted by their responsible owners. This document grants no shared-service restart, credential, provider, private/native/font-source or PR3228 proof authority.

Keep four references separate

Reference Example meaning Why it matters
Cabinet/folder ID The admitted library and actual destination A visible title is not a storage path or grant
Document ID Stable DMS identity Its current version can change
Document/version pair Evidence actually reviewed on a task An omitted content version deliberately resolves current
Conversion source/output references Actual sourceVersionNumber plus new PDF document/version Conversion takes documentId and resolves current; an old attachment pin is not a conversion-version selector

The shared business record is leave-2026-014 in people-ops. Its manager and employee IDs are business data unless selected through actual admitted identity controls. A selected document reference carries useful metadata but never grants content read or mutation rights.

Milestone 1 — Prepare the permitted library and upload limits

Scenario and inputs. Nadia has the actual cabinet/folder management rights in the owned synthetic workspace. Mohammad/Sara have only the document/task admission intended for this application. Encrypted storage and dependencies are configured by the authorized environment owner; there is no hardcoded storage key in this tutorial.

Procedure. Select or create the intended cabinet. Read GET /api/documents/upload-capabilities and retain maxFileBytes/maxFiles/maxBatchBytes. Create the evidence folder through POST /api/documents/cabinets/{cabinetId}/folders using the actual cabinet ID. A top-level folder request body is:

{
  "name": "Leave evidence",
  "parentFolderId": null
}

Record the returned folder ID and current actor/workspace, not merely the displayed “Leave evidence” title.

Expected result. The next milestone has a real admitted destination and known current upload bounds. A cabinet/folder is scoped and secured; the name does not create access or identify another workspace’s similarly named folder.

Failure and recovery. If the folder or capability read is denied/unavailable, resolve that actual prerequisite. Do not use a different actor header, copied credential, guessed folder ID or shared-service restart to force the example through.

Sources. DocumentController.java:153; DocumentController.java:171; DocumentController.java:221.

Milestone 2 — Upload a synthetic document and record its actual version

Scenario and inputs. Use a small fictional Leave approval.docx or another source type the intended later operation supports. The signed-in actor has this destination’s actual upload rights. A document display title can differ from the file’s safe original filename.

Procedure. Upload to POST /api/documents/folders/{folderId}/documents as multipart with required part file and optional name; the client supplies its multipart boundary. Inspect the actual DocumentVersionResponse, then list the document’s versions. Record documentId, versionNumber and the response’s actual version identity/name/MIME/size where supplied. If a form or task will retain evidence, use that exact document/version rather than a display title or a fabricated download URL.

Expected result. The server stored a version under the intended admitted folder and attributed it to the actual actor. The reader now has concrete inputs for selection, task evidence and later conversion; no sample returned ID has been treated as a real receipt.

Failure and recovery. An empty file, exceeded size bound or refused destination is corrected at that boundary. A lost response is not proof of failure: inspect the actual current library/version evidence before another upload could create a duplicate. Never replace a refusal with sample metadata.

Sources. DocumentController.java:321; DocumentController.java:366; DocumentController.java:964.

Milestone 3 — Embed a confined browser and bind a document reference

Scenario and inputs. Nadia has a current screen draft and can select the actual cabinet/root folder. A document-compatible evidence field exists if selection is required; a browse-only policy library does not need that field. App Shell page resolution and a task’s captured form pin are separate publication semantics.

Procedure. Add DocumentBrowser in the real designer. Resolve cabinetId/rootFolderId, choose none/single/multiple deliberately and bind a compatible field through the actual property control when collecting evidence. Keep unneeded mutation flags off. Save/validate/publish the owning screen through its current revision/impact flow. A selected value can have this shape, with IDs/version/metadata replaced by the real result:

{
  "kind": "document",
  "documentId": "actual-document-id",
  "versionNumber": 1,
  "name": "Leave approval.docx"
}

Inspect actual selection and event contracts; LiveForm currently emits onSelect with folderId:null.

Expected result. The form stores a governed reference and navigation stays beneath the configured root. A single selection is one object; multiple selection is a compatible collection. Static designer chrome is not a live DMS read.

Failure and recovery. An unresolved cabinet must not list other cabinets as fallback. A true allowUpload/allowDelete/allowShare property does not create server permission. Correct a binding/cardinality error in the authored screen rather than coercing a random string into evidence.

Sources. LiveForm.tsx:5363; DocumentBrowserControl.tsx:36; documentBinding.ts:1.

Milestone 4 — Attach evidence through the human task’s actual policy

Scenario and inputs. The running leave workflow produced an actual permitted human task. Its pinned form/attestation contract determines what evidence is allowed. Mohammad’s or Sara’s task participation does not automatically grant broad editor rights to the whole library.

Procedure. Open the task’s native attachment/upload action and inspect current constraints. The task upload route /api/tasks/{taskId}/attachments/upload accepts required multipart file and folderId, plus optional name/label. For required attestation, the service resolves the actual destination from server-owned task evidence; ordinary attachment upload still checks the supplied destination. Retain the attachment relation and exact document/version returned. Existing-document attachment likewise selects an actual permitted version.

Expected result. The task has the intended admitted evidence relation. DMS operations declaring taskId are still judged by the service’s own task-scoped proof; a declaration does not become a general folder grant. Viewing a task title does not expose every related document.

Failure and recovery. If task state, evidence requirement, file or destination is refused, address the real constraint. Do not manufacture another taskId, loosen object grants or upload through a broad raw route to bypass task policy. Read any uncertain original upload/attachment result before trying another copy.

Sources. TaskController.java:429; TaskController.java:446; DocumentController.java:317.

Milestone 5 — Convert the intended current Word source into a new PDF

Scenario and inputs. Sara can view the actual source document and upload into its folder. The ordinary conversion engine is admitted/available and the source is a supported type/size. Record the source’s current version and the reviewed task reference separately; they might differ if someone added a correction.

Procedure. Read /api/documents/conversion/status. Send POST /api/documents/{documentId}/convert/pdf without a body or invented version parameter. Inspect actual sourceDocumentId/sourceVersionNumber and pdfDocumentId/pdfVersionId/pdfVersionNumber/pdfName, plus engine/size/time metrics. Download the returned PDF under its own admitted reference and compare the source version actually reported with the business evidence you intended to convert.

Expected result. The conversion creates a new sibling PDF and preserves the Word source. The response identifies what current version was resolved during the operation. It does not certify conversion of an older attachment pin or authenticate arbitrary renderer/font quality.

Failure and recovery. Unsupported source, disabled/unavailable engine or oversized input needs its actual owner/source correction. On an unknown transport outcome reconcile whether the new PDF exists before another consequential request. Never relabel a newer source’s PDF as proof of the older reviewed version or launch a held renderer proof to qualify the result.

Sources. DocumentController.java:751; DocumentController.java:992; DefaultDocumentConversionService.java:96.

Milestone 6 — Put the conversion into the published workflow deliberately

Scenario and inputs. Nadia has the actual admitted service.dms.convert.docx-to-pdf activity and its implementation/configuration contract. The case file contains a source document ID and declares a legal result variable. Runtime requester/run-as, source read and destination upload admission remain required.

Procedure. In the owned state flow, configure the governed source using leading = syntax, for example this configuration fragment:

{
  "documentId": "=approvalDocumentId",
  "resultVariable": "pdfDocument"
}

Map the declared result through the actual output contract and publish only the reviewed lifecycle revision. The wired executor resolves and reauthorizes the resulting document ID before secured conversion. Retain the returned actual source/PDF version coordinates as business evidence where the authored application permits it.

Expected result. The workflow has an explicit conversion dependency and result binding. The worker does not gain blanket document access, and the source’s current-version behavior remains the same as the ordinary conversion service.

Failure and recovery. Do not use screen ${...} interpolation in this governed field, write an engine-reserved output name or assume parseable expressions grant resource access. A provider/engine/private-source qualification gap remains with its actual owner; this tutorial never resumes PR3228 or an equivalent private/native proof.

Sources. DmsConvertDocxToPdfServiceTaskExecutor.java:28; DmsConvertDocxToPdfServiceTaskExecutor.java:75; SecuredDocumentConversionService.java:49.

Milestone 7 — Add a correction and retain review history safely

Scenario and inputs. The fictional request has a recorded evidence reference and may later receive a corrected document version. Any deletion/restoration is intentional, confirmed and within the actor’s actual rights. It is not shared storage cleanup.

Procedure. Upload a correction through the document’s supported new-version operation. Keep the original task-reviewed document/version pair alongside the newer current version. Read original bytes through /content?version={recordedVersion} when authorized; omit the selector only when current is actually intended. If removing an accidental synthetic document, use supported soft-delete and current restore rather than touching storage files or database rows. Recheck parent constraints before restoration.

Expected result. Evidence history remains intelligible: a newer current document does not rewrite an older review or conversion result. Soft deletion/restoration retains the system’s lifecycle/audit semantics. The application can explain which exact version was reviewed and which was converted.

Failure and recovery. A missing/denied version or parent remains its actual unavailable state; do not fall back to another object/latest. Preserve old and uncertain results, private sources and retention holds. Source/static checks alone do not establish an executed upload/download/restore workflow or ordinary-user video acceptance.

Sources. DocumentController.java:373; DocumentController.java:406; DocumentController.java:514; DocumentController.java:563.

What to keep from an admitted run

Record the actual workspace/actor, cabinet/folder, source document/version, task/form/attachment context, current conversion source version and new PDF reference. Keep original failures and uncertain responses with the supported recovery outcome. Do not copy credentials, private file bytes or confidential business values into documentation evidence.

For deeper contracts, read DMS, DocumentBrowser, conversion, task persistence and worker execution. Follow operation/deployment for owner-admitted environment work. The written tutorial’s source checks are not product/runtime certification.

Try “document generation”, “integrations” or “first form”.