1

I'm using Automatonyous state machines in my c# project. I'm wondering if there is a way to automatic obtain the graph of coded state machines.

  • https://github.com/MassTransit/Automatonymous/tree/master/src/Automatonymous/Graphing ?? – stuartd Jan 31 '17 at 09:25
  • Yes, it seems that this code could generate an object representing the state machine graph. Now, for me, the question is: does exist an example that explain how to use this object representing the state machine graph to obtain a drawing of this graph? – user2396570 Jan 31 '17 at 09:32

1 Answers1

3

You can generate a GraphViz .dot file from the state machine using the Visualizer assembly.

https://github.com/MassTransit/Automatonymous/blob/master/src/Automatonymous.Tests/Visualizer_Specs.cs#L30

UPDATE

With MassTransit v8, this has moved into the MassTransit.StateMachineVisualizer NuGet package.

And the unit test is here.

Chris Patterson
  • 28,659
  • 3
  • 47
  • 59
  • Thank you very much! This is exactly what I searched for! – user2396570 Feb 06 '17 at 14:17
  • in case someone else stumbles here, the updated link is https://github.com/MassTransit/Automatonymous/blob/bc03484ac2cef256c711817569260a22d454522c/tests/Automatonymous.Tests/Visualizer_Specs.cs – kuldeep Dec 14 '22 at 10:12