Monday, December 31, 2012

Documenting WEF Models

Web Experience Factory is a pretty good tool for rapid development, but its designer lacks automated documentation that can be used to explain an application to a new developer. Models can get extremely complicated, especially when they're assembled by developers who are just starting to use the tool. This article describes how graphs can be generated using eclipse.

Using an Eclipse Plugin to Generate Graphs
I've worked with projects that, in some cases, imported dozens of other models, making it quite challenging to follow a sequence of events. About a year ago I had the idea of generating a graph showing how models are imported into each other, but quickly got lost in the details of graphing within eclipse.
I recently stumbled on an open source application named Graphviz, and when I saw the simplicity of using a DOT file to describe a graph, I was able to quickly develop a plugin to inspect a WEF model and produce a graph of it.

An easy candidate for a graph is tracing how models import other models. The plugin does this by recursively traversing the import builders in each model, producing a graph similar to this example.

Once I figured that out, I was able to add some more to the plugin, producing a graph of service consumer operation calls like the one below. This graph indicates that model_4 contains an action list builder named alTest that invokes the doSomeOperation operation exposed by the service consumer builder named svcConsumer.

The graph of action list calls (builders which invoke action lists) is very similar to the one above, except the target node is an action list instead of a service operation.
After the plugin is installed by following these instructions, you will see the following submenu when right clicking on a model.

Just select the graph you wish to generate and it will appear in an eclipse browser window. Although I developed this tool for my own use, I'm making it available free of charge to anyone.

If the tool doesn't work for you, then please leave me a message on this blog (or email me).

References: Download plugin from
Please note that generic comments containing links with the intent of self promotion will be flagged as spam and deleted.


  1. This looks cool. Do you use the built in Model Reporting? There is a project menu item or project context menu to Build Model Report.

    1. Model reporting does provide some amount of information for documenting, but it seems more targeted at analysis/recommendation. Graphs work for me, it's the way I visualize things in my mind.

      The plugin also provides back tracing of actions, I don't think model reporting does that.

  2. This Plugin is not working for me. I installed Plugin and Graphviz and restart my computer. When I right click on any Model, it is showing me WEF Graphs menu and respective sub menu items. However, after clicking any sub-menu item it is not showing me graph. Could you please help me.


    1. The plugin works by invoking a script which contains the path to graphviz. Since the graphviz install path contains a version number, it is likely that the bat file needs to be corrected.
      The script can be tested manually by invoking from the command line:

      C:\IBM\Web Experience Factory\Eclipse\plugins\com.dsixe.wef.designer.graphing_1.3.10713\windows\transform.bat "c:\test.png" is a test file that I added for the purpose of testing.

  3. Thanks for your help. It is working now. :)


Are you about to post a generic comment that has nothing to do with this post? Something like "Hey thanks for this very valuable information, BTW here's my website". If so, it will be marked as spam and deleted within 24 hours.

Note: Only a member of this blog may post a comment.