RepeatingWordTemplateHandler
Description
The ActionHandler RepeatingWordTemplateHandler makes it possible to create a Word document for several process variables. It is an extension of the https://tim-doc.atlassian.net/wiki/spaces/eng/pages/227675520. The process variables must be indexed using a number in square brackets (i.e. Variable[0], Variable[1], Variable[3]…). Then, each ${Variable}
entry is replaced by one of the indexed variables. A new template is created for each index. It is also possible to merge all the created documents.
Class
com.dooris.bpm.actionhandler.RepeatingWordTemplateHandler
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. |
|
|
| This parameter should be set to |
|
|
| This parameter is used to set the name for the merged documents. |
|
|
| This parameter is used to decide if the documents should be merged. All documents will be merged into one if this parameter is set to true. |
|
|
| Name of a variable containing a number, which denotes how many indices are present. |
|
|
| It can be either |
|
Example:
In the following, the use of the ActionHandler is briefly explained.
First, the ActionHandler is set up in the "Task1" in the process model.
The following parameters were used in this example:
Parameter | Description | Valid examples |
---|---|---|
| Name of the word template that will be uploaded to the resources folder is set here. |
|
| Here, |
|
| This parameter is used to set the index number and you need to enter this in advance. Also, we will create counter variable on the form, so the user can enter the number. |
|
|
|
|
|
|
|
|
|
|
Secondly, a Word template is required (detailed explanation on how to create the template is provided in the WordTemplateHandler) . In the template document the variable department
is used and for each department entered in the Form a Word document should be generated. This template should be uploaded to the resources folder in the administration.
As a third step, a form is needed. It contains three input fields with the indexed variables department[0]
, department[1]
, and the variable counter
.
When starting the process, the fields must be filled in the Form.
After a successful execution you can see that three documents are visible in the "Documents" tab of the operation. The first document contains the department with the first index number ([0]). The second document contains the department with the second index number ([1]). The merged version of these two documents is also available.
You can see the content of the first two documents here. The third document is simply the merged version of the first two documents.
For marketing department | For finance department: |
---|---|
|
© TIM Solutions GmbH | AGB | Datenschutz | Impressum