7

As I am writing my first grails webflow I am asking myself if there is anyy tool or script what can visualize the flow?

Result can be a state diagram or some data to render in a graph tool like graphviz.

skaffman
  • 398,947
  • 96
  • 818
  • 769
skurt
  • 1,019
  • 2
  • 13
  • 29

3 Answers3

5

There's no tool around currently that will do this for you I'm afraid. I've implemented something myself before, but this was very simple and was not automated in any way. It was a simple template where the model was a step number:

<g:render template="flowVisualiser" model="[step: 2]" />

You would have to put this in every view of the webflow, changing the number for whatever step it was. The template itself just had a row of images for each of the steps, and there was some gsp logic in the style of each image so that if the model passed in was step 2 (for instance) or above then this particular image would have opacity 1:

<li>
    <div class="${step >= 2 ? 'step-completed' : 'step-todo'}">
        <img src="${resource(dir:'images',file:'2.png')}" />
        <h4>Do this step</h4>
    </div>
</li>
...

I know it's not fancy and it's a bit of manual labor but it worked just fine for me :)

Chris
  • 1,216
  • 9
  • 16
  • thanks for answering and nice idea to show what is the actual state but as this is not what I meant it does not solve the question. – skurt Apr 19 '11 at 13:55
1

As far as I know there's only 2 plugin for Grails which do visualization, but only build a class-diagram, They are Class diagram plugin and Create Domain UML.

You can have a look at this page for a quick review about all current Grails plugin.

Hoàng Long
  • 10,746
  • 20
  • 75
  • 124
0

probably this could be a solution for all people using intellij: http://www.slideshare.net/gr8conf/gr8conf-2011-grails-webflow Slide 25

skurt
  • 1,019
  • 2
  • 13
  • 29