SysML v2
Importing SysML v1 Models
Convert a SysML 1.x model from Cameo, MagicDraw, Enterprise Architect, Rhapsody or Papyrus into SysML v2 text, review what changed form, and import it into a SysML v2 project.
On this page
Overview
You can bring a SysML 1.x model into a SysML v2 project. Holarch reads the model's XMI file, converts it to SysML v2 text, checks the text, and shows a conversion report before anything changes.
- Input: a SysML 1.x model as XMI (
.xmi,.uml,.xml) or a Cameo or MagicDraw project (.mdzip). - Output: SysML v2 text in your project, as one undo step, or a new SysML v2 project.
- Report: every v1 element with its result: Converted, Approximated or Left out, and why.
The conversion follows the SysML v1 to SysML v2 transformation in the OMG SysML 2.0 specification, where a model exchanged as XMI carries enough detail for it.
Concepts
Converted, approximated and left out
Each element of the v1 model gets one result:
- Converted: the element has a direct SysML v2 counterpart, such as a block that becomes a
part def. - Approximated: the element is kept in a changed form. For example, a full port typed by an interface block becomes a port, and a transition through a choice pseudostate becomes one transition per path.
- Left out: SysML v2 has no counterpart, or the element points to something that is not in the file. Examples are flow final nodes, activity partitions, use case extensions and instance specifications.
The report gives the reason for every approximated and left-out element in words.
The SysMLv1Library package
Some SysML v1 properties have no SysML v2 keyword, such as a block's isEncapsulated or a refine relationship. The converter keeps them as metadata from the SysMLv1Library package, for example @SysMLv1Library::RefineData { isRefine = true; }. The package is part of Holarch's library, so these names resolve in every SysML v2 project.
Opaque bodies become textual representations
Opaque behaviors, opaque actions, guards and constraint specifications carry text in a language such as OCL or English. The converter keeps each body as a textual representation: language "OCL" /* … */. Bodies in SysML or KerML are checked like the rest of the text. See Textual representations.
How to use it
When and why
Use the import when a team moves an existing SysML 1.x model to SysML v2, or wants to reuse parts of one. The converted text is a starting point: the report tells you what to review by hand.
Import a SysML v1 model into a project
- Open a SysML v2 project and click Model → Import and Export.
- Under Import, choose Into this project or Into a new SysML v2 project.
- Drop the
.xmi,.uml,.xmlor.mdzipfile on the box, or click the box to choose it. You see a progress card with the stages Reading the XMI file…, Converting to SysML v2… and Checking the result…. - Read Conversion from SysML v1 at the top of the preview. It states the number of elements converted, approximated and left out, and whether the SysML v2 text checks without problems.
- Use Show to list the approximated and left-out elements, only one of them, or all elements. Each row gives the element, its SysML v1 kind, the result with the SysML v2 keyword and qualified name, and Why.
- Open Show the SysML v2 text to read the result before importing it.
- Clear any packages you do not want in the table below, then click Import N Packages (or Create Project). The model is imported as one undo step. Undo removes it again.
Keep the report and the text
- Click Download Report for a CSV file with every element, its result, its SysML v2 path and the reason.
- Click Download SysML v2 Text for the converted
.sysmlfile.
Export the model from your SysML v1 tool
- Cameo Systems Modeler and MagicDraw: import the
.mdzipproject directly, or use File → Export To → Eclipse UML2 (v5.x) XMI File and import the.xmifile. - Enterprise Architect: select the package, choose Publish → Export XML, select XMI 2.1, and import the
.xmlfile. Enterprise Architect project files (.eap,.qea) cannot be read directly. - IBM Rhapsody: export the model with the XMI toolkit (XMI 2.x) and import the file.
- Eclipse Papyrus: import the model's
.umlfile.
Worked example: the CubeSat EO-1 model
The CubeSat EO-1 demo is an LML project. Its SysML v1 export makes a realistic test model.
- Open the CubeSat EO-1 demo and export it as UML/SysML XMI in the OMG XMI 2.5.1 format (see Export a UML/SysML model (XMI)).
- Open a SysML v2 project, click Model → Import and Export, choose Into a new SysML v2 project, and drop the
.xmifile. The report reads: 1,042 elements, 1,007 converted, 32 approximated, 3 left out. The SysML v2 text checks without problems. - Set Show to Left out. The three rows are a use case extension, which SysML v2 does not have, and two trace relationships to elements without a name, which SysML v2 text cannot refer to.
- Click Create Project. The new SysML v2 project opens on the Text page with the satellite's structure, functions, requirements and traces.
Tips and common mistakes
- Import one XMI file at a time, without other files. Import one SysML v1 XMI file at a time, without other files.
- Name the elements you trace to. Relationships to unnamed elements are left out, because SysML v2 text refers to elements by name.
- Check approximations first. They are the places where the meaning may differ from the v1 model, such as ports typed by blocks or connector ends inside parts.
- Elements with the same name in one place are renamed with a suffix such as
_2. The report lists each rename.
What converts
| SysML v1 | SysML v2 |
|---|---|
| Model, package | package |
| Block, actor | part def |
| Value type, data type, enumeration | attribute def, enum def (value types with a known SI unit specialize the ISQ quantity) |
| Signal | item def |
| Interface block | port def |
| Part, reference and value properties | part, ref part, attribute, with multiplicities and default values |
| Proxy port, flow property | port, in/out item or attribute |
| Full port | part with @SysMLv1Library::PortData |
| Connector, binding connector, item flow | connect, bind, flow |
| Generalization | :> |
| Activity, call behavior action, pins | action def, action, parameters |
| Control and object flows, guards | successions with if guards and else, flows between parameters |
| Initial, final, decision, merge, fork, join | start, done, decide, merge, fork, join |
| State machine, states, regions | state def, state, parallel states |
| Transitions, signal and time triggers | transition with accept, accept after, guards and effects |
| Interaction | occurrence def with lifelines and messages |
| Use case, subject, include | use case def, subject, include |
| Requirement (id and text) | requirement <'id'> Name { doc /* text */ } |
| Satisfy, verify, derive requirement | satisfy, verify in a verification objective, derivation connection |
| Refine, trace | dependency with SysMLv1Library metadata |
| Allocate, dependency | allocate, dependency |
| Constraint block, constraint | constraint def, assert constraint |
| Stereotypes and tagged values | metadata def per stereotype, applied with its tags |
| Comment, documentation | doc, comment |
Limits
- One file of at most 64 MB.
- At most 250,000 elements, nested at most 512 levels deep. Deeper elements are left out with the reason nesting.
- The converted text is at most 8 MB.
- Diagrams and their layout are not converted. Create views in the SysML v2 project.
Messages
| Message | What to do |
|---|---|
| Import one SysML v1 XMI file at a time, without other files. | Import the XMI file on its own. |
| <file> holds no UML or SysML elements. Export the model as XMI 2.x and import it again. | Export the model again as XMI 2.x. |
| No UML model was found in <file>. In Cameo or MagicDraw, export the model as Eclipse UML2 XMI and import the .xmi file. | Export the project as XMI. |
| The SysML v1 model has more than 250,000 elements. Export a smaller part of the model. | Export one package at a time. |
| The converted SysML v2 text would be larger than 8 MB. Export a smaller part of the model. | Export one package at a time. |
Related pages
SysML® and OMG® are registered trademarks of Object Management Group, Inc. in the United States and other countries.