I made this package to create dynamic GraphViz file in my jspwiki. This plugin uses GraphViz to render the images.

Coming soon:#

  • 2/19/05 - Will change parameters to read directly from the jsp properties file.
  • 2/18/05 - Got graphviz to pass node coordinates, so that image mapping and linking to WikiPages can be automatic - still need to test and tweak.
  • 2/17/05 - WorkFlow now takes the information directly from the WikiContext - no need to pass parameters.


  • WorkFlow.java
  • WorkFlowGraph.java
  • WorkFlowManager.java

Installation: #

  • I. Download GraphViz and install if not already installed. Make sure the main dot program is located in /usr/bin
  1. This may vary if you are using a windows system. For example, I have TomCat 5.5.9 installed, and I don't have any directories called usr. I have two bin directories in my TomCat folder. Having copied the dot program to both directories, I get "Plugin insertion failed: Could not find plugin WorkFlow" as an WorkFlow Error when I try to view the Plugin.
  • II. Extract the WorkFlow.jar file in /WEB-INF/classes directory.
  • III. Add the following lines to your jspwiki's /WEB-INF/web.xml



  • IV. Add the packages name 'com.xcaws.jspwiki.plugin' to the plugin-searchpath in

[ {WorkFlow}]

and you will get a default graph:

To add your own values, type:

[{WorkFlow values='A->B|A->C|A->D|A->E|A->F|B->K'}]

How the Plugin works :

WorkFlow parses the parameters, builds a string buffer, then sends the string buffer to GraphViz.

  • NOTE: GraphViz should be located in /usr/bin/dot
  • NOTE: a temporary file is created in /tmp

WorkFlow, then brings the file into a byte array and returns the results to the wiki content.


param values :

  • the GraphViz nodes.

I hope you find this plugin useful.
Questions? Suggestions? Critics? Bugs? Please edit this page or mail me.


This plugin does a good job of passing through values so you can pass other directives to GraphViz see Documentation. So you can customize the look of the elements in the graph. For example:

values='node [color=lightblue2, style=filled, shape=ellipse]|"A.java"|node [color=yellow, style=filled, shape=rectangle]|"A.java"->"B.java"'

However, if there are multiple ~Workflow tags on the same page, the last workflow on the page is generated for each instance of the plugin tag.

-by ThomVaught

It might be useful to point to the GraphVizPlugin if you are after a general purpose GraphViz wrapper.

I tried this plugin under w2k,but TOMCAT console out this line below,and no WORKFLOW diagram display,anyboby can tell me the reason.did the plugin use absolute path?
Error: I/O error while writing the dot source to temp file!

thank you,my email:datavision@163.com


I installed current version of Graphviz in Fedora 7 and tested this plugin. In my testing, Gif temp file is not created properly. The temp file opening error is showing like

  • The filename "out53430.gif" indicates that this file is of type "GIF image". The contents of the file indicate that the file is of type "plain text document". If you open this file, the file might present a security risk to your system.
  • Do not open the file unless you created the file yourself, or received the file from a trusted source. To open the file, rename the file to the correct extension for "plain text document", then open the file normally. Alternatively, use the Open With menu to choose a specific application for the file.

I replaced GIF format with PNG format and now its working properly.

Code changes

  • img = File.createTempFile("out", ".png", new File(this.TEMP_DIR));
  • String cmd = DOT + " -Tpng "+dot.getAbsolutePath()+" -o"+img.getAbsolutePath();

I attached the changed version of JAR here.

Any suggestions?

Thanks and Regards, Ramesh G

There is anyway to using this plugins on windows using WinGraphviz?

--AnonymousCoward, 22-Sep-2007

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
WorkFlow.jar 11.5 kB 1 18-Feb-2005 05:59
WorkFlow_20070825.jar 14.3 kB 1 25-Aug-2007 08:31
sample.workflow2.gif 51.4 kB 1 18-Feb-2005 06:50
sample_workflow.gif 9.3 kB 1 18-Feb-2005 06:01
« This page (revision-30) was last changed on 01-Sep-2008 20:05 by FlorianHoleczek