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.
|
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.
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.
|
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:
-
Request serial number - "Integer" type; it is generated automatically in the "Form system data on the request" script;
-
Request acceptance date - "Date/Time" type, it is generated automatically in the "Form system data on the request" script;
-
Equipment name, Equipment serial number, Failure, Equipment's appearance are all of the "String" type; these properties are filled in by the person responsible;
-
Customer - "Individual" type, it is filled in or selected by the person responsible;
-
Service worker - "User" type, it is selected from the list of system users by the person responsible;
-
Expected cost of repair - "Money" type, it is filled in by the person responsible;
-
Initiator - "User" type, it is filled in automatically in the Initiator dynamic swimlane with the data of the user who initiated the process.
|
Fig. 9. Context variables of the "Accept Equipment for Repair" process.
|
In the first task, the process initiator fills in the details of the customer and the accepted equipment (Fig.10). In the second task the script adds the request serial number and the time when the request was made. This means that by the time the document has to be generated, all the required properties are specified.
|
Fig. 10. "Fill in the details of the request" task form in Web Application.
|
According to the process, the Generate Document Version button triggers the Generate Document Version activity. This activity creates the required documents by the templates which are specified in the activity settings (Fig. 11). The created files are stored in the "Acceptance Form" and "Request for Repair" variables.
|
Fig. 11. "Generate Document Version" activity settings.
|
Then the process initiator consequently receives the following tasks: "Give the acceptance form to the customer" (Fig. 12) and "Give the request to the service worker" (Fig. 13). At these points the initiator can print the documents which were saved in the "Acceptance Form" and "Request for Repair" variables in the Generate Document Version activity.
|
Fig. 12. "Give the acceptance form to the customer" task form in Web Application.
|
|
Fig. 13. "Give the request to the service worker" task form in Web Application.
|
Below you will find examples of templates, generated files and the Form (context) tab settings of the "Fill in the details of the request", "Give the acceptance form to the customer" and "Give the request to the service worker" tasks.
|
Fig. 14. "Acceptance Form" template.
|
|
Fig. 15. "Request for Repair" template.
|
|
Fig. 16. "Acceptance Form" generated document version.
|
|
Fig. 17. "Request for Repair" generated document version.
|
|
Fig. 18. "Fill in the details of the request" task form settings.
|
|
Fig. 19. "Give the acceptance form to the customer" task form settings.
|
|
Fig. 20. "Give the request to the service worker" task form settings.
|
Copyright © 2006–2019 ELMA