Unsupported
Thumb_1-icon

Wiki Macro to Visualize Polarion Workflow

 A macro to automatically draw a workflow defined within Polarion using the workflow manager or the workflow xml-file of the workitem. Further customization is possible.

Description

share this page via facebook share this page via LinkedIn share this page via Twitter share this page via Google+ share this page via email More sharing services
This extension is related to the Classic Wiki technology that is now outdated and replaced by our new LivePage format. We still maintain Classic Wiki but we are no longer extending its feature set.

Please consider implementing the use case you are looking for using a LivePage.

The macro #draw_workflow automatically draws a workflow defined within Polarion.

It uses functionality of Graphviz. Graphviz (http://www.graphviz.org) is an open source graph visualization software. It contains different tools to produce high quality graphs in different output formats. Two of them, dot and neato, can be used in xwiki delivered with Polarion. 'dot' is a filter for drawing directed graphs, 'neato' can be used for undirected graphs.

The integrated xwiki of Polarion contains the plugin 'graphviz', which is not activated by default. After activation Graphviz can be used within xwiki by using the {graphviz} plugin statement enclosing statements for definition of Graphviz graphs. The output is rendered on the wiki page.

The second prerequisite of this macro is the Wiki Scripting Tools Polarion extension with the XMLTool and other nice helper objects. If not using the workflow manager object this is necessary to import and parse the actual workflow definitions stored in xml-files in the repository of the Polarion project.

So finally the macro uses Velocity to produce Graphviz graph definitions based on the information provided using the workflow manager object or xml-files.

The macro is defined by:

draw_workflow($wf_workitem $wf_file $t_index $g_size $wf_showid $wf_showinfos $wf_showgraphviz)

with the parameters:

                wf_workitem        Id of Work Item resulting in drawing of related workflow

                wf_file                   Use xml-file (=true) or workflow manager (=false) as source of workflow information

                t_index                  Index of theme

                g_size                   Size of the graphic in inches

                wf_showid            Show id (=true) or name (=false) in graph

                wf_showinfos      Show additional information of workflow

                wf_showgraphviz               Show graphviz notation on wiki page

The Work Item given as the first parameter defines the related workflow to be processed and drawn.

The file switch defines if the macro will use the related xml-file of the workflow stored in Polarion-Repository under .polarion/tracker/workflow. This is an alternative showing direct access of workflow definition files.

The index (0..n) given references a theme (color, fontsize etc.) which will be used for drawing the workflow. A theme is an array of Graphviz attribute settings. Several themes are stored in a themelist. The theme which should be used is selected out of this list. Customizing is easy by modifying the themes or extending the themelist.

The value given with parameter g_size is the size of the graphic in inches. A good value is 7. See Graphviz documentation for further information. The macro uses parameter ratio 0.6 resulting in a more horizonzal graphlayout.

The last three parameters showid, showinfo and showgraphviz are effective only if workflow manager is used.

The showid switch decides if labels of nodes and actions will be drawn using id or name information.

The showinfos switch allows to display more detailed information of the workflow using a table view. Depending on the showid switch the first column contains the id or name of the action sorted ascending.

The showgraphviz switch allows to display the graphviz notation which will be generated on the wiki page. It can be copied for further usage with the dot command (e.g. customize the notation or generate a svg or pdf version of the workflow graph)

After installation of Graphviz, activation of the xwiki plugin and installation of the Wiki Scripting Tools Polarion extension the user has to

            - create a space named "macros" inside the project

            - create a page named "drawWorkflow" inside this space

            - copy content of file wikipage_drawWorkflow.txt into this page

The macro can be used on other pages by adding

           #includeMacros(macros.drawWorkflow")

            #draw_macro(...)

After saving the page the workflow content will be drawn.

More Information and examples of usage are provided on the drawWorkflow-page and the wikipages in the attachment (files wikipage_workflows....txt)
 

Information

Vendor Sven-Jürgen Lämke
Published Version 1.2.0 - January 2014
Categories
Products
Price Free
1091 Downloads
Unsupported Extension This extension is not supported by Siemens PLM.
Requirements Polarion ALM 2011 or 2012 (older versions might work but have not been tested)

Graphviz ( www.graphviz.org ) installed on Polarion server, latest version available either for Windows or Linux/Unix

Wiki Scripting Toolsprovided by PolarionPOP (see http://extensions.polarion.com/polarion/extensions/extension.jsp?extension=PE-174)