Use Aspose Template

<< Click to Display Table of Contents >>

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

Use Aspose Template

Overview

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.

 

Prerequisites

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.

 

Create a new Aspose template

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.

 

AsposeTemplate

 

Main objects and their Aspose Counterparts

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.

 

Aspose syntax

 

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

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

 

Advanced tags

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.

 

Tables

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

AsposeTemplate01

<</foreach>>

 

Aspose tags available in Bizagi Modeler

The following tables show the Aspose tags available in Bizagi Modeler.

 

Texts

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

 

Tag

Text on your document

<<[texts.Author]>>

Author

<<[texts.Version]>>

Version

<<[texts.Connector]>>

Connector

<<[texts.Connectors]>>

Connectors

<<[texts.DefaultElementName]>>

Element

<<[texts.Description]>>

Description

<<[texts.Home]>>

Home

<<[texts.MainPool]>>

Main Process

<<[texts.Performers]>>

Performers

<<[texts.Accountable]>>

Accountable

<<[texts.Consulted]>>

Consulted

<<[texts.Informed]>>

Informed

<<[texts.ProcessDiagrams]>>

Process Diagrams

<<[texts.ProcessElements]>>

Process Elements

<<[texts.TableOfContents]>>

Table of Contents

<<[texts.Process]>>

Process

<<[texts.Contain]>>

Contains

<<[texts.Performer]>>

Performer

<<[texts.PresentationAction]>>

Presentation Actions

<<[texts.TitlePage]>>

Start

<<[texts.EmptyElement]>>

This element has not yet been documented

<<[texts.MainPoolProperties]>>

Main Process properties

 

Model

The following table shows the Model properties tags available.

 

Tag

Description

<<[PublishDate]>>

Date when the document was published.

<<[ProjectName]>>

Name of the project.

<<[ProductName]>>

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

<<[BizagiUrl]>>

URL of the main Bizagi website.

<<[UseUserLogo]>>

A boolean property that states if the user has a custom logo.

<<[UserLogoName]>>

The logo location to insert as an image.

 

Remember that the model contains multiple diagrams (Pages).

 

Diagrams

The following table shows the diagrams (Pages) properties tags available.

 

Tag

Description

<<[Name]>>

Name of the diagram.

<<[DiagramDescription]>>

Description of the diagram (along with its html format).

<<[Version]>>

Version of the diagram.

<<[Author]>>

Author of the diagram.

<<[Image]>>

The diagram's image file location to insert as an image.

<<doc [DescriptionDocument]>>

Description of the diagram displayed with its custom html format.

<<doc [PropertiesDocument]>>

A list of the diagram extended attributes.

 

Remember that each diagram contains multiple processes (Elements) and extended attributes (Properties).

 

Processes

The following table shows the process (Elements) properties tags available.

 

Tag

Description

<<[Name]>>

Name of the process.

<<[Description]>>

Description of the process (along with its html format).

<<[ElementImage]>>

The process's image file location to insert as an image.

<<doc [DescriptionDocument]>>

Description of the process displaying its custom html format.

<<doc [PropertiesDocument]>>

A list of the process extended attributes.

 

Remember that each process contains multiple elements (PageElements), Raci resources (Performers, Accountable, Consulted and Informed) and extended attributes (Properties).

 

Tasks, gateways and events

The following table shows the tasks, gateways and events (PagesElements) properties tags available.

 

Tag

Description

<<[Name]>>

Name of the element.

<<[Description]>>

Description of the element (along with its html format).

<<[ElementImage]>>

The element's image file location to insert as an image.

<<[ImageObject]>>

The elements's image file location to insert as an image.

<<[ElementType]>>

The element specific type (AbstractTask).

<<[ElementSubType]>>

The element general type (Task).

<<doc [DescriptionDocument]>>

Description of the element displaying its custom html format.

<<doc [PropertiesDocument]>>

A list of the element extended attributes.

<<doc [ChildPropertiesDocument]>>

Displays the conditions of the exclusive gateways.

 

Remember that each task contains multiple Raci resources (Performers, Accountable, Consulted and Informed) and each element contains multiple extended attributes (Properties).

 

Extended Attributes

The following table shows the extended Attributes (Properties) properties tags available.

 

Tag

Description

<<[Name]>>

Name of the extended attribute.

<<[Description]>>

Description of the extended attribute.

<<[Type]>>

Extended attribute type.

<<[Value]>>

Value of the extended attribute (along with its html format).

 

Resources

The following table shows the resources (Performers, Accountable, Consulted and Informed) properties tags available.

 

Tag

Description

<<[Name]>>

Name of the resource.

<<[Description]>>

Description of the resource.

 

Next steps

For additional information on how to use the Aspose tags review their documentation.