Use Aspose Template

<< Click to Display Table of Contents >>

Navigation:  Bizagi Modeler > Generating documentation > Basic publishing and export > Publish to Word > Document Template >

Use Aspose Template

When you publish to Word, you can use an Aspose based template. You can configure this template by modifying the default AsposeTemplateSyntax.dot template located at [Installation_Path]\DocTemplates. This template lets you personalize almost every aspect of your document by applying your desired theme to your Aspose tags.

 

Prerequisites

Modify this template only if you have basic coding knowledge and are familiar with Aspose or tag based programing language.

 

Main objects and their Aspose Counterparts

When documenting your Bizagi Modeler project, you can divide all its attributes into the following sections: model properties, diagrams, resources, and texts.

1.Diagrams: Diagrams contain your different process used in your model. Internally they contain the following information.

oProcesses: Processes contain all the information of your workflow, including its performers, accountable, informed, and consulted.

Tasks or Events: These contain all the information on the specific steps of your workflow. Including its performers, accountable, informed, and consulted.

2.Resources: Assets available for your processes.

3.Model properties: General properties of your model.

4.Texts: Static texts 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.

 

A different Aspose variable represents 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

Diagram

Pages

Process

Elements

Task or events

PageElements

Resources

ResourcePage

Texts

texts. You must insert this tag <<var [texts = Texts]>> at the beginning of the template to use this variable.

Model Properties

No tag is necessary to access these properties. For example, if you want to get the publish date of the model, use this tag <<[PublishDate]>>.

 

foreach tag

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 of an activity, use the following Aspose template:

 

<<foreach [item in Performers]>>

<<[item.Name]>>

<</foreach>>

 

if tag

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>>

 

upper

If you want to show a text only 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>>

 

Images

The elements: processes, tasks and events have a special property called ImageObject. In this property the image of the element is stored. To use it 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>>.

 

Advanced tags

Some elements of your processes need special tags to be displayed 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.

 

Texts

The following table shows the text tags available along with their values in English.

 

Tag

Text on your document

<<[texts.TableOfContents]>>

Table of contents

<<[texts.Elements]>>

Process elements

<<[texts.Description]>>

Description

<<[texts.Version]>>

Version

<<[texts.Author]>>

Author

<<[texts.Performers]>>

Performers

<<[texts.Accountable]>>

Accountable

<<[texts.Consulted]>>

Consulted

<<[texts.Informed]>>

Informed

<<[texts.PresentationAction]>>

Presentation actions

 

Model Properties

The following table shows the model tags.

 

Tag

Description

<<[PublishDate]>>

Date when the document was published

<<[ProjectName]>>

Name of your project

<<[ProductName]>>

Name of the Bizagi product used to publish the file (Modeler or Studio)

<<[BizagiUrl]>>

URL of the main Bizagi website