Book a Demo

Author Topic: Problem with triggers when importing an xmi  (Read 3259 times)

Michele_Dorigatti

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Problem with triggers when importing an xmi
« on: January 24, 2012, 01:01:26 am »
Hi!

I am trying to visualize a finite state machine with EA 9.0 by importing an xmi. I can see everthing, but not the triggers. Does someone knows how to do?
Thank you in advance for your time.
My xmi sounds like this:

?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
  <uml:Model xmi:type="uml:Model" name="EA_Model" >
    <uml:Package xmi:type="uml:Package" xmi:id="pkg1" name="ok" >
      <uml:StateMachine xmi:type="uml:StateMachine" xmi:id="fsm1" name="EA_StateMachine1" >
        <subvertex xmi:type="uml:State" xmi:id="st1" name="State1"/>
        <transition xmi:type="uml:Transition" xmi:id="tr1" source="st1" target="st1" >
          <trigger xmi:type="uml:Trigger" xmi:id="trig1" name="label" />
          </transition>
      </uml:StateMachine>
    </uml:Package>
  </uml:Model>
</xmi:XMI>

This is the log of the import:

Importing Model from XMI
Root Package: ok
Add Classifier: EA_StateMachine1
Add Classifier: State1
Resolving Classifiers
Resolving Owners
Resolving Attribute Types
Resolving Parameter Types
Resolving Association-Classes
Resolving InteractionOccurences
Fixup external references
Import Complete!
« Last Edit: January 24, 2012, 01:05:55 am by micheledorigatti2 »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with triggers when importing an xmi
« Reply #1 on: January 24, 2012, 05:52:11 pm »
Have you tried modelling the required result in EA and then exporting it to xmi?
That should give you a good idea of what EA is expecting.

Geert

Michele_Dorigatti

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Problem with triggers when importing an xmi
« Reply #2 on: January 24, 2012, 08:22:10 pm »
Of course!
I succeded in visualizing the triggers, but only keeping some EA extension, that I prefer to avoid.
This the ugly working code:

<?xml version="1.0" encoding="windows-1252"?>
<xmi:XMI xmi:version="2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
  <xmi:Documentation exporter="Enterprise Architect" exporterVersion="6.5"/>
  <uml:Model xmi:type="uml:Model" name="EA_Model" >
    <uml:Package xmi:type="uml:Package" xmi:id="pkg1" name="ok" >
      <uml:StateMachine xmi:type="uml:StateMachine" xmi:id="fsm1" name="EA_StateMachine1" >
      <subvertex xmi:type="uml:State" xmi:id="st1" name="State1"/>
      <transition xmi:type="uml:Transition" xmi:id="tr1" source="st1" target="st1">
        <trigger xmi:type="uml:Trigger" xmi:id="trig1" name="label" />
      </transition>
      </uml:StateMachine>
    </uml:Package>
  </uml:Model>
  <xmi:Extension extender="Enterprise Architect" extenderID="6.5">
    <diagrams>
      <diagram xmi:id="di1">
      <model package="pkg1" owner="pkg1"/>
      <element subject="st1"/>
      </diagram>
    </diagrams>
  </xmi:Extension>
</xmi:XMI>