Overview
Workflow
Visualiser is a tool that takes the RTC process
configuration XML and exports graphical representation of the workflows included
in the configuration.
Motivation
The most typical task I'm facing at new RTC deployments is analysis of their workflow and its implementation in RTC. The usual procedure is:
- Meet with the customer to try to understand the workflow (states, transitions)
- Draw the workflow in Microsoft Visio and discuss the Visio files with customer
- Implement the workflow in RTC
This would be all great it there wasn't number 4 – implement the changes the customer finds after the implementation in RTC, which usually repeats several times. In this moment the Visio diagrams and the RTC implementation get out of sync and it is not easy to keep them synchronized. Workflow Visualiser helps in this step as I can export the real diagram and either send it to the customer for review or redraw it in Visio.
Another case in which this tool comes handy are big workflows (with 10< states). Although the transition table in RTC workflow designer is straightforward, checking such a workflow is not an easy task. Seeing a graphical representation of the workflow makes it clear.
Running the program
The program has to be invoked from command line and the command line arguments are:
Usage: java -jar visualiser.jar [options] source-xml-file
Options:
-h|--help Print help and exit
--version Print help and exit
-d|--dot Location of dot executable (defaults to /usr/bin/dot)
-o|--out Output directory (defaults to /tmp/)
-f|--format Output format (see the output formats of dot) (defaults to pdf)
-s|--source Save the DOT source file in the output directory
Examples
Windows example PDF
- JAR stored in C:\visualiser.jar
- Process XML configuration file saved in process.xml
- Graphviz installed in standard location
- Export diagrams in PDF format to „C:\temp“
java -jar "C:\visualiser.jar" -o "C:\temp" -d "C:\Program Files\Graphviz2.26.3\bin\dot.exe" process.xml
Windows example PNG
- JAR stored in C:\visualiser.jar
- Process XML configuration file saved in process.xml
- Graphviz installed in standard location
- Export diagrams in PNG format to „C:\temp“
java -jar "C:\visualiser.jar" -o "C:\temp" -d "C:\Program Files\Graphviz2.26.3\bin\dot.exe" -f png process.xml
Linux example
- JAR stored in ~/visualiser.jar
- Process XML configuration file saved in process.xml
- Graphviz installed in standard location (/usr/bin/dot)
- Export diagrams in PDF format to ~/diagrams
java -jar ~/visualiser.jar -o ~/diagrams process.xml
Download
Prerequisites
The program uses Graphviz for diagram drawing. You must have Graphviz installed on your computer to be able to run the program. It can be freely downloaded from http://www.graphviz.org/Download.php
Binary
Source code
ZIP with sources includes pom.xml including the Maven project dependencies.
License
Pro program is distributed under Apache License, Version 2.0. For the license agreement of the used libraries see the appropriate license agreement included in the distribution.
Version history
- 2010–04–09 Initial version
- 2010–04–09.2 Resolution edges corrected
Comments, bug reports
Any comments or bug reports are welcome. Send them either in the comments under this article or via email to honza@stastnarodina.com
Tags: java, workflow visualiser
Very cool!
Thanks a great utility. It works flawlessly
Can you output in a format consumable by RSA? Not sure what the resource format is, probably an OMG UML standard.
Randy,
the tool supports formats exported by Graphviz. To see list of them, go to http://www.graphviz.org/…/output.html. The front page of graphviz http://www.graphviz.org/ also mentions GXL format. Maybe that could be a starting point for you.
Hi
I am able to generate the pdf files for Simple and Traditional process template, but failed in Scrum one (process.xml is from the sample JUnit project). Here is the error:
C:\build>java -jar „C:\build\visualiser.jar“ -o „V:\HOST_C\Jirong\Youth2011\RTC\Work Item\Workflow\S
rum“ -d „C:\Program Files\Graphviz 2.28\bin\dot.exe“ Srum_process.xml
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte
UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDri
ver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at com.stastnarodina.workflowVisualiser.Parser.parse(Parser.java:32)
at com.stastnarodina.workflowVisualiser.Main.main(Main.java:46)
C:\build>
<!--
Copyright © 2007–2009 IBM Corporation. All rights reserved.
This file is part of a process template created for use with the Jazz Process Framework.
Your use of the process template (and hence this file) is subject to the following terms and conditions found in the process attachment named process_template_license.html.
-->
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚/${scope-path}‘
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Zoom
false
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚/${scope-path}‘
ProjectAreaName1
‚{Current Project Area}‘
Interval
'' <!-- All -->
Zoom
false
Jazz
http://jazz.net
2
technology
Jazz platform community site
3
com.ibm.team.workitem.queries.predefined.myOpen
com.ibm.team.workitem.queries.predefined.myOpenCurrent
com.ibm.team.workitem.queries.predefined.openCreated
com.ibm.team.workitem.queries.predefined.openSubscribed
com.ibm.team.workitem.queries.predefined.pendingApprovals
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚{My Team Areas}‘
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Zoom
false
Jazz
http://jazz.net
2
technology
Jazz platform community site
3
com.ibm.team.workitem.queries.predefined.myOpen
com.ibm.team.workitem.queries.predefined.myOpenCurrent
com.ibm.team.workitem.queries.predefined.openCreated
com.ibm.team.workitem.queries.predefined.openSubscribed
com.ibm.team.workitem.queries.predefined.pendingApprovals
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚{My Team Areas}‘
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Zoom
false
Jazz
http://jazz.net
2
technology
Jazz platform community site
3
com.ibm.team.workitem.queries.predefined.myOpen
com.ibm.team.workitem.queries.predefined.myOpenCurrent
com.ibm.team.workitem.queries.predefined.openCreated
com.ibm.team.workitem.queries.predefined.openSubscribed
com.ibm.team.workitem.queries.predefined.pendingApprovals
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚{My Team Areas}‘
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Zoom
false
<!-- Project -->
Release
0
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
''
ProjectAreaName1
‚{Current Project Area}‘
Interval
''
Zoom
false
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
''
ProjectAreaName1
‚{Current Project Area}‘
Interval
''
Zoom
false
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
''
ProjectAreaName1
‚{Current Project Area}‘
Interval
''
Zoom
false
com.ibm.team.process.scrum.blocked
com.ibm.team.workitem.queries.predefined.recentlyModified
com.ibm.team.workitem.queries.predefined.recentlyClosed
Current Sprint
0
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
''
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Zoom
false
Details
‚2‘
ProjectAreaName
‚{Current Project Area}‘
TeamAreaName
‚{My Team Areas}‘
Category
''
ProjectAreaName1
‚{Current Project Area}‘
Interval
‚{Current Iteration}‘
Severity
''
Type
''
Zoom
false
Thanks
Jirong
Hi Jirong,
thanks for the comment. It seems that the XML parser does not like some character in you process template XML file. Could you, please, send me the xml file to honza@stastnarodina.com, as the XML got corrupted in your post.
Regards,
Jan
Hi Honza, when I try to run the visualiser tool on Windows 2008 I get the following error message:
Any Ideas?
C:\Users\$rnorlund\Documents>rtcvisualiser.bat
C:\Users\$rnorlund\Documents>C:\Temp\Java\bin\java -jar „C:\Temp\visualiser.jar“
-o „c:\Temp“ -d „C:\Program Files (x86)\Graphviz 2.28\bin\dot.exe“ process.xml
java.io.IOException: Cannot run program „C:\Program Files (x86)\Graphviz 2.28\bi
n\dot.exe“: CreateProcess error=14001, The application has failed to start becau
se its side-by-side configuration is incorrect. Please see the application event
log or use the command-line sxstrace.exe tool for more detail
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.stastnarodina.workflowVisualiser.Main.main(Main.java:62)
Caused by: java.io.IOException: CreateProcess error=14001, The application has f
ailed to start because its side-by-side configuration is incorrect. Please see t
he application event log or use the command-line sxstrace.exe tool for more deta
il
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
… 4 more
Kind Regards
Russell
Great tool. I use this a lot.
Since you are parsing through the source, would it be possible to identify which Roles can advance the workflow to the next workflow state ?
Hi Steve,
it should be technically possible, but I don't plan to implement it now, because I don't design workflows as much as I did in the past anymore.
As it is an open source software (Apache License), you are free to do any changes. I would appreciate if you publish your altered code back for everybody to use.
Regards,
Jan
I am getting same error as Russell Norlund. Any guidance would be very helpful. Thank you.
Error details:
08/11/2011 12:10:15:049 ERMServer: Failed to query Graphviz version information
08/11/2011 12:10:15:049 ERMServer: with: D:\Program Files (x86)\emailtopia\Response Manager\Server\..\Graphviz2.28\bin\dot -V
08/11/2011 12:10:15:050 ERMServer: java.io.IOException: Cannot run program „D:\Program Files (x86)\emailtopia\Response Manager\Server\..\Graphviz2.28\bin\dot“: CreateProcess error=14001, The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail
08/11/2011 12:10:18:131 ERMServer:
08/11/2011 12:10:18:131 ERMServer: Warning: Failed to run dot.
08/11/2011 12:10:18:131 ERMServer: Download dot version 2.2.1 or versions greater than 2.4
08/11/2011 12:10:18:131 ERMServer: from http://www.graphviz.org and make sure that dot is either in your path
08/11/2011 12:10:18:131 ERMServer: or point to where you installed Graphviz with the -gv option.
08/11/2011 12:10:18:131 ERMServer: Generated pages will not contain a diagramtic view of table
Hello Devika,
I don't know how to fix this as I don't have access to any Windows 2008 machine.
Googling revealed this answer: http://answers.microsoft.com/…465e18e3f3ef Try it.
In general it seems that there is a problem with running graphviz. To troubleshoot this, try to run graphviz directly. I guess you will get the same error.
Regards,
Jan
Good job!
I'm an IBMer (RTC regional mentor).
My customers said: THANK YOU
Hi,
Need help in debugging message output. Here is the command that I am running „java -jar "visualiser.jar“ -o „C:\tmp\“ -d „C:\Graphviz2.28\bin\dot.exe“ c:\tmp\process.xml", yet the output states that „The input file has to be set“. What am I missing?
Thanks,
Sam
Hi Sam,
this is weird. It seems like the command line arguments parser failed to detect the last argument (path to the XML). The only think I can advise is to download the source and try to debug it there.
You may also try to enclose the last argument in quotes.
Rgds,
Jan
If you get the following xml error
Invalid byte 1 of 1-byte UTF-8 sequence.
try this:
If you paste the process content into notepad:
Great Jan, it's simply fantastic !
Many thanks
andrea
Great Utility. Thanks it saved lot of time.
Sorry to get back to you so late. Today I opened the xml file in XMLPad and XMLPad automatically corrected the issue, I guess. Then I can generate the work flow files with no issue.
I copied the process.xml file from within RTC eclipse client GUI.
Thanks
Jirong
Absolutely brilliant! This works like a charm with RTC 4.0.1. It has saved me hours of monkeying in Visio. The fact that the resolutions are shown is incredibly helpful.
Thanks.
kjc