SinelaboreRT Header Logo


It's better when it's simple!

User Tools

Site Tools


Generate code from Astah* activity diagrams

In the latest version of the SinelaboreRT code generator support for activity diagrams was added for astah* users. astah* is a UML modeling tool written in Java and can therefore run on various platforms like Windows or Mac. In opposite to some other tools it provides a Java API for direct access of the model file. Therefore it is not necessary to export the model (e.g. in XMI format) but the SinelaboreRT code generator can directly access the model file. This makes the development cycle very fast. Give it a try!

The following figure shows an extended version of the microwave oven example. A simple hardware selftest function was added to the transition leaving the initial state. In case this test is ok the software enters the normal operation states. Otherwise an error state.

The hardware selftest function was modelled as activity. The activity itself is trivial but enough to show the new possibilities. The code of each action forming the activity is available in the properties dialog of the actions. Take a look into the manual what other diagram elements can be used.

To generate code from the activity diagram use the following commands (command line on a Mac):

java -Djava.ext.dirs=“../../bin/”:“/Applications/astah community/astah” -Djava.awt.headless=true -jar ../../bin/codegen.jar -l cx -A -v -p ASTAH -o oven -t “final:oven:selftest”

The -D options tells java where to look for the jar files. The new option -A enables code generation for activity diagrams.

In case of questions, problems or suggestions please contact us.

Have fun! Peter

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
wiki/news/7june2014.txt · Last modified: 2014/06/07 11:44 by pmueller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki