Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL plugin out with missing xmi:id
ATL plugin out with missing xmi:id [message #1811205] Wed, 28 August 2019 16:11 Go to next message
Khoa Nguyen is currently offline Khoa NguyenFriend
Messages: 7
Registered: May 2019
Junior Member
Hi there,

I am creating an ATL plugin for my ATL transformation rule. The ATL transformation works fine when I run it directly. However, the output is not the same when I run the ATL plugin. The xmi:id is missing.

I found another topic has the same problem. https://www.eclipse.org/forums/index.php/t/368008/

I tried to output the file will extension .uml, but it doesn't work for me.

Does anyone have the solution to this problem?

Thank you.
Khoa

Output when running directly
<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_6kWp8MmtEemLVbbs1T0jWw" name="RootElement">
  <packagedElement xmi:type="uml:Activity" xmi:id="_6kWp8cmtEemLVbbs1T0jWw" name="Cascading Diagram" node="_6kWqBMmtEemLVbbs1T0jWw _6kWqBcmtEemLVbbs1T0jWw _6kWqBsmtEemLVbbs1T0jWw _6kWqB8mtEemLVbbs1T0jWw _6kWqCcmtEemLVbbs1T0jWw _6kWqC8mtEemLVbbs1T0jWw _6kWqDcmtEemLVbbs1T0jWw">
    <ownedRule xmi:id="_6kWp8smtEemLVbbs1T0jWw" name="ByPassAuthentication" constrainedElement="_6kWqB8mtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp88mtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <ownedRule xmi:id="_6kWp9MmtEemLVbbs1T0jWw" name="AccessPasswordInformation" constrainedElement="_6kWqC8mtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp9cmtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <ownedRule xmi:id="_6kWp9smtEemLVbbs1T0jWw" name="RemoteAccess" constrainedElement="_6kWqDcmtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp98mtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <ownedRule xmi:id="_6kWp-MmtEemLVbbs1T0jWw" name="AccessPasswordInformation" constrainedElement="_6kWqCcmtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp-cmtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <ownedRule xmi:id="_6kWp-smtEemLVbbs1T0jWw" name="RemoteAccess" constrainedElement="_6kWqCcmtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp-8mtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <ownedRule xmi:id="_6kWp_MmtEemLVbbs1T0jWw" name="ByPassAuthentication" constrainedElement="_6kWqDcmtEemLVbbs1T0jWw">
      <specification xmi:type="uml:LiteralString" xmi:id="_6kWp_cmtEemLVbbs1T0jWw" name="constraintSpec"/>
    </ownedRule>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWp_smtEemLVbbs1T0jWw" target="_6kWqBMmtEemLVbbs1T0jWw" source="_6kWqB8mtEemLVbbs1T0jWw"/>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWp_8mtEemLVbbs1T0jWw" target="_6kWqBcmtEemLVbbs1T0jWw" source="_6kWqCcmtEemLVbbs1T0jWw"/>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWqAMmtEemLVbbs1T0jWw" target="_6kWqBsmtEemLVbbs1T0jWw" source="_6kWqBcmtEemLVbbs1T0jWw"/>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWqAcmtEemLVbbs1T0jWw" target="_6kWqBsmtEemLVbbs1T0jWw" source="_6kWqC8mtEemLVbbs1T0jWw"/>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWqAsmtEemLVbbs1T0jWw" target="_6kWqBsmtEemLVbbs1T0jWw" source="_6kWqDcmtEemLVbbs1T0jWw"/>
    <edge xmi:type="uml:ControlFlow" xmi:id="_6kWqA8mtEemLVbbs1T0jWw" target="_6kWqBMmtEemLVbbs1T0jWw" source="_6kWqBsmtEemLVbbs1T0jWw"/>
    <node xmi:type="uml:OpaqueAction" xmi:id="_6kWqBMmtEemLVbbs1T0jWw" name="automaticControlLights" incoming="_6kWp_smtEemLVbbs1T0jWw _6kWqA8mtEemLVbbs1T0jWw"/>
    <node xmi:type="uml:OpaqueAction" xmi:id="_6kWqBcmtEemLVbbs1T0jWw" name="manageEnergy" incoming="_6kWp_8mtEemLVbbs1T0jWw" outgoing="_6kWqAMmtEemLVbbs1T0jWw"/>
    <node xmi:type="uml:OpaqueAction" xmi:id="_6kWqBsmtEemLVbbs1T0jWw" name="automaticControlHVAC" incoming="_6kWqAMmtEemLVbbs1T0jWw _6kWqAcmtEemLVbbs1T0jWw _6kWqAsmtEemLVbbs1T0jWw" outgoing="_6kWqA8mtEemLVbbs1T0jWw"/>
    <node xmi:type="uml:DataStoreNode" xmi:id="_6kWqB8mtEemLVbbs1T0jWw" name="CrossSiteScripting" outgoing="_6kWp_smtEemLVbbs1T0jWw">
      <upperBound xmi:type="uml:LiteralInteger" xmi:id="_6kWqCMmtEemLVbbs1T0jWw" value="1"/>
    </node>
    <node xmi:type="uml:DataStoreNode" xmi:id="_6kWqCcmtEemLVbbs1T0jWw" name="WeakAuthentication" outgoing="_6kWp_8mtEemLVbbs1T0jWw">
      <upperBound xmi:type="uml:LiteralInteger" xmi:id="_6kWqCsmtEemLVbbs1T0jWw" value="1"/>
    </node>
    <node xmi:type="uml:DataStoreNode" xmi:id="_6kWqC8mtEemLVbbs1T0jWw" name="DirectoryTraversal" outgoing="_6kWqAcmtEemLVbbs1T0jWw">
      <upperBound xmi:type="uml:LiteralInteger" xmi:id="_6kWqDMmtEemLVbbs1T0jWw" value="1"/>
    </node>
    <node xmi:type="uml:DataStoreNode" xmi:id="_6kWqDcmtEemLVbbs1T0jWw" name="PrivilageEscalation" outgoing="_6kWqAsmtEemLVbbs1T0jWw">
      <upperBound xmi:type="uml:LiteralInteger" xmi:id="_6kWqDsmtEemLVbbs1T0jWw" value="1"/>
    </node>
  </packagedElement>
  <profileApplication xmi:id="_6kWqD8mtEemLVbbs1T0jWw">
    <eAnnotations xmi:id="_6kWqEMmtEemLVbbs1T0jWw" source="http://www.eclipse.org/uml2/2.0.0/UML">
      <references xmi:type="ecore:EPackage" href="../../papyrus/model.profile.uml#_u-FDIIptEeeu3I3Ux8sNCA"/>
    </eAnnotations>
    <appliedProfile href="../../papyrus/model.profile.uml#_1l53oHuuEeaCbZfBuAtPqA"/>
  </profileApplication>
</uml:Model>


Output with ATL plugin
<?xml version="1.0" encoding="ISO-8859-1"?>
<uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" name="RootElement">
  <packagedElement xsi:type="uml:Activity" name="Cascading Diagram">
    <ownedRule name="ByPassAuthentication" constrainedElement="//Cascading%20Diagram/CrossSiteScripting">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <ownedRule name="AccessPasswordInformation" constrainedElement="//Cascading%20Diagram/DirectoryTraversal">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <ownedRule name="RemoteAccess" constrainedElement="//Cascading%20Diagram/PrivilageEscalation">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <ownedRule name="AccessPasswordInformation" constrainedElement="//Cascading%20Diagram/WeakAuthentication">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <ownedRule name="RemoteAccess" constrainedElement="//Cascading%20Diagram/WeakAuthentication">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <ownedRule name="ByPassAuthentication" constrainedElement="//Cascading%20Diagram/PrivilageEscalation">
      <specification xsi:type="uml:LiteralString" name="constraintSpec"/>
    </ownedRule>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/automaticControlLights" source="//Cascading%20Diagram/CrossSiteScripting"/>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/manageEnergy" source="//Cascading%20Diagram/WeakAuthentication"/>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/automaticControlHVAC" source="//Cascading%20Diagram/manageEnergy"/>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/automaticControlHVAC" source="//Cascading%20Diagram/DirectoryTraversal"/>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/automaticControlHVAC" source="//Cascading%20Diagram/PrivilageEscalation"/>
    <edge xsi:type="uml:ControlFlow" target="//Cascading%20Diagram/automaticControlLights" source="//Cascading%20Diagram/automaticControlHVAC"/>
    <ownedNode xsi:type="uml:OpaqueAction" name="automaticControlLights" incoming="//Cascading%20Diagram/@edge.0 //Cascading%20Diagram/@edge.5"/>
    <ownedNode xsi:type="uml:OpaqueAction" name="manageEnergy" incoming="//Cascading%20Diagram/@edge.1" outgoing="//Cascading%20Diagram/@edge.2"/>
    <ownedNode xsi:type="uml:OpaqueAction" name="automaticControlHVAC" incoming="//Cascading%20Diagram/@edge.2 //Cascading%20Diagram/@edge.3 //Cascading%20Diagram/@edge.4" outgoing="//Cascading%20Diagram/@edge.5"/>
    <ownedNode xsi:type="uml:DataStoreNode" name="CrossSiteScripting" outgoing="//Cascading%20Diagram/@edge.0">
      <upperBound xsi:type="uml:LiteralInteger" value="1"/>
    </ownedNode>
    <ownedNode xsi:type="uml:DataStoreNode" name="WeakAuthentication" outgoing="//Cascading%20Diagram/@edge.1">
      <upperBound xsi:type="uml:LiteralInteger" value="1"/>
    </ownedNode>
    <ownedNode xsi:type="uml:DataStoreNode" name="DirectoryTraversal" outgoing="//Cascading%20Diagram/@edge.3">
      <upperBound xsi:type="uml:LiteralInteger" value="1"/>
    </ownedNode>
    <ownedNode xsi:type="uml:DataStoreNode" name="PrivilageEscalation" outgoing="//Cascading%20Diagram/@edge.4">
      <upperBound xsi:type="uml:LiteralInteger" value="1"/>
    </ownedNode>
  </packagedElement>
  <profileApplication>
    <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
      <references href="../../../../git/energy/papyrus/model.profile.uml#_u-FDIIptEeeu3I3Ux8sNCA"/>
    </eAnnotations>
    <appliedProfile href="../../../../git/energy/papyrus/model.profile.uml#_1l53oHuuEeaCbZfBuAtPqA"/>
  </profileApplication>
</uml:Model>


Re: ATL plugin out with missing xmi:id [message #1811257 is a reply to message #1811205] Thu, 29 August 2019 15:28 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

Check what kind of EMF Resource class for the output model is instantiated by your plug-in. If it creates an XMIResourceImpl, you will have this problem, and you should try to use a UMLResourceImpl instead.

Cheers,
Dennis
Re: ATL plugin out with missing xmi:id [message #1814099 is a reply to message #1811257] Tue, 03 September 2019 16:07 Go to previous message
Khoa Nguyen is currently offline Khoa NguyenFriend
Messages: 7
Registered: May 2019
Junior Member
Hi Dennis,

Thank you very much. I fixed the problem.
I added this code to the constructor.

Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("uml", new UMLResourceFactoryImpl());
Previous Topic:Multiple values for the source pattern
Next Topic:ATL 4.1.0 has been released!
Goto Forum:
  


Current Time: Sat Nov 11 08:18:22 GMT 2023

Powered by FUDForum. Page generated in 0.02742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top