The Artima Developer Community
Sponsored Link

Python Buzz Forum
DCWorkflow dot graphs

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Fabiano Weimar dos Santos

Posts: 104
Nickname: xiru
Registered: Nov, 2003

Fabiano Weimar dos Santos is a brazilian Plone, Zope and Python developer.
DCWorkflow dot graphs Posted: Dec 25, 2003 9:12 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Fabiano Weimar dos Santos.
Original Post: DCWorkflow dot graphs
Feed Title: [Xiru].org
Feed URL: http://xiru.org/blog/search_rss?path=/Xiru/blog
Feed Description: [Xiru].org - Fabiano Weimar dos Santos' Website. Usefull information about xiru's projects, Plone and Zope community and Python hacks.
Latest Python Buzz Posts
Latest Python Buzz Posts by Fabiano Weimar dos Santos
Latest Posts From [Xiru].org

Advertisement

Some days ago I talked with my friend Sidnei that pointed me a interesting Debian package called graphviz. He used it to generate documentation for a postgresql database model (using postgresql-autodoc and graphviz). However, more than the packages, what made me curious was the way how he did it; and It give an idea: DCWorkflow graphs.

Graphviz has a program called dot. It receives a text file with a digraph description and plot it using a math model to avoid cross edges. So... I did a small spike to represent the standard Plone workflow in a dot file. The source code is that:

digraph plone {
  private [shape=box,label="Private"];
  visible [shape=box,label="Visible"];
  pending [shape=box,label="Pending"];
  published [shape=box,label="Published"];
  visible -> pending [label="Submit"];
  visible -> published [label="Publish"];
  visible -> private [label="Hide"];
  private -> visible [label="Show"];
  pending -> private [label="Hide"];
  pending -> visible [label="Retract,Reject"];
  pending -> published [label="Publish"];
  published -> visible [label="Retract,Reject"];
}

After write that simple dot file, I used dot program to generate a gif image. It's quite simple. See the example:

$ dot -Tgif plone.dot > plone.gif

If you want to download plone.dot file, click here.

Bingo! After that, I only need to write a Zope Product to read a DCWorkflow definition and export a dot file. It's christmas and I want to watch The Return of the King. I really don't want to develop it today, but why not tomorrow?

Read: DCWorkflow dot graphs

Topic: Hiding email addresses with JavaScript Previous Topic   Next Topic Topic: CruiseControl, smoozecontrol

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use