XMI IMPORT/EXPORT
XMI is a file format specified by the OMG intended for tool independent exchange of design models. This page gives a brief overview of how XMI import and export can be utilized in visualSTATE and what limitations that apply.HOW TO IMPORT
Open Designer and chose Open from the File menu. Make sure that the file filter in the lower right corner is set to Statechart Files in XMI Format and browse to the XMI file you would like to import. Note that only the state machine parts of a UML design are imported, no class structures and no other diagram information. Further, no layout information is present in the XMI file, so visualSTATE will attempt to automatically layout the state charts.
HOW TO EXPORT
Open Designer on the model you would like to export to XMI format. Make sure that the proper topstate is highlighted in the project browser window and chose Save As from the File menu. Change Save as type to be xmi. A class structure will be created to hold the state machine corresponding to the exported topstate. Exported events, action functions and variables will be generated at appropriate places in the exported XMI structure. No layout information for the diagrams is exported. Different tools that import XMI will have different strategies for layouting the diagrams.
SPECIAL CONSIDERATIONS
- The import and export is designed to support XMI version 2.1.
- XMI generally contains no layout information.
- The mapping between what can be modeled in visualSTATE and what can be modeled in a full UML tool differs:
- visualSTATE models can emit signals on the action side of a transition and use positive/negative state synchronizations in guard conditions.
- Signals are mapped to a macro recognized by some UML tools for sending an event between state machines. This behavior might or might not be the desired.
- State guards are emitted as comments on the exported transition.
- Some UML modeling tools cannot handle regions and parallelism inside a state.
- Conversely, a UML state machine can contain basically anything on transitions and as entry and exit behavior; free text is allowed. visualSTATE attempts to import everything it recognizes as valid visualSTATE syntax. All other information is preserved in the explanation field of the corresponding design element.