Dia->Statemachine: The tools

First of all, download DIA! =D

Select UML for the sheet pallet. Only a reduced set of the tools will be interpretated, the X´s will be ignored.

These is the selection of tools available:

dia - rubystatemachine

dia -> ruby statemachine

Ok! A quick note about the arrows, is that the 3 of those can be used under any TRANSITION circunstances (since all connect state with state), but you will see if you try, some arrows fit better in the indicated manner.

simple ex

simple ex

  • So that is a very basic example, it is valid, notice that you need to indicate a BEGINNING connected with a STATE since the XML has no defined order among the elements.
  • Not all TRANS are required to declare an action,  the EVENT alone is ok, but if your going to declare both  use  / to separate <  event_name / run_action >
  • On STATES you may use the fields: Entry action and Exit action they will trigger respectively on_enter, on_exit

Soon part 2


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s