PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloperโ€™s Guide

Using the template

Generate documents from your process data with the Generate Document action, and map process variables onto a template's placeholders.

After creating your template, use it in a process with the Generate Document action to produce a filled-in file.

  1. Open the Process Designer and create your process.

  2. Give it a name.

  3. Drag the Generate Document action onto the canvas.

  4. Create the process variables the action needs:

    • fileout โ€” an output variable of type File, to receive the generated document.
    • htmlstring โ€” an output variable of type String, to receive the generated HTML.
    • Name โ€” an input variable of type String, which is one example of data you'll feed into the template.

  5. Click the Generate Document action to configure it:

    • Select document template โ€” pick the template you created earlier. Changing the template resets the mapping below to one empty row per template variable.
    • Save document as โ€” PDF or HTML.
    • File name โ€” the name of the generated file.
    • Document output โ€” bind the fileout variable.
    • HTML string โ€” bind the htmlstring variable.

  6. Click Map Document Data, then map each template variable to a process variable (or a literal value/expression):

    • Document Variable (left) lists the template's own variables โ€” you can't type free text here, just pick which one you're filling in.
    • Process Variable (right) accepts either a process variable or a typed value/expression โ€” this is where you supply what fills the placeholder. They don't need matching names: map the process's Name variable to the template's own Name placeholder, for example.
    • A template variable of a Data Model type expands into its own attribute rows, so you can map each field individually (the same variable.attribute addressing a pill uses in the editor).
    • A row with an empty Document Variable is flagged "Field is required" when you try to validate or run the process โ€” map it or remove the placeholder from the template.

    A list-typed Data Model variable (used by a Dynamic Table) is mapped the same way, as one binding to the whole list โ€” the table then repeats once per item at generation time.

  7. Save, Validate and Run the process.

  8. Running asks for the process's input variable values.

  9. Click Run, then Check Instance to see the run's output.

  10. Click the download button to get the generated file or the HTML output.

The PDF file output: