yohang / Finite

A Simple PHP Finite State Machine
http://yohan.giarel.li/Finite
MIT License
1.31k stars 188 forks source link

Graph visualisation #16

Closed bonndan closed 10 years ago

bonndan commented 10 years ago

Inspired by a talk on https://github.com/Metabor/Statemachine I've created a similar rendering of Finite using Graphviz. Such a visualisation of a state machine can be really helpful when discussing with customers.

See here:

https://github.com/bonndan/Finite/tree/feature-visualisation https://github.com/bonndan/Finite/blob/feature-visualisation/examples/rendered-graph.png

Before creating a PR I would like to know your opinion and if there are should be added more label like events, properties or the like.

yohang commented 10 years ago

Hi,

I planned this feature, but i'm lacking of time, so your PR is welcome :)

Should we add more labels ? Yes, probably, but this could be configurable.

fazae commented 10 years ago

have a look at Zeta components. It is not maintained anymore, but there is some good ideas.

http://zetacomponents.org/documentation/trunk/Workflow/tutorial.html

There is a graph generator : http://zetacomponents.org/documentation/trunk/Workflow/tutorial.html#visualizing-a-workflow-using-graphviz

This lib used to be in Apache fondation, but now it is in github : https://github.com/apache/zetacomponents https://github.com/apache/zetacomponents/tree/trunk/Workflow https://github.com/apache/zetacomponents/tree/trunk/WorkflowDatabaseTiein https://github.com/apache/zetacomponents/tree/trunk/WorkflowEventLogTiein https://github.com/apache/zetacomponents/tree/trunk/WorkflowSignalSlotTiein

yohang commented 10 years ago

Closing as a pull request is open (#17)