/ Search

Search Epistola

Find documentation, integration guides, tour steps, blog posts and pages.

DocsIntegrationsTourBlogPage
↑↓↵esc

Work in progress — The Learn section is being expanded; alpha, beta, and preview capabilities are labelled where relevant.
← Back to Learn

Use documents in a case

Let users preview, compose, review, and download documents from the tasks they already use.

reviewvaltimo

Use the document in a case

Users should work with generated documents inside the task or case screen where they already make decisions, not in a separate application. That screen is a Valtimo case task. Valtimo owns the case and its tasks, and Epistola supplies the document.

Previewing before you generate

A task can show a preview before the official document exists. That preview is a real render of the current case data through the template. The user sees how the document will look, and can still correct the input before anything is generated.

The preview carries a watermark and is not stored. It is not a generation: it creates no job and does not appear in the generation history.

The preview in the editor is a different thing. It shows a draft with example data while you build a template. The task preview works from the case; the editor preview works from the template.

Common task features

  • Show a preview before the official document is generated.
  • Let an employee choose which letter to send.
  • Let the user generate or continue the process.
  • Show the generated PDF inline.
  • Offer a download button when the user needs the file.
  • Send failed documents to a task where the user corrects the case.

Three components on the task form cover these features:

  • the preview, which shows the document of one generate step before it is generated;
  • the letter composer, which offers a list of letters, asks for what the case is missing, and shows a preview;
  • the document view, which shows the generated PDF inline, as a download button, or both.

The remaining features are process work. Generation runs as a service task. Routing a failure to a correction task is a decision in the process model.

The preview needs a generate-document step somewhere in the process. It says so plainly when that step is not configured. A preview can also sit on a start form, if you set it up for that.

What the task components show

The document viewer has two useful states: the PDF, or nothing. While generation is still running, there is nothing to show. A generation that failed leaves no document either.

The viewer treats both the same way: it reports that the document has not been generated yet. Route the outcome in the process instead of expecting the viewer to announce a failure.

For a failure, the process routes to a correction task. That task is a normal case form: it shows the reason generation failed and the case fields the user can correct. Then the process generates the document again.

Good review flow

Show the document, the case it belongs to, and the action the user can take next. Avoid exposing technical document IDs or background job state unless the user is troubleshooting.

Access control

Valtimo should decide who may see or act on the case task. Epistola generates the PDF; it does not replace case permissions.

That boundary is enforced, not assumed. The task form calls endpoints for the document and the preview. Those endpoints take no case reference of their own. They derive the case from the task the user is working on.

When the user may not see that task, the endpoints refuse the request. A preview on a start form checks instead whether the user may start the process.

In short

  • Users work with the document in the Valtimo case task, through three components on the task form: the preview, the letter composer, and the document view.
  • The viewer shows the PDF or nothing, so route a failed generation in the process, to a correction task.
  • Valtimo decides who may see or act on the task; Epistola generates the PDF.

More on this topic

Epistola is open source, not free of cost. The organisations that use it fund its development, through Epistola or an Official Partner. We are steward-owned: fair prices, no profit maximisation. How Epistola is funded →