Generate document
This chapter was written from the product's source code and has not yet been checked by a person on a running Cogneris. If what you see on screen differs, the screen is right — please tell your Cogneris contact so the chapter can be corrected.
Renders a PDF from one of your published document templates, filled with the data of the case, and adds it to the process's documents and to the Document Center.
| Palette | Nodes › Generate document |
| Outputs | One output. |
| Content status | From source; not observed (workflow-fe f88c5c1, workflow-be 6703373, 2026-10-22) |
When to use it
- To produce the document a customer signs or receives at the end of a case — a proposal, a contract, a declaration.
- Before Signature: the generated PDF is the document Signature sends by default.
- After Manual Review when the document must only contain confirmed data.
The Contract signature workflow template uses it: Extraction, Generate document, Signature, Send.
What happens in a run
-
The case is sent to the template service. The phase does not decide what each placeholder of the template holds. It sends the whole case, and the template's own bindings pick the values:
Part of the case What it contains Documents For each document: name, document type, template, checklist slot, whether it failed, and its extracted fields (by full dotted path and by short name). Form The form answers, by dotted key. Process The process data (for example identifier,requester.name,today).Cross-check When a Cross-check ran before: decision, the countssummary.total,summary.match,summary.mismatch,summary.inconclusive,summary.notApplicable, andchecksCount(how many checks ran — not how many failed).How a binding addresses these values, and what a binding does when a value is missing, is set on the template, not in the workflow. The phase works after a Manual Review too: it still finds the documents and fields of the phases before the review.
-
If a value that matters cannot be filled, the template service answers needs review:
- with Print even with gaps off (default), no PDF is produced; the run stops at this phase and waits for a person, with the list of missing keys and why each is missing (how such a run is resumed is decided by the service and not shown in the editor);
- with it on, the PDF is produced with the gaps.
-
The PDF is stored under File name (or the name the template service suggests), registered as a document of the run with the type
generated-document, and filed in the Document Center beside the case's other documents. If the Document Center refuses it, the run continues and the refusal is recorded.
The phase adds a generateDocument block to the run's data: status (rendered or needs_review), templateCode, the template versionNumber, a renderId, the document (name, location, content type, size, and ecmDocumentId — the Document Center id, the one an integration should keep), whether it reached the Document Center, and every missing key (key, reason, whether it was blocking).
Retries. When the template service or storage is temporarily unavailable, the phase is run again up to 3 times. A needs review answer is never retried, since it would consume the render quota again for the same answer.
Configuration
| Field | What it does | Required | Format / values | Default | Validation messages |
|---|---|---|---|---|---|
| Description | Name shown on the node. | No | Text | Generate document | — |
| Template code | The published document template this phase renders. It is the template's stable code (slug), not its display name — for example aprovacao-credito-habitacao. | Yes | Text | Empty | None in the panel; an empty code fails the run (see below). |
| File name | The name of the generated PDF. .pdf is added when missing. | No | Text | Empty — the name the template service suggests | — |
| Print even with gaps | Produce the PDF even when a value that matters cannot be filled. Keep it off for anything a person signs: a blank where a name belongs looks finished. | No | On / off | Off | — |
The template, its bindings and what counts as a value that matters are managed in the template service, not in this panel.
Common problems
| Message | Cause | What to do |
|---|---|---|
| generate_document needs a templateCode in its node configuration. (run error) | Template code is empty. | Fill it in and publish again. |
| template-be refused to render '…': … or template-be could not render '…': … (run error) | The template service refused the request — for example an unknown or unpublished template code. | Check the template code against the template service. |
The run waits at this phase with status needs_review | A value that matters could not be filled; the missing list names it. | Fix the data or the template's binding. |
ecmLanded is false, with an ecmLandingError | The Document Center refused the PDF. | The PDF is still on the run; contact support if it repeats. |
Related
- Signature — signs the generated document.
- Cross-check — its decision and counts can be printed.
- Manual Review
- Send — delivers the document.
Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation