...
Info |
---|
The WordTemplateHandler can also be installed in the Smartform as a button to generate a template if required. More information is here. |
...
Class
Code Block |
---|
com.dooris.bpm.actionhandler.WordTemplateHandler |
Parameter
Parameter | Default value | Description | Valid examples | ||||||
---|---|---|---|---|---|---|---|---|---|
| This parameter is used to set the path to the template, so the ActionHandler can search for it in the resources folder. It can be specified absolute or relative to the external file path in the loom.properties. In order to rename the generated PDF, the name of the template itself may contain process variables. Special case: Resolving process variables in the template name Given the template, parameter has the following value:
|
| |||||||
|
| This parameter is used to decide if the documents should be overwritten if the process run by a loop. If the original template is needed, it should be |
| ||||||
| The documentPrefix can be used so that created documents always have the specified value before the template name. |
| |||||||
|
| If this parameter is set to |
| ||||||
|
| When the value is set to |
| ||||||
|
| It can be either true or false. If this value is set to true, process variables (which start with "bool") are changed like below:
|
| ||||||
|
| This parameter is used to decide if the boolean variables (true and false) should be replaced with ‘yes and no'. Setting this variable to |
| ||||||
| This parameter is used to determine the document name in the destination folder. This procedure is useful if the name of the created Word document should be different from the template name. The target parameter can contain process variables. Suppose the user wanted to generate two reports in English and German. The Word template in the resource folder has the following name
|
| |||||||
|
| With this parameter all system supported languages can be given in short form(e.g. |
Example:
We have a brief use case to explain this ActionHandler.
...
Now the ActionHandler can be set up in the process flow. For each employee, a Word document containing the employee’s name and ID should be generated after process start. To achieve this, the WordTemplateHandler is implemented on the first task in the process model.
...
Parameter | Description | Example |
---|---|---|
| Here, you provide the name of the Word template which was uploaded to the resources folder. When the process is started, the ActionHandler will find the template with this parameter and will create a new document with the information from the smartform. The document is stored in the “Documents” tab of the process instance. | ${employee_name}.docx |
Finally, a Smartform is required, which contains two input fields with the variables employee_name
and employee_id
.
...
The "onbuttonclick" attribute defines which functions the handler should execute.
Parameter | Description | Example |
---|---|---|
| Here, the ActionHandler is specified. | WordTemplateHandler |
| Here, the path to the WordTemplate is provided. | |
| Here, you can specify a prefix that should be added before the document name. | |
| If the parameter is set to | |
| Here, you can use the parameter | |
| Here, you can set the parameter to |
...
Document History
The document-history of a process instance can be reviewed via the system variable ${SYS:DOC_HISTORY}
. The document history displays which documents of the instance have been attached, edited or deleted. With the WordTemplateHandler the user can save the document history to a Word or PDF document (s. screenshot).
...