Help ELMA BPM Platform
×
Menu

Generate Document Version Activity


The Generate Document Version activity allows you to create one or several files by specified templates, and save them to the ELMA server. As a template, you can use a TXT, HTML, XML, DOC, XLS, DOCX, XLSX file or a document already stored in ELMA.
The generated versions are stored in context variables of the " File" type. They can be used in process activities and scripts.
To create a document, place the Generate Document Version activity at the point of the graphic model where you want the document to be created. Make sure that you have specified all the context variables that will be used in the template. The Generate Document Version activity is located in the "Plug-Ins" section of the graphic model side panel.
To open the settings of the Generate Document Version activity, double-click on it in the graphic model or select Settings in the element's context menu.
Common tab
Fig. 1. Settings of the Generate Document Version activity. Common tab.
Name — Activity name, displayed in the graphic model, process documentation, process policies and the header of the settings window. This name is also given to the transition button leading to this activity in Web Application, if the connector that represents this transition in the graphic model does not have its own name.
Description — Activity description, displayed in the process documentation and process policies.
Settings tab
On this tab, you have to specify one or several templates that ELMA will use to create document versions. Also, specify the variable that will store the generated version. Once the process instance reaches this activity, ELMA will create a number of files equal to the number of templates specified in the list.
Fig. 2. Settings of the Generate Document Version activity. Settings tab.
The Add button adds a new template file. You can use any file of the TXT, HTML, XML, DOC, XLS, DOCX, XLSX formats, a document already stored in ELMA, or a File type context variable.
The Edit button allows editing the document template file.
The Open button opens the template file for viewing.
The Delete button deletes the template file from the list.
The Create Variable button creates a context variable of the "File" type. This variable then stores the generated document version in ELMA.
The Up button moves the template one line up in the list.
The Down button moves the template one line down in the list.
Adding a template file
To add a template file, click Add on the Settings tab of the Generate Document Version settings window. You can add a file from an external source, from ELMA or from a File type context variable.
Fig. 3. Adding a template file.
Adding file from an external source
Fig. 4. Adding a template from an external source.
To add a template from an external source (e.g., a local PC), click Template Type and select File in the opened window (fig. 5).
Fig. 5. Selecting a template type.
In the Template File field, click Open to add a file.
The Template Name is by default the same as the name of the file in the Template File field. You can change it if you like. This name will then be displayed in the Template Name field of the Settings tab of the Generate Document Version settings window (Fig. 2). The document version created in the course of the process will also have this name.
To save changes, click OK. To go back to the Generate Document Version settings, click Cancel or simply close the window. The changes will not be saved.
Adding a template from ELMA
Fig. 5. Adding a template from ELMA.
Select Document in the Template Type field.
Manually fill in the Template Name field. This name will be displayed in the Template Name field of the Settings tab of the Generate Document Version settings window (Fig. 2). The document version created in the course of the process will also have this name.
In the Document ID field, specify the identification number of the document that you want to use as a template. ELMA will use the Current version of this document. To find the document ID, open the document page in Web Application. The ID number is specified in the browser URL bar, right after Document/View/ (Fig. 6).
Fig. 6. Document's ID in Web Application.
Adding a template via a File type context variable
To add a template via a File type context variable, click Template Type and select Context Variable in the opened dialog box (fig. 5).
The Template Name field is similar to the Template Name field of the form for adding a template from an ELMA document.
In the Context Variable field, specify a FIle type context variable that contains the document template. To add a context variable, click Add Variable. Note that this variable must be filled in in the process before the Generate Document operation.
Click ОК to save the changes.
Adding a File type context variable
A file generated by a template with specified properties must be saved to a context variable of the "File" type. You need to reference the template to the variable that will store the generated document. For this, go to the template list and select the desired variable from the drop-down list. It opens in the Variable column in the template field (Fig. 2). If such a variable does not exist in the process context, you can create it. Click Create Variable. The variable's settings window opens. The variable type is "File" by default.
If you are adding the variable on the Context tab of the process, select the "File" type in the "System" type group (Fig. 7).
Fig. 7. Creating a process context variable of the File type.
Example of using the Generate Document Version activity
As an example, let's take an "Accept Equipment for Repair" process. The service worker takes down the customer's details, information about the equipment and the failure. To complete the acceptance for repair, the technician hands the customer the acceptance form and prints the customer's request for the repair service.
Create the "Accept Equipment for Repair" process (fig. 8).
Fig. 8. "Accept Equipment for Repair" process map.
Create the "Acceptance Form" and "Repair Request" context variables of the File type. They will store the documents created in the Generate Document Version activity.
Also, add the following variables to the process:
Copyright © 2006–2019 ELMA