Documentation › Use an Artifact in a Process

Use an Artifact in a Process

You have an Artifact (templates and their questions) and a Process (a flow of steps). All that remains is to connect them: a step of the process will have the document generated by the person who carries it out, who first answers the artifact's questions.

⏱ 3 minutes📍 Process editor, then the process instance page✅ Prerequisites: an Artifact and a Process

The principle

The connection happens in two stages: you set up the step once, in the process; the assigned person then generates the document, for every process instance.

1

While designing

In the process step (Document, Email, Meeting, Task), you add a Generate document attachment, pick an Artifact's template and how it is used: as an attachment, or as the body of the email, meeting or task.

2

While running

The assignee clicks Generate and answers the artifact's questionnaire: their answers (and the process instance's variables) fill in the template's placeholders. They then save the task.

1. In the process: set up the Document step

  1. Open your process

    Processes tab › the Edit pencil on the process's row.

  2. Add (or open) a Document step

    Drag the Document step onto the grid, or double-click the existing one. In Properties, name it and choose the assigned people (Assigned to).

  3. Go to the Attachments tab

    Click Add attachment, then Generate document. A "Generated from a template" card appears.

  4. Choose how it is used

    If the step has a body (email, meeting, task), the Use the document as list offers An attachment or The body of the email (of the meeting, of the task). A document in a Document step is always an attachment.

  5. Choose the Artifact

    In the Artifact field, select the Artifact that will fill in the document. It is the one that asks the questions at run time.

  6. Choose one of this Artifact's templates

    The Template of the Artifact field becomes active and only offers the chosen Artifact's templates. An Artifact can have several (a Word contract, an HTML summary…): to generate several documents with the same Artifact, add one Generate document attachment per template. For a body, only .html, .htm and .txt templates are offered. The File name field defaults to the template's name: type your own to name the generated file differently (the template's extension is added if you forget it). For a body there is no file, so no name. If you change the Artifact, the chosen template is forgotten.

  7. Save and publish

    Click Save in the panel, then Publish in the top bar.

In the Process: have a step generate a document
Process editorSave draftPublish
Start
📄 Employment contractDocument
🗓 Training
Process editorSave draftPublish
Document — Documents handled by this step
PropertiesAttachmentsOutcomesReviewersSignersAppearance
Attachments+ Add attachment ▾
Drop files here, or click to upload
Process editorSave draftPublish
Document — Documents handled by this step
PropertiesAttachmentsOutcomesReviewersSignersAppearance
Attachments+ Add attachment ▾
Process editorSave draftPublish
Document — Documents handled by this step
PropertiesAttachmentsOutcomesReviewersSignersAppearance
Generated from a template
Artifact
Employment contract
Template of the Artifact
Employment contractEmployment-contract.docx
File name
Chosen with the template
CancelSave
Process editorSave draftPublish
Start
📄 Employment contract1 attachment · generated
🗓 Training
✓ Published

A step can have several attachments: repeat Add attachment to generate several documents, or to mix them with fixed files.

2. In the process instance: generate the document

Once the process is published and a process instance started, the Document step becomes a task for the assigned person.

  1. Open the task

    From the My tasks page, click the task's row (You should prepare the document). The task opens.

  2. Click Generate

    In a Document task, the Generate button is in the toolbar (a menu lists each document if there are several). In an Email, Meeting or Task task, select the document's row in the attachments, then click Generate; for a body, the Generate body button is in the toolbar.

  3. Answer the questionnaire

    A panel opens with the artifact's questions: text, number, date, choice list… Questions that depend on an answer appear once you have given it. The panel's Generate button stays greyed out until every required question (marked with a star) has an answer.

  4. Generate, then save

    The generated file gets the name shown in the attachment's File name column: you can change it before clicking, even if you have not saved the task. Click Generate: the template's {{Name}} placeholders are replaced by your answers and by the process instance's variables. The Document generated message (or Body generated: the text is then written into the body) confirms it. Click Save to keep the result in the task.

During the process instance: generate the document
My tasksActivityProcess instancesProcessesArtifacts

My tasks

3 assigned to you, sorted by due date
TaskProcess instanceDue dateStatus
YYou should prepare the documentEmployment contractMarie's onboardingTomorrowNew
YYou should hold the meetingTrainingMarie's onboardingIn 3 daysNew
← Back to process instancesMarie's onboarding
💾 Save⚙ Generate
Employment contractDocument
Assignees: Sophie Martin   Signers: HR management
← Back to process instancesMarie's onboarding
Generate Employment contract
What is the employee's full name?
Marie Dupont
Contract type
Permanent ▾
CancelGenerate
← Back to process instancesMarie's onboarding
💾 Save⚙ Generate
Attachments
⚙ Employment contractEmployment-contract.docx
✓ Document generated
Employment contract — Employment-contract.docx
EMPLOYMENT CONTRACT
Between the company ProcNest and Marie Dupont,
hired on a permanent contract starting November 3.
✓ Document generated

3. Reuse the document in another task

A document generated (or uploaded) in one task can be used in other tasks: the email that sends it, the meeting that presents it, another task that completes it.

  1. Generate and save

    In the task that produces the document, click Generate then Save. Until the task is saved, other tasks cannot see the document.

  2. Open the task that uses it

    For example the Email task. In the attachments list, click Add attachment then Use document.

  3. Choose the documents

    The Use a document window lists the documents from the process instance's other tasks, along with the name of the task that produced them. Tick the documents to use, one by one, or tick the task name to take all its documents at once (handy when a Document task holds several files), then click Use N documents and Save. Every ticked file is attached to the task.

When the email is sent with Send, its attachments (generated documents, uploaded files or reused documents) go with it.

In a meeting, attachments remain viewable in ProcNest: they are not added to the invitation sent by Office 365.

Other ways to add a document to a step

The Add attachment menu offers three options in the process:

OptionWhen to use it
Generate documentThe document depends on the process instance's variables: it is produced from a template.
Upload new attachmentThe file is the same for everyone (charter, regulations…). You can drag and drop several files.
Upload laterA file has to be provided by the assigned person (for example a signed contract). Enter the expected name in File name.

In a running process instance, the task's Add attachment menu offers Upload file and Use document (see above). For a generated document, a yellow Not generated tag marks it until it is generated, then it turns green Generated; an uploaded file carries a green Uploaded tag. A document taken from another task with Use document follows the original document: green Generated or Uploaded once it has its file, yellow Not generated otherwise. To generate, select its row then click Generate in the attachments bar.

Checklist before publishing