From the Configuration Wizard follow the next steps:
1. Upload the .txt template.
To upload a template click on the Plus icon.
In the new window click the Browse button, select the template for upload and click Open. Make sure the template is not opened elsewhere in order to successfully upload it.
If desired, change the template name. Click Next.
A new window will display a preview of the template along with the list of tags found in the template. Click Finish.
2. Define the document name.
This field contains the name of the actual document that is generated in the Work Portal.
If the property Replace existing documents is turned off, and the end user click on Generate several times multiple documents of the same template will be generated. These will be named with the Document name followed by a sequential number.
For example if Invoice is the Document name, when creating a second document of the same template it will be named Invoice1 as shown below.
3. Map the information from the Process data model.
This option allows relating the Template Tags with the data model of the Process.
Click the Add Mapping button to open the mapping wizard
A new window will display.
In this window you will find the attributes of the Process Data model on the left and the Template Tags on the right.
To do so, click on an element of the Data Model and then click on the corresponding Tag. You can also drag and drop the relation. This procedure must be repeated for each tag.
When needed, Runtime entities information is available to be mapped, from the Case attribute, just above the Process entity.
Take into account that mapped information will keep the format of the template.
For the Invoice template this would be the complete mapping.
Note that in the Tags table a group of Products was created containing the values of the Products collection.
•You can include filtered collections, today's date and some case information to your mappings. Please refer to Advanced functions in mapping
•When mapping collections (including Runtime entities) remember to map the collection node as well as the attributes within the collection
•When mapping parameter entities, expand their attribute nodes and map the Display Attribute.
•When Bizagi generates a Document Template, and receives a date that has a null vale, it will not be shown in the final output
•When mapping the root node of the document temple, the following warning appears
4. Define the export format.
Select the format in which the generated document will be exported.
Available formats are:
•PDF: Exports the document in PDF format to make sure the aspect and structure of the original document is not modified.
•Same as template: Exports the document in the same format of the Template. This will generate a txt file (unless you change the extension as explained below)
•PDF/A-1a: Exports the document in PDF/A -1a format to make sure that document content can be searched and reproduced.
•PDF/A-1b: Exports the document in PDF/A -1b format to make sure reliable reproduction of the visual appearance of the document.
5. Finally, select the language for the tags in the template.
Generating a plain text Document
Once configured you are ready to generate documents.
Go to the Work Portal and open the Activity where the document is generated.
Include the necessary information in the fields of the form. When finished click the Generate Document button.
If you generated automatically make sure the expression has been executed.
Once generated, click on the document link to open it.
This is how the document looks. Note how the information entered in the Form is included.
If you would had chosen PDF as export format, the document would look as follow:
If the Document template has unmapped tables, the output will display the “Foreach” tags that have been left empty.
The Template must be mapped in Bizagi Studio.
Example: [Foreach:Customer] [Name] [Phone] [End]