Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a tool to visualize a grails webflow?

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.

like image 937
skurt Avatar asked Apr 07 '11 08:04

skurt


2 Answers

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 :)

like image 145
Chris Avatar answered Oct 14 '22 19:10

Chris


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.

like image 45
Hoàng Long Avatar answered Oct 14 '22 19:10

Hoàng Long