Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-user] Rule application via GUI ->OK, via API -> error

Hello everyone,

I want to do manipulations of UML state machines using UML stereotypes.

I actually have a problem: a given transformation rule runs fine if I apply it using the GUI (right-click on the transformation file with "Henshin->Apply Transformation", but if I apply the rule using the Henshin API, it fails (the execute method of RuleApplication returns false).

My test UML model features a state machine which also has a transition called "hier" and the stereotype "ensureRole" attached, as requested.

My code works fine with other transformation models. The error only occurs when *deleting* the stereotype. I just need to change the action to *create* and the rule instantly can be executed without errors.

I created a fresh Henshin transformation model (see attachement). The problem persists. Setting checkDangling to false makes no difference either.



Any suggestions?

Jens
--
Dipl.-Inf Jens Bürger
University of Koblenz-Landau
Institute for Software Technology
RG Prof. Dr. Jan Jürjens

Phone: +49 261 287-2705
Fax:   +49 261 287-100 2705

<?xml version="1.0" encoding="UTF-8"?>
<henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin"; xmi:id="_OVTFAHiiEeWfKqonr0przQ">
  <imports href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
  <imports href="../../CompsacCS/profile/ensurerole.profile.uml#_HnIKwF3xEeW3he1vTII4YA"/>
  <units xsi:type="henshin:Rule" xmi:id="_o4G1UHiiEeWfKqonr0przQ" name="testrule">
    <lhs xmi:id="_o4JRkHiiEeWfKqonr0przQ" name="Lhs">
      <nodes xmi:id="_qizckHiiEeWfKqonr0przQ" incoming="_A-p-kHijEeWfKqonr0przQ">
        <type href="http://www.eclipse.org/uml2/5.0.0/UML#//Transition"/>
        <attributes xmi:id="_tMSnUHiiEeWfKqonr0przQ" value="&quot;hier&quot;">
          <type href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
        </attributes>
      </nodes>
      <nodes xmi:id="__wQ40HiiEeWfKqonr0przQ" outgoing="_A-p-kHijEeWfKqonr0przQ">
        <type href="../profiles/ensurerole.profile.uml#_HnIKwV3xEeW3he1vTII4YA"/>
      </nodes>
      <edges xmi:id="_A-p-kHijEeWfKqonr0przQ" source="__wQ40HiiEeWfKqonr0przQ" target="_qizckHiiEeWfKqonr0przQ">
        <type href="../profiles/ensurerole.profile.uml#_HnIKw13xEeW3he1vTII4YA"/>
      </edges>
    </lhs>
    <rhs xmi:id="_o4JRkXiiEeWfKqonr0przQ" name="Rhs">
      <nodes xmi:id="_rZQjcHiiEeWfKqonr0przQ">
        <type href="http://www.eclipse.org/uml2/5.0.0/UML#//Transition"/>
        <attributes xmi:id="_tMSnUXiiEeWfKqonr0przQ" value="&quot;hier&quot;">
          <type href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
        </attributes>
      </nodes>
    </rhs>
    <mappings xmi:id="_rZQjcXiiEeWfKqonr0przQ" origin="_qizckHiiEeWfKqonr0przQ" image="_rZQjcHiiEeWfKqonr0przQ"/>
  </units>
</henshin:Module>

<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin"; xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation"; xmi:id="_OVXWcHiiEeWfKqonr0przQ" type="Henshin" name="stereotest.henshin_diagram" measurementUnit="Pixel">
  <children xmi:type="notation:Shape" xmi:id="_o4HcYHiiEeWfKqonr0przQ" type="2001" fontName="Ubuntu" italic="true" lineColor="0">
    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_p_Z0kniiEeWfKqonr0przQ" source="defaultAction">
      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_p_Z0k3iiEeWfKqonr0przQ" key="value" value="delete"/>
    </eAnnotations>
    <children xmi:type="notation:DecorationNode" xmi:id="_o4IDcHiiEeWfKqonr0przQ" type="5001"/>
    <children xmi:type="notation:DecorationNode" xmi:id="_o4IDcXiiEeWfKqonr0przQ" type="7001">
      <children xmi:type="notation:Shape" xmi:id="_qi140HiiEeWfKqonr0przQ" type="3001" fontName="Ubuntu">
        <children xmi:type="notation:DecorationNode" xmi:id="_qi140niiEeWfKqonr0przQ" type="5002"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_qi1403iiEeWfKqonr0przQ" type="5003"/>
        <children xmi:type="notation:DecorationNode" xmi:id="_qi141HiiEeWfKqonr0przQ" type="7002">
          <children xmi:type="notation:Node" xmi:id="_tMWRsHiiEeWfKqonr0przQ" type="3002">
            <element xmi:type="henshin:Attribute" href="stereotest.henshin#_tMSnUHiiEeWfKqonr0przQ"/>
            <layoutConstraint xmi:type="notation:Location" xmi:id="_tMWRsXiiEeWfKqonr0przQ"/>
          </children>
          <styles xmi:type="notation:SortingStyle" xmi:id="_qi141XiiEeWfKqonr0przQ"/>
          <styles xmi:type="notation:FilteringStyle" xmi:id="_qi141niiEeWfKqonr0przQ"/>
        </children>
        <element xmi:type="henshin:Node" href="stereotest.henshin#_qizckHiiEeWfKqonr0przQ"/>
        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qi140XiiEeWfKqonr0przQ" x="190" y="9"/>
      </children>
      <children xmi:type="notation:Shape" xmi:id="__wSG8HiiEeWfKqonr0przQ" type="3001" fontName="Ubuntu">
        <children xmi:type="notation:DecorationNode" xmi:id="__wSG8niiEeWfKqonr0przQ" type="5002"/>
        <children xmi:type="notation:DecorationNode" xmi:id="__wSG83iiEeWfKqonr0przQ" type="5003"/>
        <children xmi:type="notation:DecorationNode" xmi:id="__wSG9HiiEeWfKqonr0przQ" type="7002">
          <styles xmi:type="notation:SortingStyle" xmi:id="__wSG9XiiEeWfKqonr0przQ"/>
          <styles xmi:type="notation:FilteringStyle" xmi:id="__wSG9niiEeWfKqonr0przQ"/>
        </children>
        <element xmi:type="henshin:Node" href="stereotest.henshin#__wQ40HiiEeWfKqonr0przQ"/>
        <layoutConstraint xmi:type="notation:Bounds" xmi:id="__wSG8XiiEeWfKqonr0przQ" x="30" y="83"/>
      </children>
    </children>
    <element xmi:type="henshin:Rule" href="stereotest.henshin#_o4G1UHiiEeWfKqonr0przQ"/>
    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_o4HcYXiiEeWfKqonr0przQ" x="125" y="95"/>
  </children>
  <styles xmi:type="notation:DiagramStyle" xmi:id="_OVXWcXiiEeWfKqonr0przQ"/>
  <element xmi:type="henshin:Module" href="stereotest.henshin#_OVTFAHiiEeWfKqonr0przQ"/>
  <edges xmi:type="notation:Connector" xmi:id="_A-qloHijEeWfKqonr0przQ" type="4001" source="__wSG8HiiEeWfKqonr0przQ" target="_qi140HiiEeWfKqonr0przQ">
    <children xmi:type="notation:DecorationNode" xmi:id="_A-qlo3ijEeWfKqonr0przQ" type="6001">
      <layoutConstraint xmi:type="notation:Location" xmi:id="_A-qlpHijEeWfKqonr0przQ" y="40"/>
    </children>
    <children xmi:type="notation:DecorationNode" xmi:id="_A-qlpXijEeWfKqonr0przQ" type="6002">
      <layoutConstraint xmi:type="notation:Location" xmi:id="_A-qlpnijEeWfKqonr0przQ" y="60"/>
    </children>
    <styles xmi:type="notation:FontStyle" xmi:id="_A-qloXijEeWfKqonr0przQ" fontName="Ubuntu"/>
    <element xmi:type="henshin:Edge" href="stereotest.henshin#_A-p-kHijEeWfKqonr0przQ"/>
    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_A-qlonijEeWfKqonr0przQ" points="[35, -17, -139, 54]$[125, -76, -49, -5]"/>
  </edges>
</notation:Diagram>


Back to the top