/ Search

Search Epistola

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

DocsIntegrationsTourBlogPage
↑↓↵esc

Download & Review

Download generated documents and show them to users in the case task.

Download and review

When the document is generated, download the PDF, so the case can continue.

Add the download step

  1. Place a service task with the Download Document action after the success route of the wait.
  2. Under Document Variable, fill in the result variable of the generate step, for example epistolaResult.
  3. Under Storage Target, choose where the PDF goes:
    • Temporary resource storage (recommended). The action writes a resource ID to the Resource ID Variable. Hand that ID to the Documenten API action store-temp-document to file the PDF in the case.
    • Process variable (inline bytes). The action writes the PDF itself to the Content Variable. Use this only for small documents without sensitive data.
  4. Route the case to review, storage, or sending.

A temporary resource does not stay forever. File the document in the case while the temporary resource still exists. Epistola does not file it in the case for you.

Show the document to users

Add the Epistola Document component to the task form. Under Display, choose:

  • Inline preview: the PDF in a panel;
  • Download button: only a download button;
  • Both: the panel, with a download icon.

The component reads the document from the result variable, by default epistolaResult. It reads that variable from the user’s task, so a user cannot ask for another document.

Good practice

Keep the task focused on the user’s next action: review, approve, send, store, or retry.

While no document exists, the component says that the document has not been generated yet. It shows this for a job that still runs and for a job that failed. So route a failed job in the process, and do not rely on the component to show the failure.

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 →