<< Click to Display Table of Contents >> Use Aspose Template |
When you publish to Word, you can use an Aspose based template. You can create a new template or modify the default AsposeTemplateSyntax.dot template located at [Installation_Path]\DocTemplates. Aspose lets you personalize almost every aspect of your document by applying your desired theme to your Aspose tags.
Modify this template only if you have basic coding knowledge and are familiar with Aspose or tag based programing language. As a good practice we recommend creating a copy of the template before modifying it.
To create a new Aspose template simply create a new word template using all the Aspose tags available in Bizagi Modeler. Then save it in the templates folder located at [Installation_Path]\DocTemplates with .dot format. We recommend reviewing the default Aspose template located on this folder to better know how to use Aspose tags to create a new template.
When documenting your Bizagi Modeler project, you can divide all its attributes into the following sections: model, resources, and texts.
1.Model: General properties of your project. It contains all the diagrams of the model.
oDiagrams: contain the different processes used in your model. Internally they contain the following information.
▪Processes: contain the different elements in the process, all the information of your workflow, including its performers, accountable, consulted, and informed.
•Tasks, Gateways and Events: These contain all the information on the specific steps of your workflow. Including its performers, accountable, consulted, and informed.
oExtended Attributes: These contain the information of the extended attributes of diagrams, processes and elements.
2.Resources: Assets available for your processes.
3.Texts: Static texts or labels that you use in different languages. These are useful when exporting since their translations are already available in Bizagi Modeler for several languages. The available texts are displayed at Texts.
An Aspose variable represents each of these sections in your template. To access their properties, you can use the following format <<[AsposeVariable.property]>>. For example, if you want to get the name of your current diagram, use <<[Page.Name]>>.
Bizagi element |
Aspose Tag |
---|---|
Model |
No tag is necessary to access these properties. For example, if you want to get the publish date property of the model, use this tag <<[PublishDate]>>. |
Diagram |
Pages |
Process |
Elements |
Task, gateways or events |
PageElements |
Extended Attributes |
Properties |
Resources |
ResourcePage |
Texts |
texts or labels. You must insert this tag <<var [texts = Texts]>> at the beginning of the template to use this variable. |
Usually the tags such as <<Pages>>, <<Elements>> and <<PageElements>> contain several records. To go through each element, use the foreach tag. Its expected format is <<foreach [in AsposeVariable]>>. From this point onward, write the template format for each element of the array. Once you've finished writing the information you want to show for each element, you must close the foreach tag with the tag <</foreach>>. Additionally, inside this foreach tag, properties of the array can be identified without providing the array name as <<[Properties]>>.
For example, if you want to show the name and description of each of your diagrams, use the following Aspose template:
<<foreach [in Pages]>>
<<[Name]>>
<<[DiagramDescription]>>
<</foreach>>
Some elements may contain several records but are not identified by a specific name. In this case, you should use the following format for the foreach tag <<foreach [item in AsposeVariable]>>.
For example, if you want to show the name of all the performers, use the following Aspose template:
<<foreach [item in Performers]>>
<<[item.Name]>>
<</foreach>>
For some business cases, it may be important to show some information if some condition applies. In this scenario, Aspose provides the if tag which follows the following format <<if [Condition]>>. From this point onward, write the template format for the elements you want to display when the condition is met. Once you've finished writing the information you want to show, you must close the if tag with the tag <</if>>.
For example, if you want to show the text performers and the list of performers only when at least one performer exists, use the following Aspose template:
<<if [Performers!= null]>>
<<[texts.Performers]>>
<<foreach [item in Performers]>>
<<[item.Name]>>
<</foreach>>
<</if>>
If you want to show a text in capital letter you can add the string :upper at the end of the tag.
For example, if you want to put the name of an element in capital letters, use the following template:
<<[Name]:upper>>
Some image property tags (e.g. Image for diagrams or ImageObject for elements) return the location of the image file. To insert the image you need to use the special tag <<image[ImageObject]>>. This tag will show the image with the dimensions it has in Bizagi. To fit the image to the available space in your template use the following tag <<image[ImageObject] -fitSizeLim>>.
Some elements of your processes need special tags to be displayed correctly on your document. Keep in mind that the format of these elements is the same as the one given inside Bizagi Modeler.
Tag |
Text on your document |
---|---|
<<doc [DescriptionDocument]>> |
This tag is required to display a complex and customized description. |
<<doc [PropertiesDocument]>> |
This tag is needed to display the extended attributes of an element. |
<<doc [ChildPropertiesDocument]>> |
This tag will display the conditions of an exclusive gateway. |
<<doc [PresentationActionDocument] >> |
This tag is needed to display the presentation actions on your document. |
In some cases, it is desired to organize the model information in tables. To do so create the table within the Word template and locate the information the way you want to show it. For example, if you want to order the Raci matrix in a table, use the following template:
Performers |
Accountable |
Consulted |
Informed |
---|---|---|---|
<<if [pageelements.Performers!= null]>> <<foreach [performers in pageelements.Performers]>>
Name: <<[performers.Name]>> Description: <<[performers.Description]>> Type <<[performers.Type]>>
<</foreach>> <</if>>
|
<<if [pageelements.Accountable!= null]>> <<foreach [accountable in pageelements.Accountable]>>
Name: <<[accountable.Name]>> Description: <<[accountable.Description]>> Type <<[accountable.Type]>>
<</foreach>> <</if>> |
<<if [pageelements.Consulted!= null]>> <<foreach [consulted in pageelements.Consulted]>>
Name: <<[consulted.Name]>> Description: <<[consulted.Description]>> Type <<[consulted.Type]>>
<</foreach>> <</if>> |
<<if [pageelements.Informed!= null]>> <<foreach [informed in pageelements.Informed]>>
Name: <<[informed.Name]>> Description: <<[informed.Description]>> Type <<[informed.Type]>>
<</foreach>> <</if>> |
If you want to include a <<foreach>> cycle inside a table you must add it as row of the table. For example, if you want to order the elements of a process inside a table, use the following template:
Element |
Description |
Type |
Image |
---|---|---|---|
<<foreach [in PageElements]>> <<[Name]>> |
<<doc [DescriptionDocument]>> |
<<[ElementType]>> |
<</foreach>> |