Hello!
1) There are visual modelling tools where you can draw UML state machine diagrams (see picture [login to view URL], modelled from [login to view URL])
2) I use that tool to model state machines. I cannot create executable code from the design tool, but I can export the drawing to a XMI file. The XMI file is an XML file which contains all the information to redraw the picture (see [login to view URL]).
3) In order to use the state diagram logic in a programming language, it is best to transform the XMI file to a SCSML file because there are programming libraries such as in Apache commons who take the SCSML and compile it into controller logic.
4) Y O U R J O B
I want you to write the XSLT transformation logic to transform XMI to SCXML. I don't really know if this is possible, but it should. Therefore, we start with the small example included in this description to proof that it is possible.
Finally, the XSLT (and possible XSL) that you implement will be integrated into a webservice. I want to use Apache cocoon in a Tomcat servlet environment. No worries, I have a lot of exprerience with cocoon, so you can really concentrate on writing the XSLT logic, nothing else.
If the first step with this simple example suceeds, we will then try to transform more complex state diagrams with more complex XMI (the scope of this project is only the first step, I will post a follow-up project if sucessful).
GLOSSARY (copyright Wikipdia)
UML
The Unified Modeling Language (UML) is used to specify, visualize, modify, construct and document the artifacts of an object-oriented software intensive system under development.
UML State machine diagram:
Standardized notation to describe the dynamic of many systems, from computer programs to business processes.
XMI
The XML Metadata Interchange (XMI) is an Object Management Group (OMG) standard for exchanging metadata information via Extensible Markup Language (XML).
SCXML
SCXML stands for State Chart XML: State Machine Notation for Control Abstraction. It is an XML-based markup language which provides a generic state-machine based execution environment based on Harel statechart
Copyrights of appended files:
[login to view URL]
[login to view URL]