Skip to content

Latest commit

 

History

History
68 lines (60 loc) · 2.86 KB

File metadata and controls

68 lines (60 loc) · 2.86 KB

spring-state-machine-chart-dumper

Library to Dump/draw a state machine chart out of a Spring Statemachine

Supported Formats

Status of Development

  • States dumped
  • Transitions with event triggers dumped
  • Sub machines dumped
  • Regions dumped
  • MDT UML2 output
  • SCXML (not complete mapping)
  • Guards dumped
  • Pseudostate JOIN dumped
  • Pseudostate FORK dumped
  • Pseudostate CHOICE dumped
  • Pseudostate JUNCTION dumped
  • Actions not dumped
  • Time triggers not dumped
  • Lots of the Pseudostates not dumped with their specialization
  • Tests are not yet real tests

Usage

  1. Put net.workingdeveloper.java.spring.statemachine.dumper-*.jar on your classpath
  2. add these lines of code to your project source code:
  • Eclipse MDT UML2 dumper:
     // StateMachine<S, E> stateMachine is configured before this point
     try {
         SsmDumper dumper = new SsmMdtUml2Dumper<>(stateMachine);
         File outputFile = new File("/path/to/output"); // ".uml" extension will be added by dumper
         dumper.dump().save(outputFile);
     } catch (IOException aE) {
         aE.printStackTrace();
     }
  • SCXML dumper:
     // StateMachine<S, E> stateMachine is configured before this point
     try {
         SsmDumper dumper = new SsmMdtUml2Dumper<>(stateMachine);
         File outputFile = new File("/path/to/output"); // ".uml" extension will be added by dumper
         dumper.dump().save(outputFile);
     } catch (IOException aE) {
         aE.printStackTrace();
     }
  1. Run your application code that executes the above lines
  2. After the run has completed use UML Designer to open the generated /path/to/output.uml file and add a presentation (if you have choosen the SsmMdtUml2Dumper class as dumper):
    1. Create a workspace and project to copy the /path/to/output in: (Needs only be done for the first time, if you haven't a UML Designer project)
      1. Start UML Designer
      2. Choose your workspace e.g. ~/workspace/UMLdesigner
      3. Create a project e.g. ssm_dumps
    2. Copy the /path/to/output.uml to the project e.g. to ~/workspace/UMLdeisgner/ssm_dumps
    3. [...to be continued...]

Tools for viewing generated models