Business process designer > BPMN processes > Graphical elements / Generate from Template

Generate from Template

gen_template1The Generate from Template activity allows you to create documents in a business process by using templates uploaded to the system. The system automatically inserts relevant process data into the document.

As a result, you have, for example, a contract that already includes the signing date, the contractor's name, and the contract price.

начало внимание

Only users included in the Administrators group can configure the Generate from template element.

конец внимание

Set up the Generate from Template element

On the process page, go to the right pane and open the System elements tab.

gft3

Drag the Generate from Template element to the process diagram and place it in the spot where you need the system to create a document.

In our example, we need to create an equipment purchase contract right after the Fill in order task and before the Sign contract tasks.

13.PNG

Double-click on the Generate from Template shape to open its settings.

GFT1

  • Name*. Specify the name of the operation as it will be shown in the system.
  • Document template. Select a template. Please note that templates added to a workspace or an app can only be used in business processes created in the same workspace and app.
  • Generated file*. Select the file that will store the created document. Make sure that you have previously added a File variable to the process context.
  • Generated file name*. By default, the generated document file will be named after the selected template. You can specify a different name if needed. For naming the file you can also use properties of the process variables and the DateTime function. To add a variable, click {+} on the right side of the field. To use the DateTime function, click f(x). You can read more about using the DateTime function in Item name.
  • Convert to PDF. Check this box if you want the document to be converted into the PDF format.

After having filled out all the fields, click Save.

The Field values tab will appear in the settings window.

The left column shows document template variables. In the right column, you have to specify the corresponding process variables. The values of these variables will then be added to the generated document.

gft2

During the process, the document will be created only if values are assigned to all of these variables. Make sure that you have added them to the forms of the tasks that stand before the Generate from Template element in the process.

The variable that you have specified as Generated file will store the generated document. Do not forget to add it to the Sign contract task so that the user can open or download the document.

Save and publish the process.

2.PNG

When executing the process, the employee responsible for filling out the order will enter the contractor's name, the purchased equipment, the name of the contact person and the total amount to be paid.

The contract template will be automatically completed with this data. The next process task is Sign contract. Its page will feature a field with the attached contract. The employee who is completing the Sign contract task can simply click on the contract, view it, and print it out.

Found a typo? Highlight the text, press ctrl + enter and notify us