Skip to main content

Generate document

Not yet checked on the product

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.

PaletteNodes › Generate document
OutputsOne output.
Content statusFrom 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​

  1. 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 caseWhat it contains
    DocumentsFor each document: name, document type, template, checklist slot, whether it failed, and its extracted fields (by full dotted path and by short name).
    FormThe form answers, by dotted key.
    ProcessThe process data (for example identifier, requester.name, today).
    Cross-checkWhen a Cross-check ran before: decision, the counts summary.total, summary.match, summary.mismatch, summary.inconclusive, summary.notApplicable, and checksCount (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.

  2. 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.
  3. 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​

FieldWhat it doesRequiredFormat / valuesDefaultValidation messages
DescriptionName shown on the node.NoTextGenerate document—
Template codeThe published document template this phase renders. It is the template's stable code (slug), not its display name — for example aprovacao-credito-habitacao.YesTextEmptyNone in the panel; an empty code fails the run (see below).
File nameThe name of the generated PDF. .pdf is added when missing.NoTextEmpty — the name the template service suggests—
Print even with gapsProduce 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.NoOn / offOff—

The template, its bindings and what counts as a value that matters are managed in the template service, not in this panel.

Common problems​

MessageCauseWhat 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_reviewA 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 ecmLandingErrorThe Document Center refused the PDF.The PDF is still on the run; contact support if it repeats.

Last reviewed 2026-10-22 · Version 1.0.0 · Owner: product-documentation