Codegen CDT integration

Generate tag for user code section based on qualified name not using the
xmi ids. 
Added generated source builder to injest any code changes back to uml
model.

 

Change-Id: I9297fee16116189c3e21dda386bc733ca8f35308
Signed-off-by: ysroh <ysroh@zeligsoft.com>
diff --git a/models/samples/ComputerSystem/ComputerSystem.uml b/models/samples/ComputerSystem/ComputerSystem.uml
index df42b46..95c96a4 100644
--- a/models/samples/ComputerSystem/ComputerSystem.uml
+++ b/models/samples/ComputerSystem/ComputerSystem.uml
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:RTCppProperties="http://www.eclipse.org/papyrus/umlrt/cppproperties" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:UMLRealTimeStateMach="http://www.eclipse.org/papyrus/umlrt/statemachine" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
   <uml:Model xmi:id="_YSrkcH_6EeSOLqU6j-e_hg" name="ComputerSystem">
-    <ownedComment xmi:type="uml:Comment" xmi:id="_CJt34BB2EeWr3Pbi51wSsA">
+    <ownedComment xmi:id="_CJt34BB2EeWr3Pbi51wSsA">
       <body>Open diagram &quot;CSD | Top&quot; for structure exploration.</body>
     </ownedComment>
-    <packageImport xmi:type="uml:PackageImport" xmi:id="_pl3jgH_6EeSOLqU6j-e_hg">
+    <packageImport xmi:id="_pl3jgH_6EeSOLqU6j-e_hg">
       <importedPackage xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
     </packageImport>
-    <packageImport xmi:type="uml:PackageImport" xmi:id="_p7pmQH_6EeSOLqU6j-e_hg">
+    <packageImport xmi:id="_p7pmQH_6EeSOLqU6j-e_hg">
       <importedPackage xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/UMLRealTimeSM-addendum.profile.uml#_KLcn0FDtEeOA4ecmvfqvaw"/>
     </packageImport>
-    <packageImport xmi:type="uml:PackageImport" xmi:id="_0MfxQIB5EeSeANT-DfY5oA">
+    <packageImport xmi:id="_0MfxQIB5EeSeANT-DfY5oA">
       <importedPackage xmi:type="uml:Model" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_DV8nkBv8EduZN5aJJITI5w"/>
     </packageImport>
     <packagedElement xmi:type="uml:Package" xmi:id="_PlgQIICCEeSeANT-DfY5oA" name="Computer">
       <packagedElement xmi:type="uml:Class" xmi:id="_fMulcH_6EeSOLqU6j-e_hg" name="Computer" classifierBehavior="_2cxfEICrEeSYmJvm6id8mw" isActive="true">
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_p_mqAIB6EeSeANT-DfY5oA" name="usbBus" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="shared">
+        <ownedAttribute xmi:id="_p_mqAIB6EeSeANT-DfY5oA" name="usbBus" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="shared">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_p_mqAYB6EeSeANT-DfY5oA"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_p_mqAoB6EeSeANT-DfY5oA" value="2"/>
         </ownedAttribute>
@@ -25,7 +25,7 @@
         <ownedAttribute xmi:type="uml:Port" xmi:id="_NFL2YICsEeSYmJvm6id8mw" name="timer" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_UiB-AIFSEeSxK_Fl3WspFw" name="timerId" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_UiB-AIFSEeSxK_Fl3WspFw" name="timerId" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6qkTMGXmEeS_4daqvwyFrg"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_oyJrcIFWEeSxK_Fl3WspFw" name="usbPort" visibility="public" type="_6tx6sIB-EeSeANT-DfY5oA" aggregation="composite" isConjugated="true">
@@ -33,254 +33,238 @@
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_lIcaYMOwEeSxS9_G15_gSg" value="2"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_m1ajcMO5EeSxS9_G15_gSg" name="userPort" type="_vOIpQMO2EeSxS9_G15_gSg" aggregation="composite"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_EFn4sMO7EeSxS9_G15_gSg" name="driverManager" visibility="protected" type="_2WM7UMO6EeSxS9_G15_gSg" aggregation="composite"/>
+        <ownedAttribute xmi:id="_EFn4sMO7EeSxS9_G15_gSg" name="driverManager" visibility="protected" type="_2WM7UMO6EeSxS9_G15_gSg" aggregation="composite"/>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_yYoMwMXOEeSsD5C2f30z-g" name="resMgr" visibility="protected" type="_sSppwMQdEeSirL7ina4YrA" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="true" isService="false"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_Q9Z2oMbgEeSvmLj5mtpd2g" name="printerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_Q9Z2oMbgEeSvmLj5mtpd2g" name="printerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_YyYO0MbgEeSvmLj5mtpd2g" name="storageID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_YyYO0MbgEeSvmLj5mtpd2g" name="storageID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_c8b1UOqLEeSlmKRr_VnIAg" name="application" visibility="protected" type="_N2fr8MOyEeSxS9_G15_gSg" aggregation="composite">
+        <ownedAttribute xmi:id="_c8b1UOqLEeSlmKRr_VnIAg" name="application" visibility="protected" type="_N2fr8MOyEeSxS9_G15_gSg" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_EcxMAOqMEeSlmKRr_VnIAg" value="1"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_EcxzEOqMEeSlmKRr_VnIAg" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_lz0-ABUjEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_lz0-ABUjEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_c-lZQC_KEeW9MYT2X2gffg" name="dummy">
+        <ownedAttribute xmi:id="_c-lZQC_KEeW9MYT2X2gffg" name="dummy">
           <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
         </ownedAttribute>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_SHmf8MXPEeSsD5C2f30z-g" name="Connector3">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_SHnHAMXPEeSsD5C2f30z-g" partWithPort="_EFn4sMO7EeSxS9_G15_gSg" role="_pCSIcMXOEeSsD5C2f30z-g">
+        <ownedConnector xmi:id="_SHmf8MXPEeSsD5C2f30z-g" name="Connector3">
+          <end xmi:id="_SHnHAMXPEeSsD5C2f30z-g" partWithPort="_EFn4sMO7EeSxS9_G15_gSg" role="_pCSIcMXOEeSsD5C2f30z-g">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_SHnHAcXPEeSsD5C2f30z-g" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_SHnHAsXPEeSsD5C2f30z-g" value="1"/>
           </end>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_SHnuEMXPEeSsD5C2f30z-g" role="_yYoMwMXOEeSsD5C2f30z-g">
+          <end xmi:id="_SHnuEMXPEeSsD5C2f30z-g" role="_yYoMwMXOEeSsD5C2f30z-g">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_SHnuEcXPEeSsD5C2f30z-g" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_SHnuEsXPEeSsD5C2f30z-g" value="1"/>
           </end>
         </ownedConnector>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_AtlvEOqNEeSlmKRr_VnIAg" name="Connector4">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_AtoyYOqNEeSlmKRr_VnIAg" role="_m1ajcMO5EeSxS9_G15_gSg"/>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_AtpZcOqNEeSlmKRr_VnIAg" partWithPort="_c8b1UOqLEeSlmKRr_VnIAg" role="_5Gm08MYAEeSsD5C2f30z-g"/>
+        <ownedConnector xmi:id="_AtlvEOqNEeSlmKRr_VnIAg" name="Connector4">
+          <end xmi:id="_AtoyYOqNEeSlmKRr_VnIAg" role="_m1ajcMO5EeSxS9_G15_gSg"/>
+          <end xmi:id="_AtpZcOqNEeSlmKRr_VnIAg" partWithPort="_c8b1UOqLEeSlmKRr_VnIAg" role="_5Gm08MYAEeSsD5C2f30z-g"/>
         </ownedConnector>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_BzuQsOqNEeSlmKRr_VnIAg" name="Connector5">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_Bzu3wOqNEeSlmKRr_VnIAg" partWithPort="_c8b1UOqLEeSlmKRr_VnIAg" role="_JKtYAMQPEeSirL7ina4YrA"/>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_Bzve0OqNEeSlmKRr_VnIAg" partWithPort="_EFn4sMO7EeSxS9_G15_gSg" role="_w7EMQMbDEeSvmLj5mtpd2g"/>
+        <ownedConnector xmi:id="_BzuQsOqNEeSlmKRr_VnIAg" name="Connector5">
+          <end xmi:id="_Bzu3wOqNEeSlmKRr_VnIAg" partWithPort="_c8b1UOqLEeSlmKRr_VnIAg" role="_JKtYAMQPEeSirL7ina4YrA"/>
+          <end xmi:id="_Bzve0OqNEeSlmKRr_VnIAg" partWithPort="_EFn4sMO7EeSxS9_G15_gSg" role="_w7EMQMbDEeSvmLj5mtpd2g"/>
         </ownedConnector>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_MWa08O1iEeSNVueSbviXfA" name="Connector6">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_MWfGYO1iEeSNVueSbviXfA" partWithPort="_p_mqAIB6EeSeANT-DfY5oA" role="_ui7KkICCEeSeANT-DfY5oA"/>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_MWftcO1iEeSNVueSbviXfA" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
+        <ownedConnector xmi:id="_MWa08O1iEeSNVueSbviXfA" name="Connector6">
+          <end xmi:id="_MWfGYO1iEeSNVueSbviXfA" partWithPort="_p_mqAIB6EeSeANT-DfY5oA" role="_ui7KkICCEeSeANT-DfY5oA"/>
+          <end xmi:id="_MWftcO1iEeSNVueSbviXfA" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
         </ownedConnector>
         <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_2cxfEICrEeSYmJvm6id8mw" name="Computer_SM" isReentrant="false">
-          <region xmi:type="uml:Region" xmi:id="_3ifJ8ICrEeSYmJvm6id8mw" name="Region1">
-            <transition xmi:type="uml:Transition" xmi:id="_oEwucMYJEeSsD5C2f30z-g" name="Initialise" source="_75RkAICrEeSYmJvm6id8mw" target="_JoagwMYJEeSsD5C2f30z-g">
+          <region xmi:id="_3ifJ8ICrEeSYmJvm6id8mw" name="Region1">
+            <transition xmi:id="_oEwucMYJEeSsD5C2f30z-g" name="Initialise" source="_75RkAICrEeSYmJvm6id8mw" target="_JoagwMYJEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_3U_ckMbgEeSvmLj5mtpd2g" name="initializing">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_YgBNUO4NEeSAlbC0LA6o5Q" name="onResMgrRunning" source="_JoagwMYJEeSsD5C2f30z-g" target="_gMdQYO4UEeSJPsWo_Mnp3w">
+            <transition xmi:id="_YgBNUO4NEeSAlbC0LA6o5Q" name="onResMgrRunning" source="_JoagwMYJEeSsD5C2f30z-g" target="_gMdQYO4UEeSJPsWo_Mnp3w">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Lk1o8O4QEeSJPsWo_Mnp3w" name="resMgrRunning">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;::{resMgrRunning}] is now accepting requests &quot;;
-
-if ( resMgr.requestPrinterDriver().send() ) {
-	std::cout &lt;&lt; &quot; -- requesting for a printer driver.&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; -- FAILed to request a printer driver!&quot; &lt;&lt; std::endl;
-}
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;::{resMgrRunning}] is now accepting requests &quot;;
+    if ( resMgr.requestPrinterDriver().send() ) {
+    std::cout &lt;&lt; &quot; -- requesting for a printer driver.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; -- FAILed to request a printer driver!&quot; &lt;&lt; std::endl;
+    }
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_-4G3oO4PEeSJPsWo_Mnp3w" name="onResMgr_resMgrRunning" event="_zJOOoO4PEeSJPsWo_Mnp3w" port="_yYoMwMXOEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_-4G3oO4PEeSJPsWo_Mnp3w" name="onResMgr_resMgrRunning" event="_zJOOoO4PEeSJPsWo_Mnp3w" port="_yYoMwMXOEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_AGqnYO4OEeSAlbC0LA6o5Q" name="EX_InitUSB_Continuation" source="_KlKcAO4NEeSAlbC0LA6o5Q" target="_5D02wO4NEeSAlbC0LA6o5Q"/>
+            <transition xmi:id="_AGqnYO4OEeSAlbC0LA6o5Q" name="EX_InitUSB_Continuation" source="_KlKcAO4NEeSAlbC0LA6o5Q" target="_5D02wO4NEeSAlbC0LA6o5Q"/>
             <subvertex xmi:type="uml:Pseudostate" xmi:id="_75RkAICrEeSYmJvm6id8mw" name="Initial1"/>
             <subvertex xmi:type="uml:State" xmi:id="_JoagwMYJEeSsD5C2f30z-g" name="WaitForResourceManager">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_t4bf4O4OEeSAlbC0LA6o5Q" name="waitForResMgr">
                 <language>C++</language>
-                <body>time_t currentTime ;&#xD;
-struct tm *localTime;&#xD;
-time( &amp;currentTime );&#xD;
-localTime = localtime( &amp;currentTime );&#xD;
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;&#xD;
-&#xD;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitForResourceManager}, waiting for resource manager initalization&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime ;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitForResourceManager}, waiting for resource manager initalization&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_rcvLcO4MEeSAlbC0LA6o5Q" name="InitUSBBus">
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_KlKcAO4NEeSAlbC0LA6o5Q" name="EX_initUSB" kind="exitPoint"/>
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_gMdQYO4UEeSJPsWo_Mnp3w" name="EN_initUSB" kind="entryPoint"/>
+              <connectionPoint xmi:id="_KlKcAO4NEeSAlbC0LA6o5Q" name="EX_initUSB" kind="exitPoint"/>
+              <connectionPoint xmi:id="_gMdQYO4UEeSJPsWo_Mnp3w" name="EN_initUSB" kind="entryPoint"/>
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_E2O74A7eEeWWHqV5N_7gJQ" name="initUSBBus">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {InitUSBBus}, waiting for the USB bus to be initialized.&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {InitUSBBus}, waiting for the USB bus to be initialized.&quot; &lt;&lt; std::endl;
+</body>
               </entry>
-              <region xmi:type="uml:Region" xmi:id="_FtPDwe4NEeSAlbC0LA6o5Q" name="Region1">
-                <transition xmi:type="uml:Transition" xmi:id="_ELcfsMbjEeSvmLj5mtpd2g" name="onPrintResourceID" source="_HrCd8MbhEeSvmLj5mtpd2g" target="_Bt8igMbjEeSvmLj5mtpd2g">
+              <region xmi:id="_FtPDwe4NEeSAlbC0LA6o5Q" name="Region1">
+                <transition xmi:id="_ELcfsMbjEeSvmLj5mtpd2g" name="onPrintResourceID" source="_HrCd8MbhEeSvmLj5mtpd2g" target="_Bt8igMbjEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_ekrn0MbkEeSvmLj5mtpd2g" name="importPrinterDriver_requestStorageDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
-
-if ( timer.cancelTimer( timerId ) ) {
-	std::cout &lt;&lt; &quot;timer canceled&quot;;
-} else {
-	std::cout &lt;&lt; &quot;ERROR canceling timer&quot;;
-}
-
-printerID = (UMLRTCapsuleId) *rtdata;
-
-if ( printerID.isValid() ) {
-	if ( frame.import( printerID, usbBus,  0) ) {
-		std::cout &lt;&lt; &quot; and successfully imported the printer driver&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; and FAILed to import the printer driver&quot; &lt;&lt; std::endl;
-	}
-} else {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] and received an INVALID printerID!&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
+    if ( timer.cancelTimer( timerId ) ) {
+    std::cout &lt;&lt; &quot;timer canceled&quot;;
+    } else {
+    std::cout &lt;&lt; &quot;ERROR canceling timer&quot;;
+    }
+    printerID = (UMLRTCapsuleId) *rtdata;
+    if ( printerID.isValid() ) {
+    if ( frame.import( printerID, usbBus,  0) ) {
+    std::cout &lt;&lt; &quot; and successfully imported the printer driver&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; and FAILed to import the printer driver&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] and received an INVALID printerID!&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_rhWIAMbjEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_yYoMwMXOEeSsD5C2f30z-g"/>
+                  <trigger xmi:id="_rhWIAMbjEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_yYoMwMXOEeSsD5C2f30z-g"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_WgJK0O4OEeSAlbC0LA6o5Q" name="EN_initUSB_Continuation" source="_gMdQYO4UEeSJPsWo_Mnp3w" target="_HrCd8MbhEeSvmLj5mtpd2g"/>
-                <transition xmi:type="uml:Transition" xmi:id="_Y-ulwO4REeSJPsWo_Mnp3w" name="onPrintDriverTimeout" source="_HrCd8MbhEeSvmLj5mtpd2g" target="_Bt8igMbjEeSvmLj5mtpd2g">
+                <transition xmi:id="_WgJK0O4OEeSAlbC0LA6o5Q" name="EN_initUSB_Continuation" source="_gMdQYO4UEeSJPsWo_Mnp3w" target="_HrCd8MbhEeSvmLj5mtpd2g"/>
+                <transition xmi:id="_Y-ulwO4REeSJPsWo_Mnp3w" name="onPrintDriverTimeout" source="_HrCd8MbhEeSvmLj5mtpd2g" target="_Bt8igMbjEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_ZIsvMO4TEeSJPsWo_Mnp3w" name="Timeout_NoResponse">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] timed out while waiting for a printerId&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] timed out while waiting for a printerId&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_L1TmgO4TEeSJPsWo_Mnp3w" name="onTimeout" port="_NFL2YICsEeSYmJvm6id8mw">
+                  <trigger xmi:id="_L1TmgO4TEeSJPsWo_Mnp3w" name="onTimeout" port="_NFL2YICsEeSYmJvm6id8mw">
                     <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
                   </trigger>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_Huz1wO4UEeSJPsWo_Mnp3w" name="onStorageTimeout" source="_Bt8igMbjEeSvmLj5mtpd2g" target="_KlKcAO4NEeSAlbC0LA6o5Q">
+                <transition xmi:id="_Huz1wO4UEeSJPsWo_Mnp3w" name="onStorageTimeout" source="_Bt8igMbjEeSvmLj5mtpd2g" target="_KlKcAO4NEeSAlbC0LA6o5Q">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_PgxWMO4UEeSJPsWo_Mnp3w" name="onStorageTimeout">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot; timed out waiting to receive a storageId&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot; timed out waiting to receive a storageId&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="__CiaQMbkEeSvmLj5mtpd2g" name="onStorageResourceID" source="_Bt8igMbjEeSvmLj5mtpd2g" target="_KlKcAO4NEeSAlbC0LA6o5Q">
+                <transition xmi:id="__CiaQMbkEeSvmLj5mtpd2g" name="onStorageResourceID" source="_Bt8igMbjEeSvmLj5mtpd2g" target="_KlKcAO4NEeSAlbC0LA6o5Q">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_sYYgoMeGEeSz1oN1Kl4Now" name="importStorageDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
-
-if ( timer.cancelTimer( timerId ) ) {
-	std::cout &lt;&lt; &quot;timer canceled&quot;;
-} else {
-	std::cout &lt;&lt; &quot;ERROR canceling timer&quot;;
-}
-
-storageID = (UMLRTCapsuleId) *rtdata;
-
-if ( storageID.isValid() ) {
-	if ( frame.import( storageID, usbBus, 1)) {
-		std::cout &lt;&lt; &quot; and storage is now available.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but FAILed to import storage driver!&quot; &lt;&lt; std::endl;
-	}
-} else {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;but received INVALID storageID!&quot; &lt;&lt; std::endl;
-}</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
+    if ( timer.cancelTimer( timerId ) ) {
+    std::cout &lt;&lt; &quot;timer canceled&quot;;
+    } else {
+    std::cout &lt;&lt; &quot;ERROR canceling timer&quot;;
+    }
+    storageID = (UMLRTCapsuleId) *rtdata;
+    if ( storageID.isValid() ) {
+    if ( frame.import( storageID, usbBus, 1)) {
+    std::cout &lt;&lt; &quot; and storage is now available.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but FAILed to import storage driver!&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;but received INVALID storageID!&quot; &lt;&lt; std::endl;
+    }
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_436aYO1MEeSAm9oTc70yKg" name="onResourceId" event="_WOVBgMQeEeSirL7ina4YrA" port="_yYoMwMXOEeSsD5C2f30z-g"/>
+                  <trigger xmi:id="_436aYO1MEeSAm9oTc70yKg" name="onResourceId" event="_WOVBgMQeEeSirL7ina4YrA" port="_yYoMwMXOEeSsD5C2f30z-g"/>
                 </transition>
                 <subvertex xmi:type="uml:State" xmi:id="_HrCd8MbhEeSvmLj5mtpd2g" name="WaitForPrinter">
                   <entry xmi:type="uml:OpaqueBehavior" xmi:id="_4dTQAO4SEeSJPsWo_Mnp3w" name="setTimer">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
-
-numSec = 10;
-timerId = timer.informIn( UMLRTTimespec( numSec, 0 ) );
-
-if ( timerId.isValid() ) {
-	std::cout &lt;&lt; &quot; sets a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer&quot; &lt;&lt; std::endl;
-}
-else {
-	std::cout &lt;&lt; &quot; FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
+    numSec = 10;
+    timerId = timer.informIn( UMLRTTimespec( numSec, 0 ) );
+    if ( timerId.isValid() ) {
+    std::cout &lt;&lt; &quot; sets a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer&quot; &lt;&lt; std::endl;
+    }
+    else {
+    std::cout &lt;&lt; &quot; FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </entry>
                 </subvertex>
                 <subvertex xmi:type="uml:State" xmi:id="_Bt8igMbjEeSvmLj5mtpd2g" name="WaitForStorage">
                   <entry xmi:type="uml:OpaqueBehavior" xmi:id="_7xknsO4TEeSJPsWo_Mnp3w" name="requestStorageDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitForStorage} &quot;;
-
-/**
- * Send storage request
- */
-if ( resMgr.requestStorageDriver().send() ) {
-	std::cout &lt;&lt; &quot;and requested a storage driver&quot;;
-} else {
-	std::cout &lt;&lt; &quot;FAILed to request a storage driver&quot;;
-}
-
-/**
- * Set timeout for storage request
- */
-numSec = 10;
-timerId = timer.informIn( UMLRTTimespec( numSec, 0 ) );
-if ( timerId.isValid() ) {
-	std::cout &lt;&lt; &quot; set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer waiting for a storageDriver.&quot; &lt;&lt; std::endl;
-}
-else {
-	std::cout &lt;&lt; &quot; FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitForStorage} &quot;;
+    /**
+    * Send storage request
+    */
+    if ( resMgr.requestStorageDriver().send() ) {
+    std::cout &lt;&lt; &quot;and requested a storage driver&quot;;
+    } else {
+    std::cout &lt;&lt; &quot;FAILed to request a storage driver&quot;;
+    }
+    /**
+    * Set timeout for storage request
+    */
+    numSec = 10;
+    timerId = timer.informIn( UMLRTTimespec( numSec, 0 ) );
+    if ( timerId.isValid() ) {
+    std::cout &lt;&lt; &quot; set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer waiting for a storageDriver.&quot; &lt;&lt; std::endl;
+    }
+    else {
+    std::cout &lt;&lt; &quot; FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </entry>
                 </subvertex>
@@ -289,16 +273,13 @@
             <subvertex xmi:type="uml:State" xmi:id="_5D02wO4NEeSAlbC0LA6o5Q" name="Running">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_Aj9CgO4dEeSJPsWo_Mnp3w" name="running">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {Running}.&quot; &lt;&lt; std::endl;
-
-//context()->debugOutputModel();
-
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {Running}.&quot; &lt;&lt; std::endl;
+    //context()->debugOutputModel();
 </body>
               </entry>
             </subvertex>
@@ -309,109 +290,99 @@
         <ownedAttribute xmi:type="uml:Port" xmi:id="_-hXZwMQZEeSirL7ina4YrA" name="frame" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_TWVjwGtVEeSCmtGQ-V4nzg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_PPdAUMQdEeSirL7ina4YrA" name="usbPrinterDriver" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="composite">
+        <ownedAttribute xmi:id="_PPdAUMQdEeSirL7ina4YrA" name="usbPrinterDriver" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_SJE40MQdEeSirL7ina4YrA"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_SJHVEMQdEeSirL7ina4YrA" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_a5T_YMQdEeSirL7ina4YrA" name="usbStorageDriver" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="composite">
+        <ownedAttribute xmi:id="_a5T_YMQdEeSirL7ina4YrA" name="usbStorageDriver" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_f56LcMQdEeSirL7ina4YrA"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_f58nsMQdEeSirL7ina4YrA" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_SUYb4MXIEeSsD5C2f30z-g" name="printerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_SUYb4MXIEeSsD5C2f30z-g" name="printerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_myrFAMXIEeSsD5C2f30z-g" name="storageID" visibility="protected">
+        <ownedAttribute xmi:id="_myrFAMXIEeSsD5C2f30z-g" name="storageID" visibility="protected">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_pCSIcMXOEeSsD5C2f30z-g" name="resMgr" type="_sSppwMQdEeSirL7ina4YrA" isOrdered="true" aggregation="composite" isBehavior="true"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_3NAL0MX8EeSsD5C2f30z-g" name="printerRequestCount" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_3NAL0MX8EeSsD5C2f30z-g" name="printerRequestCount" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
           <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_BdingMX9EeSsD5C2f30z-g"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_EgcX0MX9EeSsD5C2f30z-g" name="storageRequestCount" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_EgcX0MX9EeSsD5C2f30z-g" name="storageRequestCount" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
           <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_IAhzYMX9EeSsD5C2f30z-g"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_w7EMQMbDEeSvmLj5mtpd2g" name="appPort" type="_sSppwMQdEeSirL7ina4YrA" isOrdered="true" aggregation="composite" isBehavior="true"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_yMNRsMeMEeSz1oN1Kl4Now" name="status" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_yMNRsMeMEeSz1oN1Kl4Now" name="status" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_7___oMePEeSz1oN1Kl4Now" name="resourceType" visibility="protected" type="_e2WAMMQeEeSirL7ina4YrA" aggregation="composite"/>
+        <ownedAttribute xmi:id="_7___oMePEeSz1oN1Kl4Now" name="resourceType" visibility="protected" type="_e2WAMMQeEeSirL7ina4YrA" aggregation="composite"/>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_Nf-gUA4XEeWZmqO69MGcNA" name="timer" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_1b94QA4XEeWZmqO69MGcNA" name="timerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_1b94QA4XEeWZmqO69MGcNA" name="timerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6qkTMGXmEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_40hD4BUnEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_40hD4BUnEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
         </ownedAttribute>
         <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_j6H2YMQOEeSirL7ina4YrA" name="ResourceManager_SM" isReentrant="false">
-          <region xmi:type="uml:Region" xmi:id="_lPuXYMQOEeSirL7ina4YrA" name="Region1">
-            <transition xmi:type="uml:Transition" xmi:id="_vAwzoMQOEeSirL7ina4YrA" name="initialize" source="_rMOyEMQOEeSirL7ina4YrA" target="_vjKL0MeMEeSz1oN1Kl4Now">
+          <region xmi:id="_lPuXYMQOEeSirL7ina4YrA" name="Region1">
+            <transition xmi:id="_vAwzoMQOEeSirL7ina4YrA" name="initialize" source="_rMOyEMQOEeSirL7ina4YrA" target="_vjKL0MeMEeSz1oN1Kl4Now">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_NM_EQMXIEeSsD5C2f30z-g" name="Initialize">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot;;
-
-/**
- * In this version, we will initialize just the resources that are required for the demo.
- * This capsule could be made more intelligent by implemented managed pools.
- */
-
-bool localPrinterStatus;
-bool localStorageStatus;
-bool localTimerStatus;
-
-printerID = frame.incarnate(usbPrinterDriver, USBPrinterDriver);
-localPrinterStatus = printerID.isValid();
-if ( localPrinterStatus ) {
-	std::cout &lt;&lt; &quot; - printer driver ready&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; - ERROR instantiating printer driver&quot; &lt;&lt; std::endl;
-}
-
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot;;
-
-storageID = frame.incarnate(usbStorageDriver, USBStorageDriver);
-localStorageStatus = storageID.isValid();
-if ( localStorageStatus ) {
-	std::cout &lt;&lt; &quot; - storage driver ready&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; - ERROR instantiating storage driver&quot; &lt;&lt; std::endl;
-}
-
-status = ( localPrinterStatus &amp;&amp; localStorageStatus);
-
-if (status) {
-
-	time( &amp;currentTime );
-	localTime = localtime( &amp;currentTime );
-	std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing - &quot;;
-
-	numSec = 10;
-
-	timerID = timer.informIn(UMLRTTimespec(numSec,0));
-	localTimerStatus = timerID.isValid();
-	if ( ! localTimerStatus ) {
-		std::cout &lt;&lt; &quot;FAILED to &quot;;
-	}
-	std::cout &lt;&lt; &quot;set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer for drivers initialization.&quot; &lt;&lt; std::endl;
-}
-status = ( localPrinterStatus &amp;&amp; localStorageStatus &amp;&amp; localTimerStatus);
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot;;
+    /**
+    * In this version, we will initialize just the resources that are required for the demo.
+    * This capsule could be made more intelligent by implemented managed pools.
+    */
+    bool localPrinterStatus;
+    bool localStorageStatus;
+    bool localTimerStatus;
+    printerID = frame.incarnate(usbPrinterDriver, USBPrinterDriver);
+    localPrinterStatus = printerID.isValid();
+    if ( localPrinterStatus ) {
+    std::cout &lt;&lt; &quot; - printer driver ready&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; - ERROR instantiating printer driver&quot; &lt;&lt; std::endl;
+    }
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing&quot;;
+    storageID = frame.incarnate(usbStorageDriver, USBStorageDriver);
+    localStorageStatus = storageID.isValid();
+    if ( localStorageStatus ) {
+    std::cout &lt;&lt; &quot; - storage driver ready&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; - ERROR instantiating storage driver&quot; &lt;&lt; std::endl;
+    }
+    status = ( localPrinterStatus &amp;&amp; localStorageStatus);
+    if (status) {
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing - &quot;;
+    numSec = 10;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
+    localTimerStatus = timerID.isValid();
+    if ( ! localTimerStatus ) {
+    std::cout &lt;&lt; &quot;FAILED to &quot;;
+    }
+    std::cout &lt;&lt; &quot;set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer for drivers initialization.&quot; &lt;&lt; std::endl;
+    }
+    status = ( localPrinterStatus &amp;&amp; localStorageStatus &amp;&amp; localTimerStatus);
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_HSfeIMX8EeSsD5C2f30z-g" name="onResMgrPrinterRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_V1YDUMX9EeSsD5C2f30z-g" name="Printer requested">
+            <transition xmi:id="_HSfeIMX8EeSsD5C2f30z-g" name="onResMgrPrinterRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
+              <ownedRule xmi:id="_V1YDUMX9EeSsD5C2f30z-g" name="Printer requested">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_V1YDUcX9EeSsD5C2f30z-g">
                   <language>C++</language>
                   <body>return( resourceType == PrinterDriver);
@@ -420,34 +391,31 @@
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_iA5vkMX-EeSsD5C2f30z-g" name="sendResMgrPrinterResource">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] printer resource requested by computer,&quot;;
-
-if ( printerID.isValid() ) {
-	if ( resMgr.resourceID( printerID ).send() ) {
-		std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but ERROR sending printer resource!&quot; &lt;&lt; std::endl;
-	}
-} else {
-	if ( resMgr.resNotAvail().send() ) {
-		std::cout &lt;&lt; &quot; but printer resource not available sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but ERROR sending printer resource not available!&quot; &lt;&lt; std::endl;
-	}
-}
-
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] printer resource requested by computer,&quot;;
+    if ( printerID.isValid() ) {
+    if ( resMgr.resourceID( printerID ).send() ) {
+    std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but ERROR sending printer resource!&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    if ( resMgr.resNotAvail().send() ) {
+    std::cout &lt;&lt; &quot; but printer resource not available sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but ERROR sending printer resource not available!&quot; &lt;&lt; std::endl;
+    }
+    }
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_PGl6IA8aEeWl7ddVi7dGGQ" name="onRequestPrinter" event="_qNNNAA8YEeWl7ddVi7dGGQ" port="_pCSIcMXOEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_PGl6IA8aEeWl7ddVi7dGGQ" name="onRequestPrinter" event="_qNNNAA8YEeWl7ddVi7dGGQ" port="_pCSIcMXOEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_IlhzUMX8EeSsD5C2f30z-g" name="onResMgrStorageRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_P4ZcoMX_EeSsD5C2f30z-g" name="StorageRequested">
+            <transition xmi:id="_IlhzUMX8EeSsD5C2f30z-g" name="onResMgrStorageRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
+              <ownedRule xmi:id="_P4ZcoMX_EeSsD5C2f30z-g" name="StorageRequested">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_P4ZcocX_EeSsD5C2f30z-g">
                   <language>C++</language>
                   <body>return( resourceType == StorageDriver);
@@ -456,175 +424,163 @@
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_095lEMX-EeSsD5C2f30z-g" name="sendResMgrStorageResource">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] storage resource requested by Computer,&quot;;
-
-if ( storageID.isValid() ) {
-	if ( resMgr.resourceID( storageID ).send() ) {
-		std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but ERROR sending storage resource!&quot; &lt;&lt; std::endl;
-	}
-} else {
-	if ( resMgr.resNotAvail().send() ) {
-		std::cout &lt;&lt; &quot; but storage resource not available sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but ERROR sending storage resource not available&quot; &lt;&lt; std::endl;
-	}
-}
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] storage resource requested by Computer,&quot;;
+    if ( storageID.isValid() ) {
+    if ( resMgr.resourceID( storageID ).send() ) {
+    std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but ERROR sending storage resource!&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    if ( resMgr.resNotAvail().send() ) {
+    std::cout &lt;&lt; &quot; but storage resource not available sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but ERROR sending storage resource not available&quot; &lt;&lt; std::endl;
+    }
+    }
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_YwcJQA8aEeWl7ddVi7dGGQ" name="onStorageRequest" event="_vbaXQA8YEeWl7ddVi7dGGQ" port="_pCSIcMXOEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_YwcJQA8aEeWl7ddVi7dGGQ" name="onStorageRequest" event="_vbaXQA8YEeWl7ddVi7dGGQ" port="_pCSIcMXOEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_EC_bIMePEeSz1oN1Kl4Now" name="OK" guard="_TkG_oMePEeSz1oN1Kl4Now" source="_vjKL0MeMEeSz1oN1Kl4Now" target="_p3iWUA4YEeWZmqO69MGcNA">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_TkG_oMePEeSz1oN1Kl4Now" name="SuccesfulInitialization">
+            <transition xmi:id="_EC_bIMePEeSz1oN1Kl4Now" name="OK" guard="_TkG_oMePEeSz1oN1Kl4Now" source="_vjKL0MeMEeSz1oN1Kl4Now" target="_p3iWUA4YEeWZmqO69MGcNA">
+              <ownedRule xmi:id="_TkG_oMePEeSz1oN1Kl4Now" name="SuccesfulInitialization">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_TkG_ocePEeSz1oN1Kl4Now">
                   <language>C++</language>
-                  <body>return( status );</body>
+                  <body>    return( status );
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_qLX1kPBOEeSy0dZlYL7EHw" name="InstantiateSuccess">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] drivers instantiated.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] drivers instantiated.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_JN9rMMePEeSz1oN1Kl4Now" name="NOK" guard="_Z32OkMePEeSz1oN1Kl4Now" source="_vjKL0MeMEeSz1oN1Kl4Now" target="_Eytn4MePEeSz1oN1Kl4Now">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_Z32OkMePEeSz1oN1Kl4Now" name="FailedInitialization">
+            <transition xmi:id="_JN9rMMePEeSz1oN1Kl4Now" name="NOK" guard="_Z32OkMePEeSz1oN1Kl4Now" source="_vjKL0MeMEeSz1oN1Kl4Now" target="_Eytn4MePEeSz1oN1Kl4Now">
+              <ownedRule xmi:id="_Z32OkMePEeSz1oN1Kl4Now" name="FailedInitialization">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_Z32OkcePEeSz1oN1Kl4Now">
                   <language>C++</language>
-                  <body>return ( ! status );</body>
+                  <body>    return ( ! status );
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_jXgVEPBOEeSy0dZlYL7EHw" name="InitiFailed">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] FAILed to initialize!&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] FAILed to initialize!&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_we32sA4YEeWZmqO69MGcNA" name="onTimeout" source="_p3iWUA4YEeWZmqO69MGcNA" target="_uPDp4MQOEeSirL7ina4YrA">
+            <transition xmi:id="_we32sA4YEeWZmqO69MGcNA" name="onTimeout" source="_p3iWUA4YEeWZmqO69MGcNA" target="_uPDp4MQOEeSirL7ina4YrA">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_T_5GEA5DEeWfxoP9jGN4_w" name="broadcastReady">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-/**
- * Telling the world that the ResourceManager is taking requests!
- */
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
-
-if ( resMgr.resMgrRunning().send() ) {
-	std::cout &lt;&lt; &quot;told &quot;;
-	
-} else {
-	std::cout &lt;&lt; &quot;FAILED to tell &quot;;
-}
-std::cout &lt;&lt; &quot;its clients that it is taking requests.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    /**
+    * Telling the world that the ResourceManager is taking requests!
+    */
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
+    if ( resMgr.resMgrRunning().send() ) {
+    std::cout &lt;&lt; &quot;told &quot;;
+    } else {
+    std::cout &lt;&lt; &quot;FAILED to tell &quot;;
+    }
+    std::cout &lt;&lt; &quot;its clients that it is taking requests.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_uq1UIA5CEeWfxoP9jGN4_w" name="onTimeout" port="_Nf-gUA4XEeWZmqO69MGcNA">
+              <trigger xmi:id="_uq1UIA5CEeWfxoP9jGN4_w" name="onTimeout" port="_Nf-gUA4XEeWZmqO69MGcNA">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_1apD4A8aEeWl7ddVi7dGGQ" name="onAppPrinterRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
+            <transition xmi:id="_1apD4A8aEeWl7ddVi7dGGQ" name="onAppPrinterRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_BXI1oA8cEeWl7ddVi7dGGQ" name="sendAppPortPrinterResource">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] printer resource requested by App,&quot;;
-
-if ( printerID.isValid() ) {
-	if ( resMgr.resourceID( printerID ).send() ) {
-		std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but got an ERROR sending!&quot; &lt;&lt; std::endl;
-	}
-} else {
-	if ( resMgr.resNotAvail().send() ) {
-		std::cout &lt;&lt; &quot;[ but printer resource is not available sent&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot;but ERROR sending printer resource not available&quot; &lt;&lt; std::endl;
-	}
-}
-
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] printer resource requested by App,&quot;;
+    if ( printerID.isValid() ) {
+    if ( resMgr.resourceID( printerID ).send() ) {
+    std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but got an ERROR sending!&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    if ( resMgr.resNotAvail().send() ) {
+    std::cout &lt;&lt; &quot;[ but printer resource is not available sent&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;but ERROR sending printer resource not available&quot; &lt;&lt; std::endl;
+    }
+    }
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_mDNKYA8bEeWl7ddVi7dGGQ" name="onAppPrinterRequest" event="_qNNNAA8YEeWl7ddVi7dGGQ" port="_w7EMQMbDEeSvmLj5mtpd2g"/>
+              <trigger xmi:id="_mDNKYA8bEeWl7ddVi7dGGQ" name="onAppPrinterRequest" event="_qNNNAA8YEeWl7ddVi7dGGQ" port="_w7EMQMbDEeSvmLj5mtpd2g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_sfIsAA8bEeWl7ddVi7dGGQ" name="onAppPortStorageRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
+            <transition xmi:id="_sfIsAA8bEeWl7ddVi7dGGQ" name="onAppPortStorageRequest" source="_uPDp4MQOEeSirL7ina4YrA" target="_uPDp4MQOEeSirL7ina4YrA">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_fybTYA8cEeWl7ddVi7dGGQ" name="sendAppPortStorageResource">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] storage resource requested by App,&quot;;
-
-if ( storageID.isValid() ) {
-	if ( appPort.resourceID( storageID ).send() ) {
-		std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot; but ERROR sending storage resource!&quot; &lt;&lt; std::endl;
-	}
-} else {
-	if ( appPort.resNotAvail().send() ) {
-		std::cout &lt;&lt; &quot; but storage resource not available sent.&quot; &lt;&lt; std::endl;
-	} else {
-		std::cout &lt;&lt; &quot;but ERROR sending storage resource not available!&quot; &lt;&lt; std::endl;
-	}
-}
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] storage resource requested by App,&quot;;
+    if ( storageID.isValid() ) {
+    if ( appPort.resourceID( storageID ).send() ) {
+    std::cout &lt;&lt; &quot; and sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; but ERROR sending storage resource!&quot; &lt;&lt; std::endl;
+    }
+    } else {
+    if ( appPort.resNotAvail().send() ) {
+    std::cout &lt;&lt; &quot; but storage resource not available sent.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;but ERROR sending storage resource not available!&quot; &lt;&lt; std::endl;
+    }
+    }
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_JvPTkA8dEeWl7ddVi7dGGQ" name="onAppPortStorageRequest" event="_vbaXQA8YEeWl7ddVi7dGGQ" port="_w7EMQMbDEeSvmLj5mtpd2g"/>
+              <trigger xmi:id="_JvPTkA8dEeWl7ddVi7dGGQ" name="onAppPortStorageRequest" event="_vbaXQA8YEeWl7ddVi7dGGQ" port="_w7EMQMbDEeSvmLj5mtpd2g"/>
             </transition>
             <subvertex xmi:type="uml:Pseudostate" xmi:id="_rMOyEMQOEeSirL7ina4YrA" name="Initial1"/>
             <subvertex xmi:type="uml:State" xmi:id="_uPDp4MQOEeSirL7ina4YrA" name="WaitingForRequest">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_YOXT8O0NEeSzlZWHZcnPXA" name="waitingForRequest">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitingForRequest},  waiting for a request&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitingForRequest},  waiting for a request&quot; &lt;&lt; std::endl;
 </body>
               </entry>
               <exit xmi:type="uml:OpaqueBehavior" xmi:id="_m4LMsA7dEeWWHqV5N_7gJQ" name="requestReceived">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received a request!&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received a request!&quot; &lt;&lt; std::endl;
 </body>
               </exit>
             </subvertex>
@@ -632,19 +588,20 @@
             <subvertex xmi:type="uml:State" xmi:id="_Eytn4MePEeSz1oN1Kl4Now" name="InitFail">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_QH-LUA7dEeWWHqV5N_7gJQ" name="initFailState">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {InitFail}&quot; &lt;&lt; std::endl;</body>
+                <body>    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {InitFail}&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_p3iWUA4YEeWZmqO69MGcNA" name="WaitInitTimeout" visibility="package">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_5nGcIA48EeWfxoP9jGN4_w" name="waitOnTimeout">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitInitTimeout}&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in state {WaitInitTimeout}&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:Pseudostate" xmi:id="_I2Gn0NP8EeWREsRfakpzqA" name="Initial2"/>
@@ -663,7 +620,7 @@
     </packagedElement>
     <packagedElement xmi:type="uml:Package" xmi:id="_lRFDsMOJEeSSS8SwKHucgQ" name="Software">
       <packagedElement xmi:type="uml:Class" xmi:id="_9YrV0MOJEeSSS8SwKHucgQ" name="Application" isActive="true">
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_WvYkUMQXEeSirL7ina4YrA" name="applicationType" visibility="protected" type="_5luYcMQUEeSirL7ina4YrA" aggregation="composite" association="_ZtZPwAiCEeWmptSG6Ct2-w"/>
+        <ownedAttribute xmi:id="_WvYkUMQXEeSirL7ina4YrA" name="applicationType" visibility="protected" type="_5luYcMQUEeSirL7ina4YrA" aggregation="composite" association="_ZtZPwAiCEeWmptSG6Ct2-w"/>
       </packagedElement>
       <packagedElement xmi:type="uml:Class" xmi:id="_N2fr8MOyEeSxS9_G15_gSg" name="WordProcessorApp" visibility="public" classifierBehavior="_tFC1oMYCEeSsD5C2f30z-g" isActive="true">
         <ownedAttribute xmi:type="uml:Port" xmi:id="_JKtYAMQPEeSirL7ina4YrA" name="resourcePort" visibility="public" type="_sSppwMQdEeSirL7ina4YrA" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="true"/>
@@ -671,158 +628,148 @@
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_TWVjwGtVEeSCmtGQ-V4nzg"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_5Gm08MYAEeSsD5C2f30z-g" name="UserControlePort" type="_vOIpQMO2EeSxS9_G15_gSg" isOrdered="true" aggregation="composite" isBehavior="true"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_I8yqgMYBEeSsD5C2f30z-g" name="deviceInterface" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="shared">
+        <ownedAttribute xmi:id="_I8yqgMYBEeSsD5C2f30z-g" name="deviceInterface" visibility="protected" type="_ZUBdgIB6EeSeANT-DfY5oA" aggregation="shared">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_QtCTsMYBEeSsD5C2f30z-g"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_QtEI4MYBEeSsD5C2f30z-g" value="1"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_jacOAMYBEeSsD5C2f30z-g" name="usbPort" visibility="public" type="_6tx6sIB-EeSeANT-DfY5oA" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="true" isService="false"/>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_L0QU8MYDEeSsD5C2f30z-g" name="document" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_L0QU8MYDEeSsD5C2f30z-g" name="document" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_5lVhgBydEduyofBvg4RL2w"/>
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_g98OMBRUEeW80tAMjGoZKg" value="1"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_g9-DYBRUEeW80tAMjGoZKg" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_urYxMMbaEeSvmLj5mtpd2g" name="printerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_urYxMMbaEeSvmLj5mtpd2g" name="printerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_RCE7AMd_EeSz1oN1Kl4Now" name="progress" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_RCE7AMd_EeSz1oN1Kl4Now" name="progress" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_uUaXMMeAEeSz1oN1Kl4Now" name="storageID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_uUaXMMeAEeSz1oN1Kl4Now" name="storageID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_Ev3W8MeJEeSz1oN1Kl4Now" name="importOK" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_Ev3W8MeJEeSz1oN1Kl4Now" name="importOK" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_Mt-r4O0LEeSzlZWHZcnPXA" name="log" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6kIb0IeXEeSVyrlWP4nYew"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_9cNTsO1GEeSZmPHiHLCOIw" name="status" visibility="protected">
+        <ownedAttribute xmi:id="_9cNTsO1GEeSZmPHiHLCOIw" name="status" visibility="protected">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_rNb0gAiBEeWmptSG6Ct2-w" name="apptype" type="_5luYcMQUEeSirL7ina4YrA" redefinedProperty="_WvYkUMQXEeSirL7ina4YrA">
+        <ownedAttribute xmi:id="_rNb0gAiBEeWmptSG6Ct2-w" name="apptype" type="_5luYcMQUEeSirL7ina4YrA" redefinedProperty="_WvYkUMQXEeSirL7ina4YrA">
           <defaultValue xmi:type="uml:InstanceValue" xmi:id="_-U2_EAiGEeWmptSG6Ct2-w" type="_5luYcMQUEeSirL7ina4YrA" instance="_7OV8EMQUEeSirL7ina4YrA"/>
         </ownedAttribute>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_xN9oQMYBEeSsD5C2f30z-g" name="Connector1">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_xN-PUMYBEeSsD5C2f30z-g" role="_jacOAMYBEeSsD5C2f30z-g">
+        <ownedConnector xmi:id="_xN9oQMYBEeSsD5C2f30z-g" name="Connector1">
+          <end xmi:id="_xN-PUMYBEeSsD5C2f30z-g" role="_jacOAMYBEeSsD5C2f30z-g">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_xN-PUcYBEeSsD5C2f30z-g" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_xN-PUsYBEeSsD5C2f30z-g" value="1"/>
           </end>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_xN-PU8YBEeSsD5C2f30z-g" partWithPort="_I8yqgMYBEeSsD5C2f30z-g" role="_vXWH4MXgEeSsD5C2f30z-g">
+          <end xmi:id="_xN-PU8YBEeSsD5C2f30z-g" partWithPort="_I8yqgMYBEeSsD5C2f30z-g" role="_vXWH4MXgEeSsD5C2f30z-g">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_xN-PVMYBEeSsD5C2f30z-g" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_xN-PVcYBEeSsD5C2f30z-g" value="1"/>
           </end>
         </ownedConnector>
         <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_tFC1oMYCEeSsD5C2f30z-g" name="WordProcessorApp_SM" isReentrant="false">
-          <region xmi:type="uml:Region" xmi:id="_vz1-MMYCEeSsD5C2f30z-g" name="Region1">
-            <transition xmi:type="uml:Transition" xmi:id="_Ee0YcMYDEeSsD5C2f30z-g" name="Initial" source="_AE38sMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
+          <region xmi:id="_vz1-MMYCEeSsD5C2f30z-g" name="Region1">
+            <transition xmi:id="_Ee0YcMYDEeSsD5C2f30z-g" name="Initial" source="_AE38sMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_EWxlsMeCEeSz1oN1Kl4Now" name="initializingApplication">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-
-document = (char *) malloc(101);
-strcpy(document, &quot;Aenean lacinia bibendum nulla sed consectetur.\0\0&quot;);
-
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is initializing and document contains string \&quot;&quot; &lt;&lt; document &lt;&lt; &quot;\&quot;.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    document = (char *) malloc(101);
+    strcpy(document, &quot;Aenean lacinia bibendum nulla sed consectetur.\0\0&quot;);
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is initializing and document contains string \&quot;&quot; &lt;&lt; document &lt;&lt; &quot;\&quot;.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_SaU0kMYEEeSsD5C2f30z-g" name="onCreateDoc" source="_DcG-QMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
+            <transition xmi:id="_SaU0kMYEEeSsD5C2f30z-g" name="onCreateDoc" source="_DcG-QMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_pfv4AMYEEeSsD5C2f30z-g" name="createDocument">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] document created with provided string.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] document created with provided string.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_Xyz7AOqJEeSlmKRr_VnIAg" name="onCreateDocument" event="_tb9rkMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_Xyz7AOqJEeSlmKRr_VnIAg" name="onCreateDocument" event="_tb9rkMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_thYhcMYEEeSsD5C2f30z-g" name="onAddToDoc" source="_DcG-QMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
+            <transition xmi:id="_thYhcMYEEeSsD5C2f30z-g" name="onAddToDoc" source="_DcG-QMYDEeSsD5C2f30z-g" target="_DcG-QMYDEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_6vVwgMYEEeSsD5C2f30z-g" name="addString">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] String added to document.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] String added to document.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_z2uToAiDEeWmptSG6Ct2-w" name="onAddToDoc" event="_efZJIMO4EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_z2uToAiDEeWmptSG6Ct2-w" name="onAddToDoc" event="_efZJIMO4EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_QNf7MMYFEeSsD5C2f30z-g" name="onPrintDocument" source="_DcG-QMYDEeSsD5C2f30z-g" target="_yNH0kMbEEeSvmLj5mtpd2g">
+            <transition xmi:id="_QNf7MMYFEeSsD5C2f30z-g" name="onPrintDocument" source="_DcG-QMYDEeSsD5C2f30z-g" target="_yNH0kMbEEeSvmLj5mtpd2g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_CCoQkMYIEeSsD5C2f30z-g" name="printDocumentRequest">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received request to print the document&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received request to print the document&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_AchD0MYHEeSsD5C2f30z-g" name="onPrintDocument" event="_0zt8QMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_AchD0MYHEeSsD5C2f30z-g" name="onPrintDocument" event="_0zt8QMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_boq-AMYFEeSsD5C2f30z-g" name="printComplete_cont" source="_ND7NAMbHEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g">
+            <transition xmi:id="_boq-AMYFEeSsD5C2f30z-g" name="printComplete_cont" source="_ND7NAMbHEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_ZvcWEMYGEeSsD5C2f30z-g" name="printComplete">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is done printing&quot;;
-
-if ( frame.deport(printerID, deviceInterface) ) {
-	std::cout &lt;&lt; &quot; - printer driver released.&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; - FAILed to release the printer driver!&quot; &lt;&lt; std::endl;
-}
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is done printing&quot;;
+    if ( frame.deport(printerID, deviceInterface) ) {
+    std::cout &lt;&lt; &quot; - printer driver released.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; - FAILed to release the printer driver!&quot; &lt;&lt; std::endl;
+    }
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_edA1MMbGEeSvmLj5mtpd2g" name="printerUnavailable" source="_bshqkMbGEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g"/>
-            <transition xmi:type="uml:Transition" xmi:id="_cuGPwMbbEeSvmLj5mtpd2g" name="onSaveDocument" source="_DcG-QMYDEeSsD5C2f30z-g" target="_WVfH4MbbEeSvmLj5mtpd2g">
+            <transition xmi:id="_edA1MMbGEeSvmLj5mtpd2g" name="printerUnavailable" source="_bshqkMbGEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g"/>
+            <transition xmi:id="_cuGPwMbbEeSvmLj5mtpd2g" name="onSaveDocument" source="_DcG-QMYDEeSsD5C2f30z-g" target="_WVfH4MbbEeSvmLj5mtpd2g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_a2JHAMeIEeSz1oN1Kl4Now" name="saveDocumentRequest">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received request to save the document&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received request to save the document&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_ksVxUMbeEeSvmLj5mtpd2g" name="onSaveDocument" event="_931oIMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
+              <trigger xmi:id="_ksVxUMbeEeSvmLj5mtpd2g" name="onSaveDocument" event="_931oIMO3EeSxS9_G15_gSg" port="_5Gm08MYAEeSsD5C2f30z-g"/>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_dVXrIMbbEeSvmLj5mtpd2g" name="StorageNotAvailable" source="_W86UQMbbEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g"/>
-            <transition xmi:type="uml:Transition" xmi:id="_eHXv0MbbEeSvmLj5mtpd2g" name="saveComplete_cont" source="_XUhjAMbbEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g">
+            <transition xmi:id="_dVXrIMbbEeSvmLj5mtpd2g" name="StorageNotAvailable" source="_W86UQMbbEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g"/>
+            <transition xmi:id="_eHXv0MbbEeSvmLj5mtpd2g" name="saveComplete_cont" source="_XUhjAMbbEeSvmLj5mtpd2g" target="_DcG-QMYDEeSsD5C2f30z-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_rV5iMMeBEeSz1oN1Kl4Now" name="saveComplete">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is done saving&quot;;
-
-if ( frame.deport(storageID, deviceInterface) ) {
-	std::cout &lt;&lt; &quot; - storage driver released.&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; - FAILed to release the storage driver!&quot; &lt;&lt; std::endl;
-}
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is done saving&quot;;
+    if ( frame.deport(storageID, deviceInterface) ) {
+    std::cout &lt;&lt; &quot; - storage driver released.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; - FAILed to release the storage driver!&quot; &lt;&lt; std::endl;
+    }
 </body>
               </effect>
             </transition>
@@ -830,220 +777,214 @@
             <subvertex xmi:type="uml:State" xmi:id="_DcG-QMYDEeSsD5C2f30z-g" name="WaitingForCommand">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_F_0I8BbHEeWa4sJtLVaM7A" name="waitingForCommand_EN">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {WaitingForCommand}.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {WaitingForCommand}.&quot; &lt;&lt; std::endl;
 </body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_D3UosMYFEeSsD5C2f30z-g" name="Printing">
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_yNH0kMbEEeSvmLj5mtpd2g" name="EntryPoint1" kind="entryPoint"/>
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_bshqkMbGEeSvmLj5mtpd2g" name="ExitPoint1" kind="exitPoint"/>
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_ND7NAMbHEeSvmLj5mtpd2g" name="ExitPoint2" kind="exitPoint"/>
+              <connectionPoint xmi:id="_yNH0kMbEEeSvmLj5mtpd2g" name="EntryPoint1" kind="entryPoint"/>
+              <connectionPoint xmi:id="_bshqkMbGEeSvmLj5mtpd2g" name="ExitPoint1" kind="exitPoint"/>
+              <connectionPoint xmi:id="_ND7NAMbHEeSvmLj5mtpd2g" name="ExitPoint2" kind="exitPoint"/>
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_ffx8MBbHEeWa4sJtLVaM7A" name="printing_EN">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Printing}.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Printing}.&quot; &lt;&lt; std::endl;
 </body>
               </entry>
-              <region xmi:type="uml:Region" xmi:id="_yM6ZMMbEEeSvmLj5mtpd2g" name="Region1">
-                <transition xmi:type="uml:Transition" xmi:id="_7uSo0MbEEeSvmLj5mtpd2g" name="getPrinter" source="_yNH0kMbEEeSvmLj5mtpd2g" target="_6wgK4MbEEeSvmLj5mtpd2g">
+              <region xmi:id="_yM6ZMMbEEeSvmLj5mtpd2g" name="Region1">
+                <transition xmi:id="_7uSo0MbEEeSvmLj5mtpd2g" name="getPrinter" source="_yNH0kMbEEeSvmLj5mtpd2g" target="_6wgK4MbEEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_J8zV8MbFEeSvmLj5mtpd2g" name="requestPrinterDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
-
-if ( resourcePort.requestPrinterDriver().send() ) {
-	std::cout &lt;&lt; &quot; requested a printer driver&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; FAILed to  request a printer driver&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
+    if ( resourcePort.requestPrinterDriver().send() ) {
+    std::cout &lt;&lt; &quot; requested a printer driver&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; FAILed to  request a printer driver&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_OpTE0MbGEeSvmLj5mtpd2g" name="onPrintResource" source="_6wgK4MbEEeSvmLj5mtpd2g" target="_9b6ywMeJEeSz1oN1Kl4Now">
+                <transition xmi:id="_OpTE0MbGEeSvmLj5mtpd2g" name="onPrintResource" source="_6wgK4MbEEeSvmLj5mtpd2g" target="_9b6ywMeJEeSz1oN1Kl4Now">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_hD2kgMbaEeSvmLj5mtpd2g" name="importPrinterDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
-
-printerID = (UMLRTCapsuleId) *rtdata;
-
-if ( printerID.isValid() ) {
-	importOK = frame.import ( printerID, deviceInterface );
-	std::cout &lt;&lt; &quot; importing a printer driver.&quot; &lt;&lt; std::endl;
-} else {
-	importOK = false;
-	std::cout &lt;&lt; &quot; received an invalid Printer ID&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
+    printerID = (UMLRTCapsuleId) *rtdata;
+    if ( printerID.isValid() ) {
+    importOK = frame.import ( printerID, deviceInterface );
+    std::cout &lt;&lt; &quot; importing a printer driver.&quot; &lt;&lt; std::endl;
+    } else {
+    importOK = false;
+    std::cout &lt;&lt; &quot; received an invalid Printer ID&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_RJQJAMbaEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_JKtYAMQPEeSirL7ina4YrA"/>
+                  <trigger xmi:id="_RJQJAMbaEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_JKtYAMQPEeSirL7ina4YrA"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_c4pfcMbGEeSvmLj5mtpd2g" name="onResNotAvail" source="_6wgK4MbEEeSvmLj5mtpd2g" target="_bshqkMbGEeSvmLj5mtpd2g">
+                <transition xmi:id="_c4pfcMbGEeSvmLj5mtpd2g" name="onResNotAvail" source="_6wgK4MbEEeSvmLj5mtpd2g" target="_bshqkMbGEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Dvz-QMeAEeSz1oN1Kl4Now" name="printResourceNotAvailable">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] print driver not available&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] print driver not available&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_l8GW8O4YEeSJPsWo_Mnp3w" name="onResNotAvail" event="_AFeJgMXKEeSsD5C2f30z-g" port="_JKtYAMQPEeSirL7ina4YrA"/>
+                  <trigger xmi:id="_l8GW8O4YEeSJPsWo_Mnp3w" name="onResNotAvail" event="_AFeJgMXKEeSsD5C2f30z-g" port="_JKtYAMQPEeSirL7ina4YrA"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_T22ngMYFEeSsD5C2f30z-g" name="onPrintStatus" source="_mZ_S0MbGEeSvmLj5mtpd2g" target="_h1RbUMeTEeSz1oN1Kl4Now">
+                <transition xmi:id="_T22ngMYFEeSsD5C2f30z-g" name="onPrintStatus" source="_mZ_S0MbGEeSvmLj5mtpd2g" target="_h1RbUMeTEeSz1oN1Kl4Now">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_9-zoAMbGEeSvmLj5mtpd2g" name="getProgress">
                     <language>C++</language>
-                    <body>progress = (int) *rtdata;</body>
+                    <body>    progress = (int) *rtdata;
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_4OrnAMbHEeSvmLj5mtpd2g" name="onStatus" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
+                  <trigger xmi:id="_4OrnAMbHEeSvmLj5mtpd2g" name="onStatus" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_SW2fMMbHEeSvmLj5mtpd2g" name="printCompleted" guard="_EDWH4MbIEeSvmLj5mtpd2g" source="_h1RbUMeTEeSz1oN1Kl4Now" target="_ND7NAMbHEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_EDWH4MbIEeSvmLj5mtpd2g" name="progress_GTE_100">
+                <transition xmi:id="_SW2fMMbHEeSvmLj5mtpd2g" name="printCompleted" guard="_EDWH4MbIEeSvmLj5mtpd2g" source="_h1RbUMeTEeSz1oN1Kl4Now" target="_ND7NAMbHEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_EDWH4MbIEeSvmLj5mtpd2g" name="progress_GTE_100">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_EDWH4cbIEeSvmLj5mtpd2g">
                       <language>C++</language>
-                      <body>return( progress >= 100);
+                      <body>    return( progress >= 100);
 </body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_EZ8vYMbbEeSvmLj5mtpd2g" name="releasePrinterDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] has no more data&quot;;
-
-status = usbPort.eod().send();
-if ( status ) {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] - sent EOD&quot;;
-} else {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] - FAILed to send EOD&quot;;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] has no more data&quot;;
+    status = usbPort.eod().send();
+    if ( status ) {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] - sent EOD&quot;;
+    } else {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] - FAILed to send EOD&quot;;
+    }
 </body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_uKAnoMbIEeSvmLj5mtpd2g" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
+                  <trigger xmi:id="_uKAnoMbIEeSvmLj5mtpd2g" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_GjQxwMeKEeSz1oN1Kl4Now" name="importNOK" guard="_V7QPcMeKEeSz1oN1Kl4Now" source="_9b6ywMeJEeSz1oN1Kl4Now" target="_bshqkMbGEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_V7QPcMeKEeSz1oN1Kl4Now" name="importNOK">
+                <transition xmi:id="_GjQxwMeKEeSz1oN1Kl4Now" name="importNOK" guard="_V7QPcMeKEeSz1oN1Kl4Now" source="_9b6ywMeJEeSz1oN1Kl4Now" target="_bshqkMbGEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_V7QPcMeKEeSz1oN1Kl4Now" name="importNOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_V7QPcceKEeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( ! importOK );</body>
+                      <body>    return( ! importOK );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_RsWXoO09EeStM4MpdkuAjQ" name="importNOK">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not import printer driver&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not import printer driver&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_IFuDAMeKEeSz1oN1Kl4Now" name="importOK" guard="_N0lDQMeKEeSz1oN1Kl4Now" source="_9b6ywMeJEeSz1oN1Kl4Now" target="_0xE8QO4aEeSJPsWo_Mnp3w">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_N0lDQMeKEeSz1oN1Kl4Now">
+                <transition xmi:id="_IFuDAMeKEeSz1oN1Kl4Now" name="importOK" guard="_N0lDQMeKEeSz1oN1Kl4Now" source="_9b6ywMeJEeSz1oN1Kl4Now" target="_0xE8QO4aEeSJPsWo_Mnp3w">
+                  <ownedRule xmi:id="_N0lDQMeKEeSz1oN1Kl4Now">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_N0lDQceKEeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( importOK );</body>
+                      <body>    return( importOK );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_IaS9cO09EeStM4MpdkuAjQ" name="printDocument">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-status = usbPort.data(document).send();
-if ( status ) {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent document to print&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ERROR sending document to print&quot; &lt;&lt; std::endl;
-}</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    status = usbPort.data(document).send();
+    if ( status ) {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent document to print&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ERROR sending document to print&quot; &lt;&lt; std::endl;
+    }
+</body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_nMG9IMeTEeSz1oN1Kl4Now" name="printPrintProgress" guard="_QccrsMf-EeSjr4LTYwlKOw" source="_h1RbUMeTEeSz1oN1Kl4Now" target="_mZ_S0MbGEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_QccrsMf-EeSjr4LTYwlKOw" name="Progress_LT_100">
+                <transition xmi:id="_nMG9IMeTEeSz1oN1Kl4Now" name="printPrintProgress" guard="_QccrsMf-EeSjr4LTYwlKOw" source="_h1RbUMeTEeSz1oN1Kl4Now" target="_mZ_S0MbGEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_QccrsMf-EeSjr4LTYwlKOw" name="Progress_LT_100">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_Qccrscf-EeSjr4LTYwlKOw">
                       <language>C++</language>
-                      <body>return( progress &lt; 100);</body>
+                      <body>    return( progress &lt; 100);
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_79hWkMeTEeSz1oN1Kl4Now" name="printPrintProgress">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing... &quot; &lt;&lt; (int) progress &lt;&lt; &quot;%%&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing... &quot; &lt;&lt; (int) progress &lt;&lt; &quot;%%&quot; &lt;&lt; std::endl;
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_4iR9AO4aEeSJPsWo_Mnp3w" guard="_TaFF4O4bEeSJPsWo_Mnp3w" source="_0xE8QO4aEeSJPsWo_Mnp3w" target="_bshqkMbGEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_TaFF4O4bEeSJPsWo_Mnp3w" name="statusNOK">
+                <transition xmi:id="_4iR9AO4aEeSJPsWo_Mnp3w" guard="_TaFF4O4bEeSJPsWo_Mnp3w" source="_0xE8QO4aEeSJPsWo_Mnp3w" target="_bshqkMbGEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_TaFF4O4bEeSJPsWo_Mnp3w" name="statusNOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_TaFF4e4bEeSJPsWo_Mnp3w" name="statusNOK">
                       <language>C++</language>
-                      <body>return( ! status );</body>
+                      <body>    return( ! status );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_I2cMAPBgEeSy0dZlYL7EHw" name="couldNotPrint">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not print document&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not print document&quot; &lt;&lt; std::endl;
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_5G7iMO4aEeSJPsWo_Mnp3w" guard="_NN3bQO4bEeSJPsWo_Mnp3w" source="_0xE8QO4aEeSJPsWo_Mnp3w" target="_mZ_S0MbGEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_NN3bQO4bEeSJPsWo_Mnp3w" name="statusOK">
+                <transition xmi:id="_5G7iMO4aEeSJPsWo_Mnp3w" guard="_NN3bQO4bEeSJPsWo_Mnp3w" source="_0xE8QO4aEeSJPsWo_Mnp3w" target="_mZ_S0MbGEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_NN3bQO4bEeSJPsWo_Mnp3w" name="statusOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_NN3bQe4bEeSJPsWo_Mnp3w" name="statusOK">
                       <language>C++</language>
-                      <body>return( status );</body>
+                      <body>    return( status );
+</body>
                     </specification>
                   </ownedRule>
                 </transition>
                 <subvertex xmi:type="uml:State" xmi:id="_6wgK4MbEEeSvmLj5mtpd2g" name="waitForPrinter">
                   <entry xmi:type="uml:OpaqueBehavior" xmi:id="_WFrQ0O4YEeSJPsWo_Mnp3w" name="waitingForPrinter">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] waiting for printer driver&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] waiting for printer driver&quot; &lt;&lt; std::endl;
 </body>
                   </entry>
                 </subvertex>
@@ -1054,204 +995,202 @@
               </region>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_RN478MbbEeSvmLj5mtpd2g" name="Saving">
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_WVfH4MbbEeSvmLj5mtpd2g" name="EntryPoint1" kind="entryPoint"/>
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_W86UQMbbEeSvmLj5mtpd2g" name="ExitPoint1" kind="exitPoint"/>
-              <connectionPoint xmi:type="uml:Pseudostate" xmi:id="_XUhjAMbbEeSvmLj5mtpd2g" name="ExitPoint2" kind="exitPoint"/>
+              <connectionPoint xmi:id="_WVfH4MbbEeSvmLj5mtpd2g" name="EntryPoint1" kind="entryPoint"/>
+              <connectionPoint xmi:id="_W86UQMbbEeSvmLj5mtpd2g" name="ExitPoint1" kind="exitPoint"/>
+              <connectionPoint xmi:id="_XUhjAMbbEeSvmLj5mtpd2g" name="ExitPoint2" kind="exitPoint"/>
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_apcfYBbHEeWa4sJtLVaM7A" name="saving_EN">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Saving}.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Saving}.&quot; &lt;&lt; std::endl;
 </body>
               </entry>
-              <region xmi:type="uml:Region" xmi:id="_WVcEksbbEeSvmLj5mtpd2g">
-                <transition xmi:type="uml:Transition" xmi:id="_-HJfIMbbEeSvmLj5mtpd2g" name="getStorage" source="_WVfH4MbbEeSvmLj5mtpd2g" target="_fsiW0MbbEeSvmLj5mtpd2g">
+              <region xmi:id="_WVcEksbbEeSvmLj5mtpd2g">
+                <transition xmi:id="_-HJfIMbbEeSvmLj5mtpd2g" name="getStorage" source="_WVfH4MbbEeSvmLj5mtpd2g" target="_fsiW0MbbEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Kn8eQMeBEeSz1oN1Kl4Now" name="requestStorageDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
-
-if ( resourcePort.requestStorageDriver().send() ) {
-	std::cout &lt;&lt; &quot; requested a storage driver&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot;FAILed to request a storage driver&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
+    if ( resourcePort.requestStorageDriver().send() ) {
+    std::cout &lt;&lt; &quot; requested a storage driver&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;FAILed to request a storage driver&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_-rGgwMbbEeSvmLj5mtpd2g" name="onSaveStatus" source="_iQYMkMbbEeSvmLj5mtpd2g" target="_u_tRwMeSEeSz1oN1Kl4Now">
+                <transition xmi:id="_-rGgwMbbEeSvmLj5mtpd2g" name="onSaveStatus" source="_iQYMkMbbEeSvmLj5mtpd2g" target="_u_tRwMeSEeSz1oN1Kl4Now">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_cysfEMbfEeSvmLj5mtpd2g" name="saveProgress">
                     <language>C++</language>
-                    <body>progress = (int) *rtdata;</body>
+                    <body>    progress = (int) *rtdata;
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_JcYKoMbfEeSvmLj5mtpd2g" name="onStatus" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
+                  <trigger xmi:id="_JcYKoMbfEeSvmLj5mtpd2g" name="onStatus" event="_2QT44MXiEeSsD5C2f30z-g" port="_jacOAMYBEeSsD5C2f30z-g"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="__LtTcMbbEeSvmLj5mtpd2g" name="onResNotAvail" source="_fsiW0MbbEeSvmLj5mtpd2g" target="_W86UQMbbEeSvmLj5mtpd2g">
+                <transition xmi:id="__LtTcMbbEeSvmLj5mtpd2g" name="onResNotAvail" source="_fsiW0MbbEeSvmLj5mtpd2g" target="_W86UQMbbEeSvmLj5mtpd2g">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_lmUFAMeIEeSz1oN1Kl4Now" name="noStorageAvailable">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[APPLICATION] storage driver not available&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[APPLICATION] storage driver not available&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_da2HkO4YEeSJPsWo_Mnp3w" name="onResNotAvail" event="_AFeJgMXKEeSsD5C2f30z-g" port="_JKtYAMQPEeSirL7ina4YrA"/>
+                  <trigger xmi:id="_da2HkO4YEeSJPsWo_Mnp3w" name="onResNotAvail" event="_AFeJgMXKEeSsD5C2f30z-g" port="_JKtYAMQPEeSirL7ina4YrA"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_AASLAMbcEeSvmLj5mtpd2g" name="saveCompleted" guard="_8nqKoMeREeSz1oN1Kl4Now" source="_u_tRwMeSEeSz1oN1Kl4Now" target="_XUhjAMbbEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_8nqKoMeREeSz1oN1Kl4Now" name="progress_GTE_100">
+                <transition xmi:id="_AASLAMbcEeSvmLj5mtpd2g" name="saveCompleted" guard="_8nqKoMeREeSz1oN1Kl4Now" source="_u_tRwMeSEeSz1oN1Kl4Now" target="_XUhjAMbbEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_8nqKoMeREeSz1oN1Kl4Now" name="progress_GTE_100">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_8nqKoceREeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( progress >= 100 );</body>
+                      <body>    return( progress >= 100 );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_xGvAAMbfEeSvmLj5mtpd2g" name="releaseStorage Driver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] has no more data&quot;;
-
-status = usbPort.eod().send();
-if ( status ) {
-	std::cout &lt;&lt; &quot; - sent EOD&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; - FAILed to send EOD&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] has no more data&quot;;
+    status = usbPort.eod().send();
+    if ( status ) {
+    std::cout &lt;&lt; &quot; - sent EOD&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; - FAILed to send EOD&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_BdvAcMbcEeSvmLj5mtpd2g" name="onStorageResource" source="_fsiW0MbbEeSvmLj5mtpd2g" target="_Ntc9AMeJEeSz1oN1Kl4Now">
+                <transition xmi:id="_BdvAcMbcEeSvmLj5mtpd2g" name="onStorageResource" source="_fsiW0MbbEeSvmLj5mtpd2g" target="_Ntc9AMeJEeSz1oN1Kl4Now">
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_mJe9IMeAEeSz1oN1Kl4Now" name="importStorageDriver">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-storageID = (UMLRTCapsuleId) *rtdata;
-
-if ( storageID.isValid() ) {
-	importOK = frame.import(storageID,deviceInterface );
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] importing a storage driver.&quot; &lt;&lt; std::endl;
-} else {
-	importOK = false;
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Invalid StorageDriver ID.&quot; &lt;&lt; std::endl;
-}
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    storageID = (UMLRTCapsuleId) *rtdata;
+    if ( storageID.isValid() ) {
+    importOK = frame.import(storageID,deviceInterface );
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] importing a storage driver.&quot; &lt;&lt; std::endl;
+    } else {
+    importOK = false;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Invalid StorageDriver ID.&quot; &lt;&lt; std::endl;
+    }
 </body>
                   </effect>
-                  <trigger xmi:type="uml:Trigger" xmi:id="_kLLacMbdEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_JKtYAMQPEeSirL7ina4YrA"/>
+                  <trigger xmi:id="_kLLacMbdEeSvmLj5mtpd2g" name="onResourceID" event="_WOVBgMQeEeSirL7ina4YrA" port="_JKtYAMQPEeSirL7ina4YrA"/>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_You-0MeJEeSz1oN1Kl4Now" name="importNOK" guard="_kX8X8MeJEeSz1oN1Kl4Now" source="_Ntc9AMeJEeSz1oN1Kl4Now" target="_W86UQMbbEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_kX8X8MeJEeSz1oN1Kl4Now" name="importNOK">
+                <transition xmi:id="_You-0MeJEeSz1oN1Kl4Now" name="importNOK" guard="_kX8X8MeJEeSz1oN1Kl4Now" source="_Ntc9AMeJEeSz1oN1Kl4Now" target="_W86UQMbbEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_kX8X8MeJEeSz1oN1Kl4Now" name="importNOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_kX8X8ceJEeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( ! importOK );</body>
+                      <body>    return( ! importOK );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_k0IWQO08EeStM4MpdkuAjQ" name="CouldNotImport">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[APPLICATION] could not import storage driver&quot; &lt;&lt; std::endl;</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[APPLICATION] could not import storage driver&quot; &lt;&lt; std::endl;
+</body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_bzo0kMeJEeSz1oN1Kl4Now" name="importOK" guard="_rXnf0MeJEeSz1oN1Kl4Now" source="_Ntc9AMeJEeSz1oN1Kl4Now" target="_Rea8YO4ZEeSJPsWo_Mnp3w">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_rXnf0MeJEeSz1oN1Kl4Now" name="importOK">
+                <transition xmi:id="_bzo0kMeJEeSz1oN1Kl4Now" name="importOK" guard="_rXnf0MeJEeSz1oN1Kl4Now" source="_Ntc9AMeJEeSz1oN1Kl4Now" target="_Rea8YO4ZEeSJPsWo_Mnp3w">
+                  <ownedRule xmi:id="_rXnf0MeJEeSz1oN1Kl4Now" name="importOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_rXoG4MeJEeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( importOK );</body>
+                      <body>    return( importOK );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_790dEMeJEeSz1oN1Kl4Now" name="saveDocument">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-status = usbPort.data(document).send();
-if ( status ) {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sends document to save&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] error sending document to save&quot; &lt;&lt; std::endl;
-}</body>
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    status = usbPort.data(document).send();
+    if ( status ) {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sends document to save&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] error sending document to save&quot; &lt;&lt; std::endl;
+    }
+</body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_0H5TkMeSEeSz1oN1Kl4Now" name="printSaveProgress" guard="_OrRroMeTEeSz1oN1Kl4Now" source="_u_tRwMeSEeSz1oN1Kl4Now" target="_iQYMkMbbEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_OrRroMeTEeSz1oN1Kl4Now" name="progress_LT_100">
+                <transition xmi:id="_0H5TkMeSEeSz1oN1Kl4Now" name="printSaveProgress" guard="_OrRroMeTEeSz1oN1Kl4Now" source="_u_tRwMeSEeSz1oN1Kl4Now" target="_iQYMkMbbEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_OrRroMeTEeSz1oN1Kl4Now" name="progress_LT_100">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_OrRroceTEeSz1oN1Kl4Now">
                       <language>C++</language>
-                      <body>return( progress &lt; 100 );</body>
+                      <body>    return( progress &lt; 100 );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Coi5kMeTEeSz1oN1Kl4Now" name="printSaveProgress">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Saving...&quot; &lt;&lt; (int) progress &lt;&lt; &quot;%%&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Saving...&quot; &lt;&lt; (int) progress &lt;&lt; &quot;%%&quot; &lt;&lt; std::endl;
 </body>
                   </effect>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_Upvo4O4ZEeSJPsWo_Mnp3w" name="isOK" guard="_7uIqcO4ZEeSJPsWo_Mnp3w" source="_Rea8YO4ZEeSJPsWo_Mnp3w" target="_iQYMkMbbEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_7uIqcO4ZEeSJPsWo_Mnp3w" name="isOK">
+                <transition xmi:id="_Upvo4O4ZEeSJPsWo_Mnp3w" name="isOK" guard="_7uIqcO4ZEeSJPsWo_Mnp3w" source="_Rea8YO4ZEeSJPsWo_Mnp3w" target="_iQYMkMbbEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_7uIqcO4ZEeSJPsWo_Mnp3w" name="isOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_7uIqce4ZEeSJPsWo_Mnp3w" name="statusTrue">
                       <language>C++</language>
-                      <body>return( status );</body>
+                      <body>    return( status );
+</body>
                     </specification>
                   </ownedRule>
                 </transition>
-                <transition xmi:type="uml:Transition" xmi:id="_VruqUO4ZEeSJPsWo_Mnp3w" name="isNOK" guard="_EXhiIO4aEeSJPsWo_Mnp3w" source="_Rea8YO4ZEeSJPsWo_Mnp3w" target="_W86UQMbbEeSvmLj5mtpd2g">
-                  <ownedRule xmi:type="uml:Constraint" xmi:id="_EXhiIO4aEeSJPsWo_Mnp3w" name="statusNOK">
+                <transition xmi:id="_VruqUO4ZEeSJPsWo_Mnp3w" name="isNOK" guard="_EXhiIO4aEeSJPsWo_Mnp3w" source="_Rea8YO4ZEeSJPsWo_Mnp3w" target="_W86UQMbbEeSvmLj5mtpd2g">
+                  <ownedRule xmi:id="_EXhiIO4aEeSJPsWo_Mnp3w" name="statusNOK">
                     <specification xmi:type="uml:OpaqueExpression" xmi:id="_EXhiIe4aEeSJPsWo_Mnp3w" name="statusNOK">
                       <language>C++</language>
-                      <body>return ( ! status );</body>
+                      <body>    return ( ! status );
+</body>
                     </specification>
                   </ownedRule>
                   <effect xmi:type="uml:OpaqueBehavior" xmi:id="_ZsBegPBfEeSy0dZlYL7EHw" name="couldNotSave">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not save document&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] could not save document&quot; &lt;&lt; std::endl;
 </body>
                   </effect>
                 </transition>
                 <subvertex xmi:type="uml:State" xmi:id="_fsiW0MbbEeSvmLj5mtpd2g" name="WaitForStorage">
                   <entry xmi:type="uml:OpaqueBehavior" xmi:id="_JqErwO4YEeSJPsWo_Mnp3w" name="waitingForStorage">
                     <language>C++</language>
-                    <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] waiting for storage driver&quot; &lt;&lt; std::endl;
+                    <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] waiting for storage driver&quot; &lt;&lt; std::endl;
 </body>
                   </entry>
                 </subvertex>
@@ -1266,17 +1205,17 @@
       </packagedElement>
       <packagedElement xmi:type="uml:Usage" xmi:id="_IVP_8PBfEeSy0dZlYL7EHw" client="_9YrV0MOJEeSSS8SwKHucgQ" supplier="_e2WAMMQeEeSirL7ina4YrA"/>
       <packagedElement xmi:type="uml:Association" xmi:id="_rNRccAiBEeWmptSG6Ct2-w" visibility="protected" memberEnd="_rNdCoAiBEeWmptSG6Ct2-w _0JrmgMQUEeSirL7ina4YrA" navigableOwnedEnd="_0JrmgMQUEeSirL7ina4YrA">
-        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rNZ_UAiBEeWmptSG6Ct2-w" source="org.eclipse.papyrus">
-          <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rNamYAiBEeWmptSG6Ct2-w" key="nature" value="UML_Nature"/>
+        <eAnnotations xmi:id="_rNZ_UAiBEeWmptSG6Ct2-w" source="org.eclipse.papyrus">
+          <details xmi:id="_rNamYAiBEeWmptSG6Ct2-w" key="nature" value="UML_Nature"/>
         </eAnnotations>
-        <ownedEnd xmi:type="uml:Property" xmi:id="_0JrmgMQUEeSirL7ina4YrA" name="applicationType" visibility="protected" type="_5luYcMQUEeSirL7ina4YrA" aggregation="composite" association="_rNRccAiBEeWmptSG6Ct2-w"/>
-        <ownedEnd xmi:type="uml:Property" xmi:id="_rNdCoAiBEeWmptSG6Ct2-w" name="application" type="_N2fr8MOyEeSxS9_G15_gSg" association="_rNRccAiBEeWmptSG6Ct2-w"/>
+        <ownedEnd xmi:id="_0JrmgMQUEeSirL7ina4YrA" name="applicationType" visibility="protected" type="_5luYcMQUEeSirL7ina4YrA" aggregation="composite" association="_rNRccAiBEeWmptSG6Ct2-w"/>
+        <ownedEnd xmi:id="_rNdCoAiBEeWmptSG6Ct2-w" name="application" type="_N2fr8MOyEeSxS9_G15_gSg" association="_rNRccAiBEeWmptSG6Ct2-w"/>
       </packagedElement>
       <packagedElement xmi:type="uml:Association" xmi:id="_ZtZPwAiCEeWmptSG6Ct2-w" visibility="protected" memberEnd="_Ztad4QiCEeWmptSG6Ct2-w _WvYkUMQXEeSirL7ina4YrA">
-        <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZtZ20AiCEeWmptSG6Ct2-w" source="org.eclipse.papyrus">
-          <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZtZ20QiCEeWmptSG6Ct2-w" key="nature" value="UML_Nature"/>
+        <eAnnotations xmi:id="_ZtZ20AiCEeWmptSG6Ct2-w" source="org.eclipse.papyrus">
+          <details xmi:id="_ZtZ20QiCEeWmptSG6Ct2-w" key="nature" value="UML_Nature"/>
         </eAnnotations>
-        <ownedEnd xmi:type="uml:Property" xmi:id="_Ztad4QiCEeWmptSG6Ct2-w" name="wordprocessorapp" type="_9YrV0MOJEeSSS8SwKHucgQ" association="_ZtZPwAiCEeWmptSG6Ct2-w"/>
+        <ownedEnd xmi:id="_Ztad4QiCEeWmptSG6Ct2-w" name="wordprocessorapp" type="_9YrV0MOJEeSSS8SwKHucgQ" association="_ZtZPwAiCEeWmptSG6Ct2-w"/>
       </packagedElement>
     </packagedElement>
     <packagedElement xmi:type="uml:Package" xmi:id="_9LmtsMOKEeSSS8SwKHucgQ" name="Hardware">
@@ -1286,28 +1225,28 @@
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_OtZUMMOxEeSxS9_G15_gSg" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_OtdloMOxEeSxS9_G15_gSg" value="1"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_WXpRoMOGEeSSS8SwKHucgQ" name="deviceClass" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite">
+          <ownedAttribute xmi:id="_WXpRoMOGEeSSS8SwKHucgQ" name="deviceClass" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite">
             <defaultValue xmi:type="uml:InstanceValue" xmi:id="_pE2XoMOGEeSSS8SwKHucgQ" type="_bFD18IB9EeSeANT-DfY5oA" instance="_flU8IIB9EeSeANT-DfY5oA"/>
           </ownedAttribute>
           <ownedAttribute xmi:type="uml:Port" xmi:id="_vXWH4MXgEeSsD5C2f30z-g" name="usbInPort" type="_6tx6sIB-EeSeANT-DfY5oA" isOrdered="true" aggregation="composite" isConjugated="true"/>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_QheE4MgaEeSjr4LTYwlKOw" name="busID" visibility="protected" aggregation="composite">
+          <ownedAttribute xmi:id="_QheE4MgaEeSjr4LTYwlKOw" name="busID" visibility="protected" aggregation="composite">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
             <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_TEJxwBEQEeWflIKGXXXMWw"/>
           </ownedAttribute>
-          <ownedConnector xmi:type="uml:Connector" xmi:id="_GcZp4I--EeWMLsWj-jBDew" name="Connector1">
-            <end xmi:type="uml:ConnectorEnd" xmi:id="_GcctMI--EeWMLsWj-jBDew" role="_ui7KkICCEeSeANT-DfY5oA"/>
-            <end xmi:type="uml:ConnectorEnd" xmi:id="_GcdUQI--EeWMLsWj-jBDew" role="_vXWH4MXgEeSsD5C2f30z-g"/>
+          <ownedConnector xmi:id="_GcZp4I--EeWMLsWj-jBDew" name="Connector1">
+            <end xmi:id="_GcctMI--EeWMLsWj-jBDew" role="_ui7KkICCEeSeANT-DfY5oA"/>
+            <end xmi:id="_GcdUQI--EeWMLsWj-jBDew" role="_vXWH4MXgEeSsD5C2f30z-g"/>
           </ownedConnector>
         </packagedElement>
         <packagedElement xmi:type="uml:Class" xmi:id="_vk5ZsMOFEeSSS8SwKHucgQ" name="USBPrinterDriver" isActive="true">
-          <generalization xmi:type="uml:Generalization" xmi:id="_4Rk18MOFEeSSS8SwKHucgQ" general="_ZUBdgIB6EeSeANT-DfY5oA"/>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_7mBMwMOGEeSSS8SwKHucgQ" name="usbDevice" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite" redefinedProperty="_WXpRoMOGEeSSS8SwKHucgQ">
+          <generalization xmi:id="_4Rk18MOFEeSSS8SwKHucgQ" general="_ZUBdgIB6EeSeANT-DfY5oA"/>
+          <ownedAttribute xmi:id="_7mBMwMOGEeSSS8SwKHucgQ" name="usbDevice" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite" redefinedProperty="_WXpRoMOGEeSSS8SwKHucgQ">
             <defaultValue xmi:type="uml:InstanceValue" xmi:id="_UOIyAMOHEeSSS8SwKHucgQ" type="_bFD18IB9EeSeANT-DfY5oA" instance="_qBD7MIB9EeSeANT-DfY5oA"/>
           </ownedAttribute>
         </packagedElement>
         <packagedElement xmi:type="uml:Class" xmi:id="_z6QQYMOFEeSSS8SwKHucgQ" name="USBStorageDriver" isActive="true">
-          <generalization xmi:type="uml:Generalization" xmi:id="_47ZPAMOFEeSSS8SwKHucgQ" general="_ZUBdgIB6EeSeANT-DfY5oA"/>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_FqE2MMOIEeSSS8SwKHucgQ" name="deviceClass" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite" redefinedProperty="_WXpRoMOGEeSSS8SwKHucgQ">
+          <generalization xmi:id="_47ZPAMOFEeSSS8SwKHucgQ" general="_ZUBdgIB6EeSeANT-DfY5oA"/>
+          <ownedAttribute xmi:id="_FqE2MMOIEeSSS8SwKHucgQ" name="deviceClass" visibility="protected" isStatic="true" type="_bFD18IB9EeSeANT-DfY5oA" isReadOnly="true" aggregation="composite" redefinedProperty="_WXpRoMOGEeSSS8SwKHucgQ">
             <defaultValue xmi:type="uml:InstanceValue" xmi:id="_WYxoIMOIEeSSS8SwKHucgQ" type="_bFD18IB9EeSeANT-DfY5oA" instance="_u6g9cIB9EeSeANT-DfY5oA"/>
           </ownedAttribute>
         </packagedElement>
@@ -1316,143 +1255,133 @@
       <packagedElement xmi:type="uml:Package" xmi:id="_Ik9B0MXLEeSsD5C2f30z-g" name="ExternalDevices">
         <packagedElement xmi:type="uml:Class" xmi:id="_CperoMOLEeSSS8SwKHucgQ" name="LocalPrinter" visibility="public" classifierBehavior="_Qm-r0MOMEeSSS8SwKHucgQ" isActive="true">
           <ownedAttribute xmi:type="uml:Port" xmi:id="_SSMs8MOLEeSSS8SwKHucgQ" name="usbPort" type="_6tx6sIB-EeSeANT-DfY5oA" isOrdered="true" aggregation="composite" isBehavior="true"/>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_ra0FQMONEeSSS8SwKHucgQ" name="usbClass" visibility="protected" type="_bFD18IB9EeSeANT-DfY5oA" aggregation="composite">
+          <ownedAttribute xmi:id="_ra0FQMONEeSSS8SwKHucgQ" name="usbClass" visibility="protected" type="_bFD18IB9EeSeANT-DfY5oA" aggregation="composite">
             <defaultValue xmi:type="uml:InstanceValue" xmi:id="_2TmzwMONEeSSS8SwKHucgQ" type="_bFD18IB9EeSeANT-DfY5oA" instance="_qBD7MIB9EeSeANT-DfY5oA"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_a1y-UMOOEeSSS8SwKHucgQ" name="connectionStatus" visibility="protected" aggregation="composite">
+          <ownedAttribute xmi:id="_a1y-UMOOEeSSS8SwKHucgQ" name="connectionStatus" visibility="protected" aggregation="composite">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
           </ownedAttribute>
           <ownedAttribute xmi:type="uml:Port" xmi:id="_hwfLcO0CEeSVocSGS756bA" name="log" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
             <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6kIb0IeXEeSVyrlWP4nYew"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_x2khYO0GEeSzlZWHZcnPXA" name="printingData" visibility="protected">
+          <ownedAttribute xmi:id="_x2khYO0GEeSzlZWHZcnPXA" name="printingData" visibility="protected">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
             <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_8iHeEO0GEeSzlZWHZcnPXA"/>
           </ownedAttribute>
           <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_Qm-r0MOMEeSSS8SwKHucgQ" name="LocalPrinter_SM" isReentrant="false">
-            <region xmi:type="uml:Region" xmi:id="_Shge0MOMEeSSS8SwKHucgQ" name="Region1">
-              <transition xmi:type="uml:Transition" xmi:id="_wVMKAMOMEeSSS8SwKHucgQ" name="initialize" source="_oTeWUMOMEeSSS8SwKHucgQ" target="_RN0-gMOOEeSSS8SwKHucgQ">
+            <region xmi:id="_Shge0MOMEeSSS8SwKHucgQ" name="Region1">
+              <transition xmi:id="_wVMKAMOMEeSSS8SwKHucgQ" name="initialize" source="_oTeWUMOMEeSSS8SwKHucgQ" target="_RN0-gMOOEeSSS8SwKHucgQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="__DwQMMOMEeSSS8SwKHucgQ" name="Connect_Printer">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing.&quot; &lt;&lt; std::endl;
-
-connectionStatus = usbPort.deviceClass(usbClass).send();
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing.&quot; &lt;&lt; std::endl;
+    connectionStatus = usbPort.deviceClass(usbClass).send();
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_WwbrcMOOEeSSS8SwKHucgQ" name="MsgSendFail" guard="_6xVG0MOOEeSSS8SwKHucgQ" source="_RN0-gMOOEeSSS8SwKHucgQ" target="_TRQO0MOOEeSSS8SwKHucgQ">
-                <ownedRule xmi:type="uml:Constraint" xmi:id="_6xVG0MOOEeSSS8SwKHucgQ" name="ifNotConnected">
+              <transition xmi:id="_WwbrcMOOEeSSS8SwKHucgQ" name="MsgSendFail" guard="_6xVG0MOOEeSSS8SwKHucgQ" source="_RN0-gMOOEeSSS8SwKHucgQ" target="_TRQO0MOOEeSSS8SwKHucgQ">
+                <ownedRule xmi:id="_6xVG0MOOEeSSS8SwKHucgQ" name="ifNotConnected">
                   <specification xmi:type="uml:OpaqueExpression" xmi:id="_6xVG0cOOEeSSS8SwKHucgQ">
                     <language>C++</language>
-                    <body>return(! connectionStatus);</body>
+                    <body>    return(! connectionStatus);
+</body>
                   </specification>
                 </ownedRule>
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_rVg5EMOOEeSSS8SwKHucgQ" name="PrinterConnectionFailed">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Error sending device class to hub : connection failed {&quot; &lt;&lt; connectionStatus &lt;&lt; &quot;]&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Error sending device class to hub : connection failed {&quot; &lt;&lt; connectionStatus &lt;&lt; &quot;]&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_7_MBEMOOEeSSS8SwKHucgQ" name="MessageSent" guard="_BNpC8MOPEeSSS8SwKHucgQ" source="_RN0-gMOOEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
-                <ownedRule xmi:type="uml:Constraint" xmi:id="_BNpC8MOPEeSSS8SwKHucgQ" name="ifConnected">
+              <transition xmi:id="_7_MBEMOOEeSSS8SwKHucgQ" name="MessageSent" guard="_BNpC8MOPEeSSS8SwKHucgQ" source="_RN0-gMOOEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
+                <ownedRule xmi:id="_BNpC8MOPEeSSS8SwKHucgQ" name="ifConnected">
                   <specification xmi:type="uml:OpaqueExpression" xmi:id="_BNpC8cOPEeSSS8SwKHucgQ">
                     <language>C++</language>
-                    <body>return(connectionStatus);</body>
+                    <body>    return(connectionStatus);
+</body>
                   </specification>
                 </ownedRule>
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_rPoUsMOoEeSy9Z1Kd1VJnQ" name="DeviceClassSent">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent its device class to the hub and is now {Connected}.&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent its device class to the hub and is now {Connected}.&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_fyXCIMOSEeSSS8SwKHucgQ" name="onData" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
+              <transition xmi:id="_fyXCIMOSEeSSS8SwKHucgQ" name="onData" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_mQV8wMOTEeSSS8SwKHucgQ" name="PrintData" isReentrant="false">
                   <language>C++</language>
-                  <body>/**
- * Only show logging start on 1st dataset received
- */
-if ( ! printingData ) {
-	time_t currentTime;
-	struct tm *localTime;
-	time( &amp;currentTime );
-	localTime = localtime( &amp;currentTime );
-	std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing Start ==========&quot; &lt;&lt; std::endl;
-
-	printingData = true;
-}
-
-std::cout &lt;&lt; (char *) umlrtparam_data;
-
-usbPort.status(100).send();
+                  <body>    /**
+    * Only show logging start on 1st dataset received
+    */
+    if ( ! printingData ) {
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing Start ==========&quot; &lt;&lt; std::endl;
+    printingData = true;
+    }
+    std::cout &lt;&lt; (char *) umlrtparam_data;
+    usbPort.status(100).send();
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_AszC4MOTEeSSS8SwKHucgQ" event="_sd1YQICAEeSeANT-DfY5oA" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
+                <trigger xmi:id="_AszC4MOTEeSSS8SwKHucgQ" event="_sd1YQICAEeSeANT-DfY5oA" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_nsX14MOTEeSSS8SwKHucgQ" name="onEOD" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
+              <transition xmi:id="_nsX14MOTEeSSS8SwKHucgQ" name="onEOD" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Li3_IMOUEeSSS8SwKHucgQ" name="PrintingEnd">
                   <language>C++</language>
-                  <body>std::cout &lt;&lt; std::endl;
-
-time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing Ended ==========&quot; &lt;&lt; std::endl;
-
-printingData = false;
+                  <body>    std::cout &lt;&lt; std::endl;
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Printing Ended ==========&quot; &lt;&lt; std::endl;
+    printingData = false;
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_BnKj8MOUEeSSS8SwKHucgQ" name="onEOD" event="_sh4x0ICAEeSeANT-DfY5oA" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
+                <trigger xmi:id="_BnKj8MOUEeSSS8SwKHucgQ" name="onEOD" event="_sh4x0ICAEeSeANT-DfY5oA" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_a7hUYMOlEeSy9Z1Kd1VJnQ" name="onEject" visibility="package" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_TRQO0MOOEeSSS8SwKHucgQ">
+              <transition xmi:id="_a7hUYMOlEeSy9Z1Kd1VJnQ" name="onEject" visibility="package" source="_tkuNgMOMEeSSS8SwKHucgQ" target="_TRQO0MOOEeSSS8SwKHucgQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_13uUwMOoEeSy9Z1Kd1VJnQ" name="EjectPrinter">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ejected!&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ejected!&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_JWF5UMOmEeSy9Z1Kd1VJnQ" name="onEject" event="__0FOoMW1EeSd16LgMAJOmw" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
+                <trigger xmi:id="_JWF5UMOmEeSy9Z1Kd1VJnQ" name="onEject" event="__0FOoMW1EeSd16LgMAJOmw" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_RadG8AuoEeWCGuiso4e4-g" name="onConnect" source="_TRQO0MOOEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
+              <transition xmi:id="_RadG8AuoEeWCGuiso4e4-g" name="onConnect" source="_TRQO0MOOEeSSS8SwKHucgQ" target="_tkuNgMOMEeSSS8SwKHucgQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_DS0ocAupEeWCGuiso4e4-g" name="connectingPrinter">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received a connection request and is now in {Connected} state.&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received a connection request and is now in {Connected} state.&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_j7ojIAuoEeWCGuiso4e4-g" name="onConnect" event="_CudmMMXkEeSsD5C2f30z-g" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
+                <trigger xmi:id="_j7ojIAuoEeWCGuiso4e4-g" name="onConnect" event="_CudmMMXkEeSsD5C2f30z-g" port="_SSMs8MOLEeSSS8SwKHucgQ"/>
               </transition>
               <subvertex xmi:type="uml:Pseudostate" xmi:id="_oTeWUMOMEeSSS8SwKHucgQ" name="Initial1"/>
               <subvertex xmi:type="uml:State" xmi:id="_tkuNgMOMEeSSS8SwKHucgQ" name="Connected"/>
@@ -1460,13 +1389,12 @@
               <subvertex xmi:type="uml:State" xmi:id="_TRQO0MOOEeSSS8SwKHucgQ" name="Disconnected">
                 <entry xmi:type="uml:OpaqueBehavior" xmi:id="_0AZmkO0EEeST5KnPUdkGIg" name="Disconnected">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in {Disconnected} state.&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in {Disconnected} state.&quot; &lt;&lt; std::endl;
 </body>
                 </entry>
               </subvertex>
@@ -1475,162 +1403,148 @@
         </packagedElement>
         <packagedElement xmi:type="uml:Class" xmi:id="_FTGZQMOLEeSSS8SwKHucgQ" name="ExtMassStorage" classifierBehavior="_cv6NsMOmEeSy9Z1Kd1VJnQ" isActive="true">
           <ownedAttribute xmi:type="uml:Port" xmi:id="_q4ZLUMOmEeSy9Z1Kd1VJnQ" name="usbPort" visibility="public" type="_6tx6sIB-EeSeANT-DfY5oA" isOrdered="true" aggregation="composite" isBehavior="true"/>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_d692IMOnEeSy9Z1Kd1VJnQ" name="usbClass" visibility="protected" type="_bFD18IB9EeSeANT-DfY5oA" aggregation="composite">
+          <ownedAttribute xmi:id="_d692IMOnEeSy9Z1Kd1VJnQ" name="usbClass" visibility="protected" type="_bFD18IB9EeSeANT-DfY5oA" aggregation="composite">
             <defaultValue xmi:type="uml:InstanceValue" xmi:id="_d692IcOnEeSy9Z1Kd1VJnQ" type="_bFD18IB9EeSeANT-DfY5oA" instance="_u6g9cIB9EeSeANT-DfY5oA"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_iKKlAMOoEeSy9Z1Kd1VJnQ" name="connectionStatus" visibility="protected" aggregation="composite">
+          <ownedAttribute xmi:id="_iKKlAMOoEeSy9Z1Kd1VJnQ" name="connectionStatus" visibility="protected" aggregation="composite">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
           </ownedAttribute>
           <ownedAttribute xmi:type="uml:Port" xmi:id="_DzjO4O0IEeSzlZWHZcnPXA" name="log" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
             <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6kIb0IeXEeSVyrlWP4nYew"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_e9HAsO0JEeSzlZWHZcnPXA" name="savingData" visibility="protected">
+          <ownedAttribute xmi:id="_e9HAsO0JEeSzlZWHZcnPXA" name="savingData" visibility="protected">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
             <defaultValue xmi:type="uml:LiteralBoolean" xmi:id="_jlVwEO0JEeSzlZWHZcnPXA"/>
           </ownedAttribute>
-          <ownedAttribute xmi:type="uml:Property" xmi:id="_cLxEMBa7EeWD0440ocvGbg" name="lineCount" visibility="protected" aggregation="composite">
+          <ownedAttribute xmi:id="_cLxEMBa7EeWD0440ocvGbg" name="lineCount" visibility="protected" aggregation="composite">
             <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8heigBydEduyofBvg4RL2w"/>
           </ownedAttribute>
           <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_cv6NsMOmEeSy9Z1Kd1VJnQ" name="ExtMassStorage_SM" isReentrant="false">
-            <region xmi:type="uml:Region" xmi:id="_d298YMOmEeSy9Z1Kd1VJnQ" name="Region1">
-              <transition xmi:type="uml:Transition" xmi:id="_YS9EwMOnEeSy9Z1Kd1VJnQ" name="initialize" source="_jTAHQMOmEeSy9Z1Kd1VJnQ" target="_OIT1sMOnEeSy9Z1Kd1VJnQ">
+            <region xmi:id="_d298YMOmEeSy9Z1Kd1VJnQ" name="Region1">
+              <transition xmi:id="_YS9EwMOnEeSy9Z1Kd1VJnQ" name="initialize" source="_jTAHQMOmEeSy9Z1Kd1VJnQ" target="_OIT1sMOnEeSy9Z1Kd1VJnQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_aJ3GkMOoEeSy9Z1Kd1VJnQ" name="Initialize">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing.&quot; &lt;&lt; std::endl;
-
-connectionStatus = usbPort.deviceClass(usbClass).send();
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] initializing.&quot; &lt;&lt; std::endl;
+    connectionStatus = usbPort.deviceClass(usbClass).send();
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_Y9i54MOnEeSy9Z1Kd1VJnQ" name="Connected" guard="_RACl4MOpEeSy9Z1Kd1VJnQ" source="_OIT1sMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
-                <ownedRule xmi:type="uml:Constraint" xmi:id="_RACl4MOpEeSy9Z1Kd1VJnQ" name="ifMsgSent">
+              <transition xmi:id="_Y9i54MOnEeSy9Z1Kd1VJnQ" name="Connected" guard="_RACl4MOpEeSy9Z1Kd1VJnQ" source="_OIT1sMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
+                <ownedRule xmi:id="_RACl4MOpEeSy9Z1Kd1VJnQ" name="ifMsgSent">
                   <specification xmi:type="uml:OpaqueExpression" xmi:id="_RACl4cOpEeSy9Z1Kd1VJnQ" name="Connected">
                     <language>C++</language>
-                    <body>return(connectionStatus);</body>
+                    <body>    return(connectionStatus);
+</body>
                   </specification>
                 </ownedRule>
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_e6gVoMOpEeSy9Z1Kd1VJnQ" name="deviceClassSent">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent its device class to the hub and is now in {Connected} state.&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] sent its device class to the hub and is now in {Connected} state.&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_ZiPiYMOnEeSy9Z1Kd1VJnQ" name="Connect Failed" guard="_nXcFsMOpEeSy9Z1Kd1VJnQ" source="_OIT1sMOnEeSy9Z1Kd1VJnQ" target="_Pm2QQMOnEeSy9Z1Kd1VJnQ">
-                <ownedRule xmi:type="uml:Constraint" xmi:id="_nXcFsMOpEeSy9Z1Kd1VJnQ" name="ifSendFailed">
+              <transition xmi:id="_ZiPiYMOnEeSy9Z1Kd1VJnQ" name="Connect Failed" guard="_nXcFsMOpEeSy9Z1Kd1VJnQ" source="_OIT1sMOnEeSy9Z1Kd1VJnQ" target="_Pm2QQMOnEeSy9Z1Kd1VJnQ">
+                <ownedRule xmi:id="_nXcFsMOpEeSy9Z1Kd1VJnQ" name="ifSendFailed">
                   <specification xmi:type="uml:OpaqueExpression" xmi:id="_nXcFscOpEeSy9Z1Kd1VJnQ" name="Connect Fail">
                     <language>C++</language>
-                    <body>return( ! connectionStatus );</body>
+                    <body>    return( ! connectionStatus );
+</body>
                   </specification>
                 </ownedRule>
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_zAwSMMOpEeSy9Z1Kd1VJnQ" name="logFailedConnection">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ERROR sending device class : Connection failed! {&quot; &lt;&lt;  connectionStatus &lt;&lt;  &quot;}.&quot;;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ERROR sending device class : Connection failed! {&quot; &lt;&lt;  connectionStatus &lt;&lt;  &quot;}.&quot;;
 </body>
                 </effect>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_aGZYUMOnEeSy9Z1Kd1VJnQ" name="Eject" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_Pm2QQMOnEeSy9Z1Kd1VJnQ">
+              <transition xmi:id="_aGZYUMOnEeSy9Z1Kd1VJnQ" name="Eject" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_Pm2QQMOnEeSy9Z1Kd1VJnQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_teR2MMOrEeSy9Z1Kd1VJnQ" name="DeviceEjected">
                   <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ejected&quot; &lt;&lt; std::endl;
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] ejected&quot; &lt;&lt; std::endl;
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_KZlkYMOrEeSy9Z1Kd1VJnQ" event="__0FOoMW1EeSd16LgMAJOmw" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
+                <trigger xmi:id="_KZlkYMOrEeSy9Z1Kd1VJnQ" event="__0FOoMW1EeSd16LgMAJOmw" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_zQlMAMOrEeSy9Z1Kd1VJnQ" name="onData" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
+              <transition xmi:id="_zQlMAMOrEeSy9Z1Kd1VJnQ" name="onData" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_4xXMoMOuEeSxS9_G15_gSg" name="SavingData">
                   <language>C++</language>
-                  <body>/**
- * Only show logging start on 1st dataset received
- */
-
-time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-
-if ( ! savingData ) {
-	std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] starts saving ==========&quot; &lt;&lt; std::endl;
-	savingData = true;
-	lineCount = 0;
-}
-
-/**
- * Now print the data
- */
-//std::cout &lt;&lt; (char *) *rtdata; // Still need debugging of data retrieval
-
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[ Output #&quot; &lt;&lt; std::setw(4) &lt;&lt; ++lineCount &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Aenean lacinia bibendum nulla sed consectetur.&quot; &lt;&lt; std::endl;
-
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
-
-if ( usbPort.status(100).send() ) {
-	std::cout &lt;&lt; &quot;sent status = &quot; &lt;&lt; 100 &lt;&lt; &quot;%&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot;ERROR sending status!&quot; &lt;&lt; std::endl;
-}
-
+                  <body>    /**
+    * Only show logging start on 1st dataset received
+    */
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    if ( ! savingData ) {
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] starts saving ==========&quot; &lt;&lt; std::endl;
+    savingData = true;
+    lineCount = 0;
+    }
+    /**
+    * Now print the data
+    */
+    //std::cout &lt;&lt; (char *) *rtdata; // Still need debugging of data retrieval
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[ Output #&quot; &lt;&lt; std::setw(4) &lt;&lt; ++lineCount &lt;&lt; &quot;] &quot; &lt;&lt; &quot;Aenean lacinia bibendum nulla sed consectetur.&quot; &lt;&lt; std::endl;
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
+    if ( usbPort.status(100).send() ) {
+    std::cout &lt;&lt; &quot;sent status = &quot; &lt;&lt; 100 &lt;&lt; &quot;%&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot;ERROR sending status!&quot; &lt;&lt; std::endl;
+    }
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_T9MMIMOsEeSy9Z1Kd1VJnQ" name="onData" event="_sd1YQICAEeSeANT-DfY5oA" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
+                <trigger xmi:id="_T9MMIMOsEeSy9Z1Kd1VJnQ" name="onData" event="_sd1YQICAEeSeANT-DfY5oA" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
               </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_7hNeEMOuEeSxS9_G15_gSg" name="onEOD" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
+              <transition xmi:id="_7hNeEMOuEeSxS9_G15_gSg" name="onEOD" source="_PG3vsMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
                 <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Qk3eEMOvEeSxS9_G15_gSg" name="DoneSaving">
                   <language>C++</language>
-                  <body>std::cout &lt;&lt; std::endl;&#xD;
-&#xD;
-time_t currentTime;&#xD;
-struct tm *localTime;&#xD;
-time( &amp;currentTime );&#xD;
-localTime = localtime( &amp;currentTime );&#xD;
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;&#xD;
-&#xD;
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Saving Ended =====&quot; &lt;&lt; std::endl;&#xD;
-&#xD;
-savingData = false;&#xD;
-&#xD;
-exit(0); </body>
-                </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_LiphYMOvEeSxS9_G15_gSg" event="_sh4x0ICAEeSeANT-DfY5oA" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
-              </transition>
-              <transition xmi:type="uml:Transition" xmi:id="_F60I8AuqEeWCGuiso4e4-g" name="onConnect" source="_Pm2QQMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
-                <effect xmi:type="uml:OpaqueBehavior" xmi:id="_wOAo0AuqEeWCGuiso4e4-g" name="onConnect">
-                  <language>C++</language>
-                  <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received connection request and is now in {Connected} state.&quot; &lt;&lt; std::endl;
+                  <body>    std::cout &lt;&lt; std::endl;
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] Saving Ended =====&quot; &lt;&lt; std::endl;
+    savingData = false;
+    exit(0); 
 </body>
                 </effect>
-                <trigger xmi:type="uml:Trigger" xmi:id="_pFa1gAuqEeWCGuiso4e4-g" name="onConnect" event="_CudmMMXkEeSsD5C2f30z-g" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
+                <trigger xmi:id="_LiphYMOvEeSxS9_G15_gSg" event="_sh4x0ICAEeSeANT-DfY5oA" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
+              </transition>
+              <transition xmi:id="_F60I8AuqEeWCGuiso4e4-g" name="onConnect" source="_Pm2QQMOnEeSy9Z1Kd1VJnQ" target="_PG3vsMOnEeSy9Z1Kd1VJnQ">
+                <effect xmi:type="uml:OpaqueBehavior" xmi:id="_wOAo0AuqEeWCGuiso4e4-g" name="onConnect">
+                  <language>C++</language>
+                  <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] received connection request and is now in {Connected} state.&quot; &lt;&lt; std::endl;
+</body>
+                </effect>
+                <trigger xmi:id="_pFa1gAuqEeWCGuiso4e4-g" name="onConnect" event="_CudmMMXkEeSsD5C2f30z-g" port="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
               </transition>
               <subvertex xmi:type="uml:Pseudostate" xmi:id="_jTAHQMOmEeSy9Z1Kd1VJnQ" name="Initial1"/>
               <subvertex xmi:type="uml:Pseudostate" xmi:id="_OIT1sMOnEeSy9Z1Kd1VJnQ" name="connected?" kind="choice"/>
@@ -1638,7 +1552,7 @@
               <subvertex xmi:type="uml:State" xmi:id="_Pm2QQMOnEeSy9Z1Kd1VJnQ" name="Disconnected">
                 <entry xmi:type="uml:OpaqueBehavior" xmi:id="_0yU18O0IEeSzlZWHZcnPXA" name="StorageDisconnected">
                   <language>C++</language>
-                  <body>std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in {Disconnected} state.&quot; &lt;&lt; std::endl;
+                  <body>    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is in {Disconnected} state.&quot; &lt;&lt; std::endl;
 </body>
                 </entry>
               </subvertex>
@@ -1651,32 +1565,32 @@
       <packagedElement xmi:type="uml:Package" xmi:id="_TL3RUMO2EeSxS9_G15_gSg" name="AppControl">
         <packagedElement xmi:type="uml:Collaboration" xmi:id="_vOIpQMO2EeSxS9_G15_gSg" name="AppControl"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_vOLFgMO2EeSxS9_G15_gSg" name="AppControl">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_tb5aIMO3EeSxS9_G15_gSg" name="createDocument">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_U6r-4BadEeWD0440ocvGbg" name="fileName">
+          <ownedOperation xmi:id="_tb5aIMO3EeSxS9_G15_gSg" name="createDocument">
+            <ownedParameter xmi:id="_U6r-4BadEeWD0440ocvGbg" name="fileName">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_5lVhgBydEduyofBvg4RL2w"/>
             </ownedParameter>
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_tb5aIcO3EeSxS9_G15_gSg" name="data">
+            <ownedParameter xmi:id="_tb5aIcO3EeSxS9_G15_gSg" name="data">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_0zpDwMO3EeSxS9_G15_gSg" name="printDocument"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_93x9wMO3EeSxS9_G15_gSg" name="saveDocument"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_efUQoMO4EeSxS9_G15_gSg" name="addToDoc"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_eHBBABacEeWD0440ocvGbg" name="openDocument">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_nENlgBacEeWD0440ocvGbg" name="fileName">
+          <ownedOperation xmi:id="_0zpDwMO3EeSxS9_G15_gSg" name="printDocument"/>
+          <ownedOperation xmi:id="_93x9wMO3EeSxS9_G15_gSg" name="saveDocument"/>
+          <ownedOperation xmi:id="_efUQoMO4EeSxS9_G15_gSg" name="addToDoc"/>
+          <ownedOperation xmi:id="_eHBBABacEeWD0440ocvGbg" name="openDocument">
+            <ownedParameter xmi:id="_nENlgBacEeWD0440ocvGbg" name="fileName">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_5lVhgBydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_D5z30BadEeWD0440ocvGbg" name="closeDocument"/>
+          <ownedOperation xmi:id="_D5z30BadEeWD0440ocvGbg" name="closeDocument"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Realization" xmi:id="_vONhwMO2EeSxS9_G15_gSg" name="ProtocolRealizesIncomingInterface" client="_vOIpQMO2EeSxS9_G15_gSg" supplier="_vOLFgMO2EeSxS9_G15_gSg"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_vOOI0MO2EeSxS9_G15_gSg" name="AppControl~">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_FlWGYMO4EeSxS9_G15_gSg" name="docID">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_FlWGYcO4EeSxS9_G15_gSg" name="docID">
+          <ownedOperation xmi:id="_FlWGYMO4EeSxS9_G15_gSg" name="docID">
+            <ownedParameter xmi:id="_FlWGYcO4EeSxS9_G15_gSg" name="docID">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_N6dfMMXREeSsD5C2f30z-g" name="error"/>
+          <ownedOperation xmi:id="_N6dfMMXREeSsD5C2f30z-g" name="error"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Usage" xmi:id="_vOQlEMO2EeSxS9_G15_gSg" name="ProtocolUsesOutgoingInterface" client="_vOIpQMO2EeSxS9_G15_gSg" supplier="_vOOI0MO2EeSxS9_G15_gSg"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_vORMIMO2EeSxS9_G15_gSg" name="AppControlIo"/>
@@ -1695,18 +1609,18 @@
       <packagedElement xmi:type="uml:Package" xmi:id="_pfCSoMQdEeSirL7ina4YrA" name="Resource">
         <packagedElement xmi:type="uml:Collaboration" xmi:id="_sSppwMQdEeSirL7ina4YrA" name="Resource"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_sSsGAMQdEeSirL7ina4YrA" name="Resource">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_qNHGYA8YEeWl7ddVi7dGGQ" name="requestPrinterDriver"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_vbZJIA8YEeWl7ddVi7dGGQ" name="requestStorageDriver"/>
+          <ownedOperation xmi:id="_qNHGYA8YEeWl7ddVi7dGGQ" name="requestPrinterDriver"/>
+          <ownedOperation xmi:id="_vbZJIA8YEeWl7ddVi7dGGQ" name="requestStorageDriver"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Realization" xmi:id="_sSw-gMQdEeSirL7ina4YrA" name="ProtocolRealizesIncomingInterface" client="_sSppwMQdEeSirL7ina4YrA" supplier="_sSsGAMQdEeSirL7ina4YrA"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_sSxlkMQdEeSirL7ina4YrA" name="Resource~">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_WOQwEMQeEeSirL7ina4YrA" name="resourceID">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_WOQwEcQeEeSirL7ina4YrA" name="resourceID">
+          <ownedOperation xmi:id="_WOQwEMQeEeSirL7ina4YrA" name="resourceID">
+            <ownedParameter xmi:id="_WOQwEcQeEeSirL7ina4YrA" name="resourceID">
               <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_GfwZUICSEeSeANT-DfY5oA"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_AFVmoMXKEeSsD5C2f30z-g" name="resNotAvail"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_bqDV0O4MEeSAlbC0LA6o5Q" name="resMgrRunning"/>
+          <ownedOperation xmi:id="_AFVmoMXKEeSsD5C2f30z-g" name="resNotAvail"/>
+          <ownedOperation xmi:id="_bqDV0O4MEeSAlbC0LA6o5Q" name="resMgrRunning"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Usage" xmi:id="_sS0o4MQdEeSirL7ina4YrA" name="ProtocolUsesOutgoingInterface" client="_sSppwMQdEeSirL7ina4YrA" supplier="_sSxlkMQdEeSirL7ina4YrA"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_sS1P8MQdEeSirL7ina4YrA" name="ResourceIo"/>
@@ -1724,33 +1638,33 @@
         <packagedElement xmi:type="uml:Interface" xmi:id="_B2K5sIB_EeSeANT-DfY5oA" name="USBProtocol"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_CSN8gIB_EeSeANT-DfY5oA" name="USBProtocol~"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_CwJOoIB_EeSeANT-DfY5oA" name="USBProtocolIo">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_w-GT4IB_EeSeANT-DfY5oA" name="data">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_VSn4AIFTEeSxK_Fl3WspFw" name="data">
+          <ownedOperation xmi:id="_w-GT4IB_EeSeANT-DfY5oA" name="data">
+            <ownedParameter xmi:id="_VSn4AIFTEeSxK_Fl3WspFw" name="data">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_8I6RgBydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_eWwv4ICAEeSeANT-DfY5oA" name="eod"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_B9ND4ICBEeSeANT-DfY5oA" name="ack"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_C9k7wICBEeSeANT-DfY5oA" name="resend"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="__0CyYMW1EeSd16LgMAJOmw" name="Eject"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_JWL3AMW2EeSd16LgMAJOmw" name="deviceClass">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_QTRk8MW2EeSd16LgMAJOmw" name="deviceClassID" type="_bFD18IB9EeSeANT-DfY5oA"/>
+          <ownedOperation xmi:id="_eWwv4ICAEeSeANT-DfY5oA" name="eod"/>
+          <ownedOperation xmi:id="_B9ND4ICBEeSeANT-DfY5oA" name="ack"/>
+          <ownedOperation xmi:id="_C9k7wICBEeSeANT-DfY5oA" name="resend"/>
+          <ownedOperation xmi:id="__0CyYMW1EeSd16LgMAJOmw" name="Eject"/>
+          <ownedOperation xmi:id="_JWL3AMW2EeSd16LgMAJOmw" name="deviceClass">
+            <ownedParameter xmi:id="_QTRk8MW2EeSd16LgMAJOmw" name="deviceClassID" type="_bFD18IB9EeSeANT-DfY5oA"/>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_2QQ1kMXiEeSsD5C2f30z-g" name="status">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_-CSncMXiEeSsD5C2f30z-g" name="percent">
+          <ownedOperation xmi:id="_2QQ1kMXiEeSsD5C2f30z-g" name="status">
+            <ownedParameter xmi:id="_-CSncMXiEeSsD5C2f30z-g" name="percent">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_CgVgEMXjEeSsD5C2f30z-g" name="error">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_JfGpAMXjEeSsD5C2f30z-g" name="errorCode" type="_Me6CAMXjEeSsD5C2f30z-g"/>
+          <ownedOperation xmi:id="_CgVgEMXjEeSsD5C2f30z-g" name="error">
+            <ownedParameter xmi:id="_JfGpAMXjEeSsD5C2f30z-g" name="errorCode" type="_Me6CAMXjEeSsD5C2f30z-g"/>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_CubJ8MXkEeSsD5C2f30z-g" name="connect"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_MHzsIICAEeSeANT-DfY5oA" name="setDeviceBusID">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_5x_NgIFSEeSxK_Fl3WspFw" name="busId" effect="read">
+          <ownedOperation xmi:id="_CubJ8MXkEeSsD5C2f30z-g" name="connect"/>
+          <ownedOperation xmi:id="_MHzsIICAEeSeANT-DfY5oA" name="setDeviceBusID">
+            <ownedParameter xmi:id="_5x_NgIFSEeSxK_Fl3WspFw" name="busId" effect="read">
               <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
             </ownedParameter>
           </ownedOperation>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_xW_ZgMXiEeSsD5C2f30z-g" name="getDeviceClass"/>
+          <ownedOperation xmi:id="_xW_ZgMXiEeSsD5C2f30z-g" name="getDeviceClass"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Realization" xmi:id="_KbphwIB_EeSeANT-DfY5oA" client="_6tx6sIB-EeSeANT-DfY5oA" supplier="_B2K5sIB_EeSeANT-DfY5oA"/>
         <packagedElement xmi:type="uml:Realization" xmi:id="_K4a9UIB_EeSeANT-DfY5oA" client="_6tx6sIB-EeSeANT-DfY5oA" supplier="_CwJOoIB_EeSeANT-DfY5oA"/>
@@ -1772,14 +1686,14 @@
       <packagedElement xmi:type="uml:Package" xmi:id="_2hCXIMXPEeSsD5C2f30z-g" name="OSCommand">
         <packagedElement xmi:type="uml:Collaboration" xmi:id="_4zRfgMXPEeSsD5C2f30z-g" name="OSCommand"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_4zUi0MXPEeSsD5C2f30z-g" name="OSCommand">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_XNJA8MXQEeSsD5C2f30z-g" name="LaunchApp">
-            <ownedParameter xmi:type="uml:Parameter" xmi:id="_dyEtkMXQEeSsD5C2f30z-g" name="appType" type="_5luYcMQUEeSirL7ina4YrA"/>
+          <ownedOperation xmi:id="_XNJA8MXQEeSsD5C2f30z-g" name="LaunchApp">
+            <ownedParameter xmi:id="_dyEtkMXQEeSsD5C2f30z-g" name="appType" type="_5luYcMQUEeSirL7ina4YrA"/>
           </ownedOperation>
         </packagedElement>
         <packagedElement xmi:type="uml:Realization" xmi:id="_4zYNMMXPEeSsD5C2f30z-g" name="ProtocolRealizesIncomingInterface" client="_4zRfgMXPEeSsD5C2f30z-g" supplier="_4zUi0MXPEeSsD5C2f30z-g"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_4zZbUMXPEeSsD5C2f30z-g" name="OSCommand~">
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_kqwcoMXQEeSsD5C2f30z-g" name="AppLaunched"/>
-          <ownedOperation xmi:type="uml:Operation" xmi:id="_oJKdMMXQEeSsD5C2f30z-g" name="AppLaunchFail"/>
+          <ownedOperation xmi:id="_kqwcoMXQEeSsD5C2f30z-g" name="AppLaunched"/>
+          <ownedOperation xmi:id="_oJKdMMXQEeSsD5C2f30z-g" name="AppLaunchFail"/>
         </packagedElement>
         <packagedElement xmi:type="uml:Usage" xmi:id="_4zceoMXPEeSsD5C2f30z-g" name="ProtocolUsesOutgoingInterface" client="_4zRfgMXPEeSsD5C2f30z-g" supplier="_4zZbUMXPEeSsD5C2f30z-g"/>
         <packagedElement xmi:type="uml:Interface" xmi:id="_4zdswMXPEeSsD5C2f30z-g" name="OSCommandIo"/>
@@ -1793,309 +1707,298 @@
     </packagedElement>
     <packagedElement xmi:type="uml:Package" xmi:id="_l6sCMMXKEeSsD5C2f30z-g" name="Enums and Constants">
       <packagedElement xmi:type="uml:Enumeration" xmi:id="_5luYcMQUEeSirL7ina4YrA" name="AppType">
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_7OV8EMQUEeSirL7ina4YrA" name="WordProcessor"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_9DEpEMQUEeSirL7ina4YrA" name="Sync"/>
+        <ownedLiteral xmi:id="_7OV8EMQUEeSirL7ina4YrA" name="WordProcessor"/>
+        <ownedLiteral xmi:id="_9DEpEMQUEeSirL7ina4YrA" name="Sync"/>
       </packagedElement>
       <packagedElement xmi:type="uml:Enumeration" xmi:id="_bFD18IB9EeSeANT-DfY5oA" name="USBDeviceClasses">
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_flU8IIB9EeSeANT-DfY5oA" name="Unspecified"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_hapfAIB9EeSeANT-DfY5oA" name="Audio"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_jYBKoIB9EeSeANT-DfY5oA" name="Communication_CDCControl"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_MWmoAIB-EeSeANT-DfY5oA" name="HID-HumanInterfaceDevice"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_ltHZwIB9EeSeANT-DfY5oA" name="PID-PhysicalInterfaceDevice"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_oyczAIB9EeSeANT-DfY5oA" name="Image"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_qBD7MIB9EeSeANT-DfY5oA" name="Printer"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_u6g9cIB9EeSeANT-DfY5oA" name="MassStorage"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_ziE-cIB9EeSeANT-DfY5oA" name="USBHub"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_092_8IB9EeSeANT-DfY5oA" name="CDC-Data"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_-D5-cIB9EeSeANT-DfY5oA" name="SmartCard"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="__sfF0IB9EeSeANT-DfY5oA" name="ContentSecurity"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_BeLF4IB-EeSeANT-DfY5oA" name="Video"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_DQsMYIB-EeSeANT-DfY5oA" name="PersonalHealthcare"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_GWTScIB-EeSeANT-DfY5oA" name="AV-AudioVideo"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_XSE3EIB-EeSeANT-DfY5oA" name="Billboard"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_ZONzoIB-EeSeANT-DfY5oA" name="DiagnosticDevice"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_bR3tcIB-EeSeANT-DfY5oA" name="WirelessController"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_dAhnoIB-EeSeANT-DfY5oA" name="Miscellaneous"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_hpQtUIB-EeSeANT-DfY5oA" name="ApplicationSpecific-IrDA_TMC_DFU"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_lWbioIB-EeSeANT-DfY5oA" name="VendorSpecific"/>
+        <ownedLiteral xmi:id="_flU8IIB9EeSeANT-DfY5oA" name="Unspecified"/>
+        <ownedLiteral xmi:id="_hapfAIB9EeSeANT-DfY5oA" name="Audio"/>
+        <ownedLiteral xmi:id="_jYBKoIB9EeSeANT-DfY5oA" name="Communication_CDCControl"/>
+        <ownedLiteral xmi:id="_MWmoAIB-EeSeANT-DfY5oA" name="HID-HumanInterfaceDevice"/>
+        <ownedLiteral xmi:id="_ltHZwIB9EeSeANT-DfY5oA" name="PID-PhysicalInterfaceDevice"/>
+        <ownedLiteral xmi:id="_oyczAIB9EeSeANT-DfY5oA" name="Image"/>
+        <ownedLiteral xmi:id="_qBD7MIB9EeSeANT-DfY5oA" name="Printer"/>
+        <ownedLiteral xmi:id="_u6g9cIB9EeSeANT-DfY5oA" name="MassStorage"/>
+        <ownedLiteral xmi:id="_ziE-cIB9EeSeANT-DfY5oA" name="USBHub"/>
+        <ownedLiteral xmi:id="_092_8IB9EeSeANT-DfY5oA" name="CDC-Data"/>
+        <ownedLiteral xmi:id="_-D5-cIB9EeSeANT-DfY5oA" name="SmartCard"/>
+        <ownedLiteral xmi:id="__sfF0IB9EeSeANT-DfY5oA" name="ContentSecurity"/>
+        <ownedLiteral xmi:id="_BeLF4IB-EeSeANT-DfY5oA" name="Video"/>
+        <ownedLiteral xmi:id="_DQsMYIB-EeSeANT-DfY5oA" name="PersonalHealthcare"/>
+        <ownedLiteral xmi:id="_GWTScIB-EeSeANT-DfY5oA" name="AV-AudioVideo"/>
+        <ownedLiteral xmi:id="_XSE3EIB-EeSeANT-DfY5oA" name="Billboard"/>
+        <ownedLiteral xmi:id="_ZONzoIB-EeSeANT-DfY5oA" name="DiagnosticDevice"/>
+        <ownedLiteral xmi:id="_bR3tcIB-EeSeANT-DfY5oA" name="WirelessController"/>
+        <ownedLiteral xmi:id="_dAhnoIB-EeSeANT-DfY5oA" name="Miscellaneous"/>
+        <ownedLiteral xmi:id="_hpQtUIB-EeSeANT-DfY5oA" name="ApplicationSpecific-IrDA_TMC_DFU"/>
+        <ownedLiteral xmi:id="_lWbioIB-EeSeANT-DfY5oA" name="VendorSpecific"/>
       </packagedElement>
       <packagedElement xmi:type="uml:Enumeration" xmi:id="_e2WAMMQeEeSirL7ina4YrA" name="ResourceType">
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_g395sMQeEeSirL7ina4YrA" name="PrinterDriver"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_imVgAMQeEeSirL7ina4YrA" name="StorageDriver"/>
+        <ownedLiteral xmi:id="_g395sMQeEeSirL7ina4YrA" name="PrinterDriver"/>
+        <ownedLiteral xmi:id="_imVgAMQeEeSirL7ina4YrA" name="StorageDriver"/>
       </packagedElement>
       <packagedElement xmi:type="uml:Enumeration" xmi:id="_Me6CAMXjEeSsD5C2f30z-g" name="USBErrorCodes">
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Pg4lQMXjEeSsD5C2f30z-g" name="OpFail"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Tiy7gMXjEeSsD5C2f30z-g" name="NotReady"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Yge9gMXjEeSsD5C2f30z-g" name="OutOfSpace"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_VpjzsMXjEeSsD5C2f30z-g" name="OutOfPaper"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_eQzWUMXjEeSsD5C2f30z-g" name="LowInkToner"/>
-        <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_njLgoMXjEeSsD5C2f30z-g" name="PaperJam"/>
+        <ownedLiteral xmi:id="_Pg4lQMXjEeSsD5C2f30z-g" name="OpFail"/>
+        <ownedLiteral xmi:id="_Tiy7gMXjEeSsD5C2f30z-g" name="NotReady"/>
+        <ownedLiteral xmi:id="_Yge9gMXjEeSsD5C2f30z-g" name="OutOfSpace"/>
+        <ownedLiteral xmi:id="_VpjzsMXjEeSsD5C2f30z-g" name="OutOfPaper"/>
+        <ownedLiteral xmi:id="_eQzWUMXjEeSsD5C2f30z-g" name="LowInkToner"/>
+        <ownedLiteral xmi:id="_njLgoMXjEeSsD5C2f30z-g" name="PaperJam"/>
       </packagedElement>
     </packagedElement>
     <packagedElement xmi:type="uml:Package" xmi:id="_H3z9EMXNEeSsD5C2f30z-g" name="System">
       <packagedElement xmi:type="uml:Class" xmi:id="_SfgCwMODEeSSS8SwKHucgQ" name="ComputerSystem" classifierBehavior="_F3llQMUeEeS9x_uTNp8Ezw" isActive="true">
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_bS384MODEeSSS8SwKHucgQ" name="computer" visibility="protected" type="_fMulcH_6EeSOLqU6j-e_hg" aggregation="composite">
+        <ownedAttribute xmi:id="_bS384MODEeSSS8SwKHucgQ" name="computer" visibility="protected" type="_fMulcH_6EeSOLqU6j-e_hg" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_3r4oQAutEeWCGuiso4e4-g" value="1"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_3r7rkAutEeWCGuiso4e4-g" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_wAf-UMOKEeSSS8SwKHucgQ" name="user" visibility="protected" type="_og5ZMMOKEeSSS8SwKHucgQ" aggregation="composite">
+        <ownedAttribute xmi:id="_wAf-UMOKEeSSS8SwKHucgQ" name="user" visibility="protected" type="_og5ZMMOKEeSSS8SwKHucgQ" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_-2IBYAutEeWCGuiso4e4-g"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_-2IocAutEeWCGuiso4e4-g" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_tcmSoMOUEeSy9Z1Kd1VJnQ" name="printer" visibility="protected" type="_CperoMOLEeSSS8SwKHucgQ" aggregation="composite">
+        <ownedAttribute xmi:id="_tcmSoMOUEeSy9Z1Kd1VJnQ" name="printer" visibility="protected" type="_CperoMOLEeSSS8SwKHucgQ" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_9889sAutEeWCGuiso4e4-g"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_98-L0AutEeWCGuiso4e4-g" value="1"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_u28wwMOUEeSy9Z1Kd1VJnQ" name="massStorage" visibility="protected" type="_FTGZQMOLEeSSS8SwKHucgQ" aggregation="composite">
+        <ownedAttribute xmi:id="_u28wwMOUEeSy9Z1Kd1VJnQ" name="massStorage" visibility="protected" type="_FTGZQMOLEeSSS8SwKHucgQ" aggregation="composite">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_68qcgAutEeWCGuiso4e4-g"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_68rqoAutEeWCGuiso4e4-g" value="1"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_Uh604AutEeWCGuiso4e4-g" name="frame" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_TWVjwGtVEeSCmtGQ-V4nzg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_W30jAAuyEeWCGuiso4e4-g" name="initStatus" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_W30jAAuyEeWCGuiso4e4-g" name="initStatus" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
         <ownedAttribute xmi:type="uml:Port" xmi:id="_f_gCwAu-EeWCGuiso4e4-g" name="timer" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_2cdikAu_EeWCGuiso4e4-g" name="timerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_2cdikAu_EeWCGuiso4e4-g" name="timerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6qkTMGXmEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_qrYScAvFEeWCGuiso4e4-g" name="_dummiest" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_qrYScAvFEeWCGuiso4e4-g" name="_dummiest" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_ECQakBUbEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_ECQakBUbEeWFQ7RnHw84Pw" name="numSec" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
         </ownedAttribute>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_DOQBQMO6EeSxS9_G15_gSg" name="Connector3">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_DOQoUMO6EeSxS9_G15_gSg" partWithPort="_wAf-UMOKEeSSS8SwKHucgQ" role="_J5xTgMO5EeSxS9_G15_gSg">
+        <ownedConnector xmi:id="_DOQBQMO6EeSxS9_G15_gSg" name="Connector3">
+          <end xmi:id="_DOQoUMO6EeSxS9_G15_gSg" partWithPort="_wAf-UMOKEeSSS8SwKHucgQ" role="_J5xTgMO5EeSxS9_G15_gSg">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_DOQoUcO6EeSxS9_G15_gSg" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_DOQoUsO6EeSxS9_G15_gSg" value="1"/>
           </end>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_DOQoU8O6EeSxS9_G15_gSg" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_m1ajcMO5EeSxS9_G15_gSg">
+          <end xmi:id="_DOQoU8O6EeSxS9_G15_gSg" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_m1ajcMO5EeSxS9_G15_gSg">
             <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_DOQoVMO6EeSxS9_G15_gSg" value="1"/>
             <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_DOQoVcO6EeSxS9_G15_gSg" value="1"/>
           </end>
         </ownedConnector>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_CZ02sO1nEeSNVueSbviXfA" name="Connector4">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_CZ1dwO1nEeSNVueSbviXfA" partWithPort="_tcmSoMOUEeSy9Z1Kd1VJnQ" role="_SSMs8MOLEeSSS8SwKHucgQ"/>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_CZ1dwe1nEeSNVueSbviXfA" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
+        <ownedConnector xmi:id="_CZ02sO1nEeSNVueSbviXfA" name="Connector4">
+          <end xmi:id="_CZ1dwO1nEeSNVueSbviXfA" partWithPort="_tcmSoMOUEeSy9Z1Kd1VJnQ" role="_SSMs8MOLEeSSS8SwKHucgQ"/>
+          <end xmi:id="_CZ1dwe1nEeSNVueSbviXfA" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
         </ownedConnector>
-        <ownedConnector xmi:type="uml:Connector" xmi:id="_DVHaQO1nEeSNVueSbviXfA" name="Connector5">
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_DVIoYO1nEeSNVueSbviXfA" partWithPort="_u28wwMOUEeSy9Z1Kd1VJnQ" role="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
-          <end xmi:type="uml:ConnectorEnd" xmi:id="_DVIoYe1nEeSNVueSbviXfA" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
+        <ownedConnector xmi:id="_DVHaQO1nEeSNVueSbviXfA" name="Connector5">
+          <end xmi:id="_DVIoYO1nEeSNVueSbviXfA" partWithPort="_u28wwMOUEeSy9Z1Kd1VJnQ" role="_q4ZLUMOmEeSy9Z1Kd1VJnQ"/>
+          <end xmi:id="_DVIoYe1nEeSNVueSbviXfA" partWithPort="_bS384MODEeSSS8SwKHucgQ" role="_oyJrcIFWEeSxK_Fl3WspFw"/>
         </ownedConnector>
         <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_F3llQMUeEeS9x_uTNp8Ezw" name="ComputerSystem_SM" isReentrant="false">
-          <region xmi:type="uml:Region" xmi:id="_IAM3kMUeEeS9x_uTNp8Ezw" name="Region1">
-            <transition xmi:type="uml:Transition" xmi:id="_PQTBEMUeEeS9x_uTNp8Ezw" name="incarnateUser" source="_83cecAu-EeWCGuiso4e4-g" target="_h-CpgAuyEeWCGuiso4e4-g">
+          <region xmi:id="_IAM3kMUeEeS9x_uTNp8Ezw" name="Region1">
+            <transition xmi:id="_PQTBEMUeEeS9x_uTNp8Ezw" name="incarnateUser" source="_83cecAu-EeWCGuiso4e4-g" target="_h-CpgAuyEeWCGuiso4e4-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_Z4ZoMMUeEeS9x_uTNp8Ezw" name="incarnateUser">
                 <language>C++</language>
-                <body>/**
- * Incarnate the user
- */
-time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is incarnating a user.&quot; &lt;&lt; std::endl;
-
-UMLRTCapsuleId userId = frame.incarnate(user, User);
-initStatus = userId.isValid();
-
+                <body>    /**
+    * Incarnate the user
+    */
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is incarnating a user.&quot; &lt;&lt; std::endl;
+    UMLRTCapsuleId userId = frame.incarnate(user, User);
+    initStatus = userId.isValid();
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_AW6JkBVwEeWTkNGQfAIBEw" name="onTimeout" port="_f_gCwAu-EeWCGuiso4e4-g">
+              <trigger xmi:id="_AW6JkBVwEeWTkNGQfAIBEw" name="onTimeout" port="_f_gCwAu-EeWCGuiso4e4-g">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_yXj1oAuyEeWCGuiso4e4-g" name="userOK" guard="_J_WmUAuzEeWCGuiso4e4-g" source="_h-CpgAuyEeWCGuiso4e4-g" target="_Nin-UMUeEeS9x_uTNp8Ezw">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_J_WmUAuzEeWCGuiso4e4-g" name="userOK">
+            <transition xmi:id="_yXj1oAuyEeWCGuiso4e4-g" name="userOK" guard="_J_WmUAuzEeWCGuiso4e4-g" source="_h-CpgAuyEeWCGuiso4e4-g" target="_Nin-UMUeEeS9x_uTNp8Ezw">
+              <ownedRule xmi:id="_J_WmUAuzEeWCGuiso4e4-g" name="userOK">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_J_WmUQuzEeWCGuiso4e4-g" name="userOK">
                   <language>C++</language>
-                  <body>return(initStatus);</body>
+                  <body>    return(initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_0UN1wA4GEeWZmqO69MGcNA" name="userIncarnated">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] incarnated the user.&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] incarnated the user.&quot; &lt;&lt; std::endl;
+</body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_zHs5IAuyEeWCGuiso4e4-g" name="userNOK" guard="_aIfNEAuzEeWCGuiso4e4-g" source="_h-CpgAuyEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_aIfNEAuzEeWCGuiso4e4-g" name="userNOK">
+            <transition xmi:id="_zHs5IAuyEeWCGuiso4e4-g" name="userNOK" guard="_aIfNEAuzEeWCGuiso4e4-g" source="_h-CpgAuyEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
+              <ownedRule xmi:id="_aIfNEAuzEeWCGuiso4e4-g" name="userNOK">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_aIfNEQuzEeWCGuiso4e4-g" name="initStatusNOK">
                   <language>C++</language>
-                  <body>return(!initStatus);</body>
+                  <body>    return(!initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_uITGEA4GEeWZmqO69MGcNA" name="errorIncarnatingUser">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] FAILed to incarnate the user!&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] FAILed to incarnate the user!&quot; &lt;&lt; std::endl;
+</body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_J7s-8Au_EeWCGuiso4e4-g" name="setComputerInitTimer" source="_NC-08MUeEeS9x_uTNp8Ezw" target="_ZDdWUAvBEeWCGuiso4e4-g">
+            <transition xmi:id="_J7s-8Au_EeWCGuiso4e4-g" name="setComputerInitTimer" source="_NC-08MUeEeS9x_uTNp8Ezw" target="_ZDdWUAvBEeWCGuiso4e4-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_BJHSgAvAEeWCGuiso4e4-g" name="setComputerTimer">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is initializing &quot;;
-
-numSec = 20;
-timerID = timer.informIn(UMLRTTimespec(numSec,0));
-initStatus = timerID.isValid();
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is initializing &quot;;
+    numSec = 20;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
+    initStatus = timerID.isValid();
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_W5o1AAu_EeWCGuiso4e4-g" name="incarnateDevices" source="_u8HzEAu-EeWCGuiso4e4-g" target="_wkR8UAvBEeWCGuiso4e4-g">
+            <transition xmi:id="_W5o1AAu_EeWCGuiso4e4-g" name="incarnateDevices" source="_u8HzEAu-EeWCGuiso4e4-g" target="_wkR8UAvBEeWCGuiso4e4-g">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_02LZ4AvCEeWCGuiso4e4-g" name="incarnateDevicesAndWait">
                 <language>C++</language>
-                <body>/**
- * Initialise the devices
- */
-/**
- * Incarnate the local printer
- */
-time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] local printer incarnation&quot;;
-
-UMLRTCapsuleId printerId = frame.incarnate(printer, LocalPrinter);
-bool printerStatus = printerId.isValid();
-if ( printerStatus ) {
-	std::cout &lt;&lt; &quot; successful.&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; FAILED!&quot; &lt;&lt; std::endl;
-}
-
-
-/**
- * Incarnate the mass storage device
- */
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] mass storage incarnation&quot;;
-
-UMLRTCapsuleId storageId = frame.incarnate(massStorage, ExtMassStorage);
-bool storageStatus = storageId.isValid();
-if ( storageStatus ) {
-	std::cout &lt;&lt; &quot; successful.&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; FAILED!&quot; &lt;&lt; std::endl;
-}
-
-bool timerStatus = false;
-if ( printerStatus &amp;&amp; storageStatus ) {
-	/**
-	 * Set timer to wait for device initialisation
-	 */
-	numSec = 15;
-	timerID = timer.informIn(UMLRTTimespec(numSec,0));
-	timerStatus = timerID.isValid();
-
-	time( &amp;currentTime );
-	localTime = localtime( &amp;currentTime );
-	std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-	std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
-	if ( ! timerStatus ) {
-		std::cout &lt;&lt; &quot;FAILED to &quot;;
-	}
-	std::cout &lt;&lt; &quot;set &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timout for device initialization wait.&quot; &lt;&lt; std::endl;
-}
-
-initStatus = ( printerStatus &amp;&amp; storageStatus &amp;&amp; timerStatus);
+                <body>    /**
+    * Initialise the devices
+    */
+    /**
+    * Incarnate the local printer
+    */
+    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] local printer incarnation&quot;;
+    UMLRTCapsuleId printerId = frame.incarnate(printer, LocalPrinter);
+    bool printerStatus = printerId.isValid();
+    if ( printerStatus ) {
+    std::cout &lt;&lt; &quot; successful.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; FAILED!&quot; &lt;&lt; std::endl;
+    }
+    /**
+    * Incarnate the mass storage device
+    */
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] mass storage incarnation&quot;;
+    UMLRTCapsuleId storageId = frame.incarnate(massStorage, ExtMassStorage);
+    bool storageStatus = storageId.isValid();
+    if ( storageStatus ) {
+    std::cout &lt;&lt; &quot; successful.&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; FAILED!&quot; &lt;&lt; std::endl;
+    }
+    bool timerStatus = false;
+    if ( printerStatus &amp;&amp; storageStatus ) {
+    /**
+    * Set timer to wait for device initialisation
+    */
+    numSec = 15;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
+    timerStatus = timerID.isValid();
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] &quot;;
+    if ( ! timerStatus ) {
+    std::cout &lt;&lt; &quot;FAILED to &quot;;
+    }
+    std::cout &lt;&lt; &quot;set &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timout for device initialization wait.&quot; &lt;&lt; std::endl;
+    }
+    initStatus = ( printerStatus &amp;&amp; storageStatus &amp;&amp; timerStatus);
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_vlDCAAvDEeWCGuiso4e4-g" name="onComputerTimeout" port="_f_gCwAu-EeWCGuiso4e4-g">
+              <trigger xmi:id="_vlDCAAvDEeWCGuiso4e4-g" name="onComputerTimeout" port="_f_gCwAu-EeWCGuiso4e4-g">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_ecM8oAvBEeWCGuiso4e4-g" name="timerOK" guard="_KhKVEAvCEeWCGuiso4e4-g" source="_ZDdWUAvBEeWCGuiso4e4-g" target="_u8HzEAu-EeWCGuiso4e4-g">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_KhKVEAvCEeWCGuiso4e4-g" name="validTimer">
+            <transition xmi:id="_ecM8oAvBEeWCGuiso4e4-g" name="timerOK" guard="_KhKVEAvCEeWCGuiso4e4-g" source="_ZDdWUAvBEeWCGuiso4e4-g" target="_u8HzEAu-EeWCGuiso4e4-g">
+              <ownedRule xmi:id="_KhKVEAvCEeWCGuiso4e4-g" name="validTimer">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_KhKVEQvCEeWCGuiso4e4-g" name="validTimer">
                   <language>C++</language>
-                  <body>return(initStatus);</body>
+                  <body>    return(initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_wGf_gA4DEeWZmqO69MGcNA" name="TimerSet">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; and set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; and set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_gDAiYAvBEeWCGuiso4e4-g" name="compTimerFail" guard="_j4M5AAvGEeWCGuiso4e4-g" source="_ZDdWUAvBEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_j4M5AAvGEeWCGuiso4e4-g" name="Failed">
+            <transition xmi:id="_gDAiYAvBEeWCGuiso4e4-g" name="compTimerFail" guard="_j4M5AAvGEeWCGuiso4e4-g" source="_ZDdWUAvBEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
+              <ownedRule xmi:id="_j4M5AAvGEeWCGuiso4e4-g" name="Failed">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_j4M5AQvGEeWCGuiso4e4-g" name="Failed">
                   <language>C++</language>
-                  <body>return(!initStatus);</body>
+                  <body>    return(!initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_rbKRwA4DEeWZmqO69MGcNA" name="TimerFail">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; but FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; but FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer!&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_g65XMAvCEeWCGuiso4e4-g" name="Failed" guard="_Z956cAvDEeWCGuiso4e4-g" source="_wkR8UAvBEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_Z956cAvDEeWCGuiso4e4-g" name="Failed">
+            <transition xmi:id="_g65XMAvCEeWCGuiso4e4-g" name="Failed" guard="_Z956cAvDEeWCGuiso4e4-g" source="_wkR8UAvBEeWCGuiso4e4-g" target="_tBnrsAuyEeWCGuiso4e4-g">
+              <ownedRule xmi:id="_Z956cAvDEeWCGuiso4e4-g" name="Failed">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_Z956cQvDEeWCGuiso4e4-g" name="failure">
                   <language>C++</language>
-                  <body>return(!initStatus);</body>
+                  <body>    return(!initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_mWsncA4FEeWZmqO69MGcNA" name="IncarnateFail">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] did not incarnate all devices!&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] did not incarnate all devices!&quot; &lt;&lt; std::endl;
+</body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_ioaB4AvCEeWCGuiso4e4-g" name="Success" guard="_hrbm0AvDEeWCGuiso4e4-g" source="_wkR8UAvBEeWCGuiso4e4-g" target="_83cecAu-EeWCGuiso4e4-g">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_hrbm0AvDEeWCGuiso4e4-g">
+            <transition xmi:id="_ioaB4AvCEeWCGuiso4e4-g" name="Success" guard="_hrbm0AvDEeWCGuiso4e4-g" source="_wkR8UAvBEeWCGuiso4e4-g" target="_83cecAu-EeWCGuiso4e4-g">
+              <ownedRule xmi:id="_hrbm0AvDEeWCGuiso4e4-g">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_hrbm0QvDEeWCGuiso4e4-g" name="Success">
                   <language>C++</language>
-                  <body>return(initStatus);</body>
+                  <body>    return(initStatus);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_TOqxMA4GEeWZmqO69MGcNA" name="devicesIncarnated">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] incarnated all external devices!&quot; &lt;&lt; std::endl;
-
-// context()->debugOutputModel();
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] incarnated all external devices!&quot; &lt;&lt; std::endl;
+    // context()->debugOutputModel();
 </body>
               </effect>
             </transition>
@@ -2103,51 +2006,50 @@
             <subvertex xmi:type="uml:State" xmi:id="_Nin-UMUeEeS9x_uTNp8Ezw" name="Running">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_1wK1AO4KEeSAlbC0LA6o5Q" name="Running">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Running}.&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is {Running}.&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:Pseudostate" xmi:id="_h-CpgAuyEeWCGuiso4e4-g" name="userOK?" kind="choice"/>
             <subvertex xmi:type="uml:State" xmi:id="_tBnrsAuyEeWCGuiso4e4-g" name="Failure">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_mKmHgAvIEeWCGuiso4e4-g" name="ComputerSystemFailed">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] terminated in failure!&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; (localTime->tm_year + 1900) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; (localTime->tm_mon + 1) &lt;&lt; &quot;.&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_mday &lt;&lt; &quot; &quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] terminated in failure!&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_u8HzEAu-EeWCGuiso4e4-g" name="WaitingForComputerInit">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_GZec4A4FEeWZmqO69MGcNA" name="waitingForComputerInit">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is waiting for computer initialisation {WaitingForComputerInit}.&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is waiting for computer initialisation {WaitingForComputerInit}.&quot; &lt;&lt; std::endl;
 </body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_83cecAu-EeWCGuiso4e4-g" name="WaitingForDeviceInit">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_eZK6wA4GEeWZmqO69MGcNA" name="waitForDeviceInit">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is waiting for external device initialization.&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;] is waiting for external device initialization.&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:Pseudostate" xmi:id="_ZDdWUAvBEeWCGuiso4e4-g" name="timerOK?" kind="choice"/>
@@ -2160,210 +2062,204 @@
         <ownedAttribute xmi:type="uml:Port" xmi:id="_0W-4cMUhEeS9x_uTNp8Ezw" name="timer" visibility="public" isOrdered="true" aggregation="composite" isBehavior="true" isService="false">
           <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_JoJRcBaOEeWD0440ocvGbg" name="numSec" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_JoJRcBaOEeWD0440ocvGbg" name="numSec" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_7wRIABydEduyofBvg4RL2w"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_O2UmgBaOEeWD0440ocvGbg" name="timerID" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_O2UmgBaOEeWD0440ocvGbg" name="timerID" visibility="protected" aggregation="composite">
           <type xmi:type="uml:Class" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_6qkTMGXmEeS_4daqvwyFrg"/>
         </ownedAttribute>
-        <ownedAttribute xmi:type="uml:Property" xmi:id="_js2k8BaYEeWD0440ocvGbg" name="status" visibility="protected" aggregation="composite">
+        <ownedAttribute xmi:id="_js2k8BaYEeWD0440ocvGbg" name="status" visibility="protected" aggregation="composite">
           <type xmi:type="uml:PrimitiveType" href="pathmap://PapyrusC_Cpp_LIBRARIES/AnsiCLibrary.uml#_vAIV4I7PEdySGvm5GN66HA"/>
         </ownedAttribute>
         <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_-AYDoMO4EeSxS9_G15_gSg" name="User_SM" isReentrant="false">
-          <region xmi:type="uml:Region" xmi:id="_-3QBQMO4EeSxS9_G15_gSg" name="Region1">
-            <transition xmi:type="uml:Transition" xmi:id="_hjkPUMO5EeSxS9_G15_gSg" name="initialize" source="_ebPzgMO5EeSxS9_G15_gSg" target="_T-PT0BaUEeWD0440ocvGbg">
+          <region xmi:id="_-3QBQMO4EeSxS9_G15_gSg" name="Region1">
+            <transition xmi:id="_hjkPUMO5EeSxS9_G15_gSg" name="initialize" source="_ebPzgMO5EeSxS9_G15_gSg" target="_T-PT0BaUEeWD0440ocvGbg">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_b3oZ8MWrEeS9x_uTNp8Ezw" name="Initialize_USER">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] initializing&quot;;
-
-numSec = 15;
-timerID = timer.informIn(UMLRTTimespec(numSec,0));
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] initializing&quot;;
+    numSec = 15;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_lys4IBaNEeWD0440ocvGbg" name="onTimeout1" source="_hADSkMO5EeSxS9_G15_gSg" target="_pwd0kBaVEeWD0440ocvGbg">
+            <transition xmi:id="_lys4IBaNEeWD0440ocvGbg" name="onTimeout1" source="_hADSkMO5EeSxS9_G15_gSg" target="_pwd0kBaVEeWD0440ocvGbg">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_laox4BaXEeWD0440ocvGbg" name="saveDocument">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)]&quot;;
-
-bool sendStatus = computerPort.saveDocument().send();
-
-//numSec = 10;
-timerID = timer.informIn(UMLRTTimespec(numSec,0));
-
-status = sendStatus &amp;&amp; timerID.isValid();
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)]&quot;;
+    bool sendStatus = computerPort.saveDocument().send();
+    //numSec = 10;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
+    status = sendStatus &amp;&amp; timerID.isValid();
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_HpnOkBaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
+              <trigger xmi:id="_HpnOkBaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_nTBbYBaNEeWD0440ocvGbg" name="onTimeout2" source="_T6h8sBaNEeWD0440ocvGbg" target="_9FTvQBbKEeWa4sJtLVaM7A">
+            <transition xmi:id="_nTBbYBaNEeWD0440ocvGbg" name="onTimeout2" source="_T6h8sBaNEeWD0440ocvGbg" target="_9FTvQBbKEeWa4sJtLVaM7A">
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_XefLsJJMEeWg8uhgJTo7AQ" name="saveTimout">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] Save timeout received&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] Save timeout received&quot; &lt;&lt; std::endl;
 </body>
               </effect>
-              <trigger xmi:type="uml:Trigger" xmi:id="_MPje8BaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
+              <trigger xmi:id="_MPje8BaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_oLCBcBaNEeWD0440ocvGbg" name="onTimeout3" source="_asvQUBaNEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
-              <trigger xmi:type="uml:Trigger" xmi:id="_kZTtMBaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
+            <transition xmi:id="_oLCBcBaNEeWD0440ocvGbg" name="onTimeout3" source="_asvQUBaNEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
+              <trigger xmi:id="_kZTtMBaWEeWD0440ocvGbg" name="onTimeout" port="_0W-4cMUhEeS9x_uTNp8Ezw">
                 <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
               </trigger>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_FKR60BaVEeWD0440ocvGbg" name="initTimerSet" guard="_aEu7gBaVEeWD0440ocvGbg" source="_T-PT0BaUEeWD0440ocvGbg" target="_hADSkMO5EeSxS9_G15_gSg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_aEu7gBaVEeWD0440ocvGbg" name="timerValid">
+            <transition xmi:id="_FKR60BaVEeWD0440ocvGbg" name="initTimerSet" guard="_aEu7gBaVEeWD0440ocvGbg" source="_T-PT0BaUEeWD0440ocvGbg" target="_hADSkMO5EeSxS9_G15_gSg">
+              <ownedRule xmi:id="_aEu7gBaVEeWD0440ocvGbg" name="timerValid">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_aEu7gRaVEeWD0440ocvGbg" name="timerValid">
                   <language>C++</language>
-                  <body>return(timerID.isValid());</body>
+                  <body>    return(timerID.isValid());
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_EY4oMBaXEeWD0440ocvGbg" name="initTimerSet">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; and set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; and set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_F0U9YBaVEeWD0440ocvGbg" name="initTimerFail" guard="_lJFZwBaVEeWD0440ocvGbg" source="_T-PT0BaUEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_lJFZwBaVEeWD0440ocvGbg" name="invalidTimer">
+            <transition xmi:id="_F0U9YBaVEeWD0440ocvGbg" name="initTimerFail" guard="_lJFZwBaVEeWD0440ocvGbg" source="_T-PT0BaUEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
+              <ownedRule xmi:id="_lJFZwBaVEeWD0440ocvGbg" name="invalidTimer">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_lJFZwRaVEeWD0440ocvGbg">
                   <language>C++</language>
-                  <body>return(!timerID.isValid());</body>
+                  <body>    return(!timerID.isValid());
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_QFvQ4BaXEeWD0440ocvGbg" name="initTimerFail">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; but FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; but FAILed to set a &quot; &lt;&lt; numSec &lt;&lt; &quot; seconds timer.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_5m4ToBaVEeWD0440ocvGbg" guard="_Q9XxkBaZEeWD0440ocvGbg" source="_pwd0kBaVEeWD0440ocvGbg" target="_T6h8sBaNEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_Q9XxkBaZEeWD0440ocvGbg" name="saveOK">
+            <transition xmi:id="_5m4ToBaVEeWD0440ocvGbg" guard="_Q9XxkBaZEeWD0440ocvGbg" source="_pwd0kBaVEeWD0440ocvGbg" target="_T6h8sBaNEeWD0440ocvGbg">
+              <ownedRule xmi:id="_Q9XxkBaZEeWD0440ocvGbg" name="saveOK">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_Q9XxkRaZEeWD0440ocvGbg" name="saveOK">
                   <language>C++</language>
-                  <body>return(status);</body>
+                  <body>    return(status);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="__KXC8BaYEeWD0440ocvGbg" name="saveRequested">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; asked for the document to be saved.&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; asked for the document to be saved.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_9nd0MBaVEeWD0440ocvGbg" guard="_VPw-YBaaEeWD0440ocvGbg" source="_r9cCcBaVEeWD0440ocvGbg" target="_asvQUBaNEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_VPw-YBaaEeWD0440ocvGbg" name="printSet">
+            <transition xmi:id="_9nd0MBaVEeWD0440ocvGbg" guard="_VPw-YBaaEeWD0440ocvGbg" source="_r9cCcBaVEeWD0440ocvGbg" target="_asvQUBaNEeWD0440ocvGbg">
+              <ownedRule xmi:id="_VPw-YBaaEeWD0440ocvGbg" name="printSet">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_VPw-YRaaEeWD0440ocvGbg" name="printSet">
                   <language>C++</language>
-                  <body>return(status);</body>
+                  <body>    return(status);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_2Q8J0JLcEeWTl7q8dOahXg" name="printRequested">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; asked for the document to be printed.&quot; &lt;&lt; std::endl;
+                <body>    std::cout &lt;&lt; &quot; asked for the document to be printed.&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_xs7fYBaWEeWD0440ocvGbg" guard="_ZfQ6IBaZEeWD0440ocvGbg" source="_pwd0kBaVEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_ZfQ6IBaZEeWD0440ocvGbg" name="saveFail">
+            <transition xmi:id="_xs7fYBaWEeWD0440ocvGbg" guard="_ZfQ6IBaZEeWD0440ocvGbg" source="_pwd0kBaVEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
+              <ownedRule xmi:id="_ZfQ6IBaZEeWD0440ocvGbg" name="saveFail">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_ZfQ6IRaZEeWD0440ocvGbg" name="saveFail">
                   <language>C++</language>
-                  <body>return(!status);</body>
+                  <body>    return(!status);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_E7D2QBaZEeWD0440ocvGbg" name="saveFailed">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; FAILed to ask for the document to be saved!&quot;;
-
-if ( timerID.isValid() ) {
-	std::cout &lt;&lt; &quot; - FAILed to send message!&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; FAILed to set timer!&quot; &lt;&lt; std::endl;
-}
+                <body>    std::cout &lt;&lt; &quot; FAILed to ask for the document to be saved!&quot;;
+    if ( timerID.isValid() ) {
+    std::cout &lt;&lt; &quot; - FAILed to send message!&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; FAILed to set timer!&quot; &lt;&lt; std::endl;
+    }
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_ykTzUBaWEeWD0440ocvGbg" guard="_a5ow8BaaEeWD0440ocvGbg" source="_r9cCcBaVEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_a5ow8BaaEeWD0440ocvGbg" name="printFail">
+            <transition xmi:id="_ykTzUBaWEeWD0440ocvGbg" guard="_a5ow8BaaEeWD0440ocvGbg" source="_r9cCcBaVEeWD0440ocvGbg" target="_pDk9kBaOEeWD0440ocvGbg">
+              <ownedRule xmi:id="_a5ow8BaaEeWD0440ocvGbg" name="printFail">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_a5ow8RaaEeWD0440ocvGbg" name="printFail">
                   <language>C++</language>
-                  <body>return(!status);</body>
+                  <body>    return(!status);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_uAQGAJLcEeWTl7q8dOahXg" name="printFailure">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot; FAILed to ask for the document to be printed!&quot;;
-
-if ( timerID.isValid() ) {
-	std::cout &lt;&lt; &quot; - FAILed to send message!&quot; &lt;&lt; std::endl;
-} else {
-	std::cout &lt;&lt; &quot; FAILed to set timer!&quot; &lt;&lt; std::endl;
-}</body>
+                <body>    std::cout &lt;&lt; &quot; FAILed to ask for the document to be printed!&quot;;
+    if ( timerID.isValid() ) {
+    std::cout &lt;&lt; &quot; - FAILed to send message!&quot; &lt;&lt; std::endl;
+    } else {
+    std::cout &lt;&lt; &quot; FAILed to set timer!&quot; &lt;&lt; std::endl;
+    }
+</body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_qJVUoBaiEeWD0440ocvGbg" source="_asvQUBaNEeWD0440ocvGbg" target="_4BUksBaNEeWD0440ocvGbg"/>
-            <transition xmi:type="uml:Transition" xmi:id="_CmFQMBbLEeWa4sJtLVaM7A" name="isFalsePrintDoc" guard="_aMC04BbLEeWa4sJtLVaM7A" source="_9FTvQBbKEeWa4sJtLVaM7A" target="_r9cCcBaVEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_aMC04BbLEeWa4sJtLVaM7A" name="isFalse">
+            <transition xmi:id="_qJVUoBaiEeWD0440ocvGbg" source="_asvQUBaNEeWD0440ocvGbg" target="_4BUksBaNEeWD0440ocvGbg"/>
+            <transition xmi:id="_CmFQMBbLEeWa4sJtLVaM7A" name="isFalsePrintDoc" guard="_aMC04BbLEeWa4sJtLVaM7A" source="_9FTvQBbKEeWa4sJtLVaM7A" target="_r9cCcBaVEeWD0440ocvGbg">
+              <ownedRule xmi:id="_aMC04BbLEeWa4sJtLVaM7A" name="isFalse">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_aMC04RbLEeWa4sJtLVaM7A" name="isFalse">
                   <language>C++</language>
-                  <body>return(false);</body>
+                  <body>    return(false);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_NakGcBbLEeWa4sJtLVaM7A" name="printDoc">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
-
-bool sendStatus = computerPort.printDocument().send();
-
-//numSec = 10;
-timerID = timer.informIn(UMLRTTimespec(numSec,0));
-
-status = sendStatus &amp;&amp; timerID.isValid();
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;]&quot;;
+    bool sendStatus = computerPort.printDocument().send();
+    //numSec = 10;
+    timerID = timer.informIn(UMLRTTimespec(numSec,0));
+    status = sendStatus &amp;&amp; timerID.isValid();
 </body>
               </effect>
             </transition>
-            <transition xmi:type="uml:Transition" xmi:id="_DanrgBbLEeWa4sJtLVaM7A" name="isTrueDone" guard="_TjYe0BbLEeWa4sJtLVaM7A" source="_9FTvQBbKEeWa4sJtLVaM7A" target="_4BUksBaNEeWD0440ocvGbg">
-              <ownedRule xmi:type="uml:Constraint" xmi:id="_TjYe0BbLEeWa4sJtLVaM7A" name="isTrue">
+            <transition xmi:id="_DanrgBbLEeWa4sJtLVaM7A" name="isTrueDone" guard="_TjYe0BbLEeWa4sJtLVaM7A" source="_9FTvQBbKEeWa4sJtLVaM7A" target="_4BUksBaNEeWD0440ocvGbg">
+              <ownedRule xmi:id="_TjYe0BbLEeWa4sJtLVaM7A" name="isTrue">
                 <specification xmi:type="uml:OpaqueExpression" xmi:id="_TjYe0RbLEeWa4sJtLVaM7A" name="isTrue">
                   <language>C++</language>
-                  <body>return(true);</body>
+                  <body>    return(true);
+</body>
                 </specification>
               </ownedRule>
               <effect xmi:type="uml:OpaqueBehavior" xmi:id="_DCwnAJJPEeWg8uhgJTo7AQ" name="SuccessfulRun">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot;&lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] Successful Run!&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot;&lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] Successful Run!&quot; &lt;&lt; std::endl;
 </body>
               </effect>
             </transition>
@@ -2371,61 +2267,57 @@
             <subvertex xmi:type="uml:State" xmi:id="_hADSkMO5EeSxS9_G15_gSg" name="Alive">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_gwa88Oz_EeSEsOihEv1CcQ" name="UserIsAlive">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] is alive!&quot; &lt;&lt; std::endl;
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] is alive!&quot; &lt;&lt; std::endl;
 </body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_T6h8sBaNEeWD0440ocvGbg" name="Waiting4DocSave">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="__09VoJJLEeWg8uhgJTo7AQ" name="Waiting4DocSave_EN">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] user is {Waiting4DocSave}&quot; &lt;&lt; std::endl;</body>
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] user is {Waiting4DocSave}&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_asvQUBaNEeWD0440ocvGbg" name="Waiting4DocPrint">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_7CiQkJLcEeWTl7q8dOahXg" name="wait4Print">
                 <language>C++</language>
-                <body>std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] user is {Waiting4DocPrint}&quot; &lt;&lt; std::endl;</body>
+                <body>    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] user is {Waiting4DocPrint}&quot; &lt;&lt; std::endl;
+</body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_4BUksBaNEeWD0440ocvGbg" name="TestDone">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_f5R6wBaaEeWD0440ocvGbg" name="testDone">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] is finished testing.&quot; &lt;&lt; std::endl;
-
-std::exit(EXIT_SUCCESS); // successful execution
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] is finished testing.&quot; &lt;&lt; std::endl;
+    std::exit(EXIT_SUCCESS); // successful execution
 </body>
               </entry>
             </subvertex>
             <subvertex xmi:type="uml:State" xmi:id="_pDk9kBaOEeWD0440ocvGbg" name="FAILED">
               <entry xmi:type="uml:OpaqueBehavior" xmi:id="_m7LQMBaaEeWD0440ocvGbg" name="testFailed">
                 <language>C++</language>
-                <body>time_t currentTime;
-struct tm *localTime;
-time( &amp;currentTime );
-localTime = localtime( &amp;currentTime );
-std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
-
-std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] {FAILED}!&quot;;
-
-std::exit(EXIT_FAILURE); // unsuccessful execution
+                <body>    time_t currentTime;
+    struct tm *localTime;
+    time( &amp;currentTime );
+    localTime = localtime( &amp;currentTime );
+    std::cout &lt;&lt; std::setfill('0') &lt;&lt; &quot;[&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_hour &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_min &lt;&lt; &quot;:&quot; &lt;&lt; std::setw(2) &lt;&lt; localTime->tm_sec &lt;&lt; &quot;] &quot;;
+    std::cout &lt;&lt; &quot;[&quot; &lt;&lt; this->getName() &lt;&lt; &quot;(&quot; &lt;&lt; this->getClass()->name &lt;&lt; &quot;)] {FAILED}!&quot;;
+    std::exit(EXIT_FAILURE); // unsuccessful execution
 </body>
               </entry>
             </subvertex>
@@ -2438,32 +2330,32 @@
       </packagedElement>
     </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="_s8h5kO1kEeSNVueSbviXfA" name="Top" isActive="true">
-      <ownedAttribute xmi:type="uml:Property" xmi:id="_3f1gQO1kEeSNVueSbviXfA" name="computerSystem" visibility="protected" type="_SfgCwMODEeSSS8SwKHucgQ"/>
+      <ownedAttribute xmi:id="_3f1gQO1kEeSNVueSbviXfA" name="computerSystem" visibility="protected" type="_SfgCwMODEeSSS8SwKHucgQ"/>
     </packagedElement>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_YSrkcX_6EeSOLqU6j-e_hg">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YSrkcn_6EeSOLqU6j-e_hg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+    <profileApplication xmi:id="_YSrkcX_6EeSOLqU6j-e_hg">
+      <eAnnotations xmi:id="_YSrkcn_6EeSOLqU6j-e_hg" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+      <appliedProfile href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
     </profileApplication>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_v0WsUIB5EeSeANT-DfY5oA">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v1QEMIB5EeSeANT-DfY5oA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+    <profileApplication xmi:id="_v0WsUIB5EeSeANT-DfY5oA">
+      <eAnnotations xmi:id="_v1QEMIB5EeSeANT-DfY5oA" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/statemachine#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/UMLRealTimeSM-addendum.profile.uml#_KLcn0FDtEeOA4ecmvfqvaw"/>
+      <appliedProfile href="pathmap://UML_RT_PROFILE/UMLRealTimeSM-addendum.profile.uml#_KLcn0FDtEeOA4ecmvfqvaw"/>
     </profileApplication>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_fBXrIOnTEeSH6cvOy39y3w">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5rTkwKJ7EeW_QZB0kJjvdw" source="PapyrusVersion">
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5rTkwaJ7EeW_QZB0kJjvdw" key="Version" value="0.0.11"/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5rTkwqJ7EeW_QZB0kJjvdw" key="Comment" value=""/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5rTkw6J7EeW_QZB0kJjvdw" key="Copyright" value=""/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5rTkxKJ7EeW_QZB0kJjvdw" key="Date" value="2015-12-10"/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5rTkxaJ7EeW_QZB0kJjvdw" key="Author" value=""/>
+    <profileApplication xmi:id="_fBXrIOnTEeSH6cvOy39y3w">
+      <eAnnotations xmi:id="_5rTkwKJ7EeW_QZB0kJjvdw" source="PapyrusVersion">
+        <details xmi:id="_5rTkwaJ7EeW_QZB0kJjvdw" key="Version" value="0.0.11"/>
+        <details xmi:id="_5rTkwqJ7EeW_QZB0kJjvdw" key="Comment" value=""/>
+        <details xmi:id="_5rTkw6J7EeW_QZB0kJjvdw" key="Copyright" value=""/>
+        <details xmi:id="_5rTkxKJ7EeW_QZB0kJjvdw" key="Date" value="2015-12-10"/>
+        <details xmi:id="_5rTkxaJ7EeW_QZB0kJjvdw" key="Author" value=""/>
       </eAnnotations>
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fBe_4OnTEeSH6cvOy39y3w" source="http://www.eclipse.org/uml2/2.0.0/UML">
+      <eAnnotations xmi:id="_fBe_4OnTEeSH6cvOy39y3w" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+      <appliedProfile href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
     </profileApplication>
   </uml:Model>
   <UMLRealTime:Capsule xmi:id="_BBz20IB6EeSeANT-DfY5oA" base_Class="_fMulcH_6EeSOLqU6j-e_hg"/>
diff --git a/models/samples/ComputerSystem/expected_src/CMakeLists.txt b/models/samples/ComputerSystem/expected_src/CMakeLists.txt
index fa484e2..aa9d4f4 100644
--- a/models/samples/ComputerSystem/expected_src/CMakeLists.txt
+++ b/models/samples/ComputerSystem/expected_src/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Generated
+# Generated 2016-07-20 11:17:23
 
 cmake_minimum_required(VERSION 2.8.7)
 set(TARGET TopMain)
diff --git a/models/samples/ComputerSystem/expected_src/Computer.cc b/models/samples/ComputerSystem/expected_src/Computer.cc
index 956fe0b..3a398fa 100644
--- a/models/samples/ComputerSystem/expected_src/Computer.cc
+++ b/models/samples/ComputerSystem/expected_src/Computer.cc
@@ -31,11 +31,11 @@
 , currentState( SPECIAL_INTERNAL_STATE_UNVISITED )
 {
     stateNames[top__InitUSBBus] = "top__InitUSBBus";
-    stateNames[top__Running] = "top__Running";
-    stateNames[top__WaitForResourceManager] = "top__WaitForResourceManager";
     stateNames[top__InitUSBBus__WaitForPrinter] = "top__InitUSBBus__WaitForPrinter";
     stateNames[top__InitUSBBus__WaitForStorage] = "top__InitUSBBus__WaitForStorage";
     stateNames[top__InitUSBBus__boundary] = "top__InitUSBBus__boundary";
+    stateNames[top__Running] = "top__Running";
+    stateNames[top__WaitForResourceManager] = "top__WaitForResourceManager";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
     int i = 0;
     while( i < 1 )
@@ -176,10 +176,8 @@
 
 void Capsule_Computer::entryaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__WaitForPrinter__setTimer( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_4dTQAO4SEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus::WaitForPrinter entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -194,18 +192,15 @@
     else {
     std::cout << " FAILed to set a " << numSec << " seconds timer!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::entryaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__WaitForStorage__requestStorageDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_7xknsO4TEeSJPsWo_Mnp3w */
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus::WaitForStorage entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -231,35 +226,29 @@
     else {
     std::cout << " FAILed to set a " << numSec << " seconds timer!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 void Capsule_Computer::entryaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__initUSBBus( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_E2O74A7eEeWWHqV5N_7gJQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in state {InitUSBBus}, waiting for the USB bus to be initialized." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::entryaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__Running__running( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Aj9CgO4dEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::Running entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -267,52 +256,43 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in state {Running}." << std::endl;
     //context()->debugOutputModel();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::entryaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__WaitForResourceManager__waitForResMgr( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_t4bf4O4OEeSAlbC0LA6o5Q */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::WaitForResourceManager entry  */
     time_t currentTime ;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in state {WaitForResourceManager}, waiting for resource manager initalization" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__onPrintDriverTimeout__Timeout_NoResponse( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_ZIsvMO4TEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus transition InitUSBBus::WaitForPrinter,InitUSBBus::WaitForStorage,timeout:timer */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] timed out while waiting for a printerId" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__onPrintResourceID__importPrinterDriver_requestStorageDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_ekrn0MbkEeSvmLj5mtpd2g */
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus transition InitUSBBus::WaitForPrinter,InitUSBBus::WaitForStorage,resourceID:resMgr */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -334,19 +314,16 @@
     } else {
     std::cout << "[" << this->getName() << "] and received an INVALID printerID!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__onStorageResourceID__importStorageDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_sYYgoMeGEeSz1oN1Kl4Now */
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus transition InitUSBBus::WaitForStorage,InitUSBBus::EX_initUSB,resourceID:resMgr */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -368,52 +345,43 @@
     } else {
     std::cout << "[" << this->getName() << "but received INVALID storageID!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__InitUSBBus__Region1__onStorageTimeout__onStorageTimeout( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_PgxWMO4UEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus transition InitUSBBus::WaitForStorage,InitUSBBus::EX_initUSB */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << " timed out waiting to receive a storageId" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__Initialise__initializing( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_3U_ckMbgEeSvmLj5mtpd2g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer transition Initial1,WaitForResourceManager */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] initializing" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::transitionaction_____ComputerSystem__Computer__Computer__Computer_SM__Region1__onResMgrRunning__resMgrRunning( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Lk1o8O4QEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer transition WaitForResourceManager,InitUSBBus::EN_initUSB,resMgrRunning:resMgr */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -425,9 +393,8 @@
     } else {
     std::cout << " -- FAILed to request a printer driver!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Computer::actionchain_____action_____ComputerSystem__Computer__Computer__Computer_SM__Region1__EX_InitUSB_Continuation( const UMLRTMessage * msg )
diff --git a/models/samples/ComputerSystem/expected_src/Computer.hh b/models/samples/ComputerSystem/expected_src/Computer.hh
index 8c92aa0..3a66c22 100644
--- a/models/samples/ComputerSystem/expected_src/Computer.hh
+++ b/models/samples/ComputerSystem/expected_src/Computer.hh
@@ -86,11 +86,11 @@
     enum State
     {
         top__InitUSBBus,
-        top__Running,
-        top__WaitForResourceManager,
         top__InitUSBBus__WaitForPrinter,
         top__InitUSBBus__WaitForStorage,
         top__InitUSBBus__boundary,
+        top__Running,
+        top__WaitForResourceManager,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[7];
diff --git a/models/samples/ComputerSystem/expected_src/ComputerSystem.cc b/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
index 71a224c..4dba5ba 100644
--- a/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
+++ b/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
@@ -61,7 +61,7 @@
 {
     msg = &message;
     actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__setComputerInitTimer( &message );
-    currentState = choice_____top__ChoicePoint3( &message );
+    currentState = choice_____top__timerOK_( &message );
 }
 
 const char * Capsule_ComputerSystem::getCurrentStateString() const
@@ -74,95 +74,78 @@
 
 void Capsule_ComputerSystem::entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failure__ComputerSystemFailed( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_mKmHgAvIEeWCGuiso4e4-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::Failure entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] terminated in failure!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Running__Running( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_1wK1AO4KEeSAlbC0LA6o5Q */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::Running entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is {Running}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__WaitingForComputerInit__waitingForComputerInit( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_GZec4A4FEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::WaitingForComputerInit entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is waiting for computer initialisation {WaitingForComputerInit}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__WaitingForDeviceInit__waitForDeviceInit( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_eZK6wA4GEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::WaitingForDeviceInit entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is waiting for external device initialization." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__IncarnateFail( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_mWsncA4FEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition initOK?,Failure */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] did not incarnate all devices!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__devicesIncarnated( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_TOqxMA4GEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition initOK?,WaitingForDeviceInit */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -170,29 +153,23 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] incarnated all external devices!" << std::endl;
     // context()->debugOutputModel();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__compTimerFail__TimerFail( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_rbKRwA4DEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition timerOK?,Failure */
     std::cout << " but FAILed to set a " << numSec << " seconds timer!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateDevices__incarnateDevicesAndWait( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_02LZ4AvCEeWCGuiso4e4-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition WaitingForComputerInit,initOK?,timeout:timer */
     /**
     * Initialise the devices
     */
@@ -244,17 +221,14 @@
     std::cout << "set " << numSec << " seconds timout for device initialization wait." << std::endl;
     }
     initStatus = ( printerStatus && storageStatus && timerStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateUser__incarnateUser( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Z4ZoMMUeEeS9x_uTNp8Ezw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition WaitingForDeviceInit,userOK?,timeout:timer */
     /**
     * Incarnate the user
     */
@@ -266,17 +240,14 @@
     std::cout << "[" << this->getName() << "] is incarnating a user." << std::endl;
     UMLRTCapsuleId userId = frame.incarnate(user, User);
     initStatus = userId.isValid();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__setComputerInitTimer__setComputerTimer( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_BJHSgAvAEeWCGuiso4e4-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition Initial1,timerOK? */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -286,115 +257,99 @@
     numSec = 20;
     timerID = timer.informIn(UMLRTTimespec(numSec,0));
     initStatus = timerID.isValid();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK__TimerSet( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_wGf_gA4DEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition timerOK?,WaitingForComputerInit */
     std::cout << " and set a " << numSec << " seconds timer." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__errorIncarnatingUser( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_uITGEA4GEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition userOK?,Failure */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] FAILed to incarnate the user!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::transitionaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userIncarnated( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_0UN1wA4GEeWZmqO69MGcNA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem transition userOK?,Running */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] incarnated the user." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__Failed( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard initOK?,Failure */
     return(!initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__Constraint( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard initOK?,WaitingForDeviceInit */
     return(initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__compTimerFail__Failed( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard timerOK?,Failure */
     return(!initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK__validTimer( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard timerOK?,WaitingForComputerInit */
     return(initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__userNOK( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard userOK?,Failure */
     return(!initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ComputerSystem::guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userOK( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem guard userOK?,Running */
     return(initStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ComputerSystem::actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed( const UMLRTMessage * msg )
@@ -448,22 +403,22 @@
     entryaction_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Running__Running( msg );
 }
 
-Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__ChoicePoint2( const UMLRTMessage * msg )
+Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__initOK_( const UMLRTMessage * msg )
 {
-    if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userOK( msg ) )
+    if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__Failed( msg ) )
     {
-        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK( msg );
-        return top__Running;
-    }
-    else if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__userNOK( msg ) )
-    {
-        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK( msg );
+        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed( msg );
         return top__Failure;
     }
+    else if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__Constraint( msg ) )
+    {
+        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success( msg );
+        return top__WaitingForDeviceInit;
+    }
     return currentState;
 }
 
-Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__ChoicePoint3( const UMLRTMessage * msg )
+Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__timerOK_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK__validTimer( msg ) )
     {
@@ -478,17 +433,17 @@
     return currentState;
 }
 
-Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__ChoicePoint4( const UMLRTMessage * msg )
+Capsule_ComputerSystem::State Capsule_ComputerSystem::choice_____top__userOK_( const UMLRTMessage * msg )
 {
-    if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed__Failed( msg ) )
+    if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK__userOK( msg ) )
     {
-        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Failed( msg );
-        return top__Failure;
+        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK( msg );
+        return top__Running;
     }
-    else if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success__Constraint( msg ) )
+    else if( guard_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK__userNOK( msg ) )
     {
-        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__Success( msg );
-        return top__WaitingForDeviceInit;
+        actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK( msg );
+        return top__Failure;
     }
     return currentState;
 }
@@ -524,7 +479,7 @@
         {
         case UMLRTTimerProtocol::signal_timeout:
             actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateDevices( msg );
-            return choice_____top__ChoicePoint4( msg );
+            return choice_____top__initOK_( msg );
         default:
             this->unexpectedMessage();
             break;
@@ -546,7 +501,7 @@
         {
         case UMLRTTimerProtocol::signal_timeout:
             actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__incarnateUser( msg );
-            return choice_____top__ChoicePoint2( msg );
+            return choice_____top__userOK_( msg );
         default:
             this->unexpectedMessage();
             break;
diff --git a/models/samples/ComputerSystem/expected_src/ComputerSystem.hh b/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
index 2058dd2..7d080b6 100644
--- a/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
+++ b/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
@@ -63,9 +63,9 @@
     void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__timerOK( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userNOK( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__System__ComputerSystem__ComputerSystem_SM__Region1__userOK( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint2( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint3( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint4( const UMLRTMessage * msg );
+    State choice_____top__initOK_( const UMLRTMessage * msg );
+    State choice_____top__timerOK_( const UMLRTMessage * msg );
+    State choice_____top__userOK_( const UMLRTMessage * msg );
     State state_____top__Failure( const UMLRTMessage * msg );
     State state_____top__Running( const UMLRTMessage * msg );
     State state_____top__WaitingForComputerInit( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc b/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
index fbe55b2..4476a85 100644
--- a/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
+++ b/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
@@ -18,8 +18,8 @@
 , usbClass( MassStorage )
 , savingData( false )
 {
-    stateNames[top__Disconnected] = "top__Disconnected";
     stateNames[top__Connected] = "top__Connected";
+    stateNames[top__Disconnected] = "top__Disconnected";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
 }
 
@@ -44,7 +44,7 @@
 {
     msg = &message;
     actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__initialize( &message );
-    currentState = choice_____top__ChoicePoint2( &message );
+    currentState = choice_____top__connected_( &message );
 }
 
 const char * Capsule_ExtMassStorage::getCurrentStateString() const
@@ -57,73 +57,59 @@
 
 void Capsule_ExtMassStorage::entryaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Disconnected__StorageDisconnected( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_0yU18O0IEeSzlZWHZcnPXA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage::Disconnected entry  */
     std::cout << "[" << this->getName() << "] is in {Disconnected} state." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connect_Failed__logFailedConnection( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_zAwSMMOpEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition connected?,Disconnected */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] ERROR sending device class : Connection failed! {" <<  connectionStatus <<  "}.";
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connected0__deviceClassSent( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_e6gVoMOpEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition connected?,Connected */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] sent its device class to the hub and is now in {Connected} state." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Eject__DeviceEjected( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_teR2MMOrEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition Connected,Disconnected,Eject:usbPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] ejected" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__initialize__Initialize( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_aJ3GkMOoEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition Initial1,connected? */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -131,35 +117,29 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] initializing." << std::endl;
     connectionStatus = usbPort.deviceClass(usbClass).send();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onConnect__onConnect0( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_wOAo0AuqEeWCGuiso4e4-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition Disconnected,Connected,connect:usbPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] received connection request and is now in {Connected} state." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onData__SavingData( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_4xXMoMOuEeSxS9_G15_gSg */
     #define umlrtparam_data ( *(const void * *)msg->getParam( 0 ) )
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition Connected,Connected,data:usbPort */
     /**
     * Only show logging start on 1st dataset received
     */
@@ -185,18 +165,15 @@
     } else {
     std::cout << "ERROR sending status!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_data
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onEOD__DoneSaving( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Qk3eEMOvEeSxS9_G15_gSg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage transition Connected,Connected,eod:usbPort */
     std::cout << std::endl;
     time_t currentTime;
     struct tm *localTime;
@@ -206,29 +183,26 @@
     std::cout << "[" << this->getName() << "] Saving Ended =====" << std::endl;
     savingData = false;
     exit(0); 
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ExtMassStorage::guard_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connect_Failed__ifSendFailed( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage guard connected?,Disconnected */
     return( ! connectionStatus );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ExtMassStorage::guard_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connected0__ifMsgSent( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage guard connected?,Connected */
     return(connectionStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ExtMassStorage::actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connect_Failed( const UMLRTMessage * msg )
@@ -268,7 +242,7 @@
     transitionaction_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onEOD__DoneSaving( msg );
 }
 
-Capsule_ExtMassStorage::State Capsule_ExtMassStorage::choice_____top__ChoicePoint2( const UMLRTMessage * msg )
+Capsule_ExtMassStorage::State Capsule_ExtMassStorage::choice_____top__connected_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__Connected0__ifMsgSent( msg ) )
     {
diff --git a/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh b/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
index a00147f..09013a4 100644
--- a/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
+++ b/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
@@ -30,8 +30,8 @@
 private:
     enum State
     {
-        top__Disconnected,
         top__Connected,
+        top__Disconnected,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[3];
@@ -53,7 +53,7 @@
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onConnect( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onData( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__ExtMassStorage__ExtMassStorage_SM__Region1__onEOD( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint2( const UMLRTMessage * msg );
+    State choice_____top__connected_( const UMLRTMessage * msg );
     State state_____top__Connected( const UMLRTMessage * msg );
     State state_____top__Disconnected( const UMLRTMessage * msg );
 protected:
diff --git a/models/samples/ComputerSystem/expected_src/LocalPrinter.cc b/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
index 9fae907..d237be6 100644
--- a/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
+++ b/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
@@ -18,8 +18,8 @@
 , usbClass( Printer )
 , printingData( false )
 {
-    stateNames[top__Disconnected] = "top__Disconnected";
     stateNames[top__Connected] = "top__Connected";
+    stateNames[top__Disconnected] = "top__Disconnected";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
 }
 
@@ -44,7 +44,7 @@
 {
     msg = &message;
     actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__initialize( &message );
-    currentState = choice_____top__ChoicePoint2( &message );
+    currentState = choice_____top__Connected_( &message );
 }
 
 const char * Capsule_LocalPrinter::getCurrentStateString() const
@@ -57,61 +57,50 @@
 
 void Capsule_LocalPrinter::entryaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__Disconnected__Disconnected( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_0AZmkO0EEeST5KnPUdkGIg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter::Disconnected entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in {Disconnected} state." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MessageSent__DeviceClassSent( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_rPoUsMOoEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Connected?,Connected */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] sent its device class to the hub and is now {Connected}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MsgSendFail__PrinterConnectionFailed( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_rVg5EMOOEeSSS8SwKHucgQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Connected?,Disconnected */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] Error sending device class to hub : connection failed {" << connectionStatus << "]" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__initialize__Connect_Printer( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#__DwQMMOMEeSSS8SwKHucgQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Initial1,Connected? */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -119,35 +108,29 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] initializing." << std::endl;
     connectionStatus = usbPort.deviceClass(usbClass).send();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onConnect__connectingPrinter( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_DS0ocAupEeWCGuiso4e4-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Disconnected,Connected,connect:usbPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] received a connection request and is now in {Connected} state." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onData__PrintData( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_mQV8wMOTEeSSS8SwKHucgQ */
     #define umlrtparam_data ( *(const void * *)msg->getParam( 0 ) )
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Connected,Connected,data:usbPort */
     /**
     * Only show logging start on 1st dataset received
     */
@@ -162,18 +145,15 @@
     }
     std::cout << (char *) umlrtparam_data;
     usbPort.status(100).send();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_data
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onEOD__PrintingEnd( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Li3_IMOUEeSSS8SwKHucgQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Connected,Connected,eod:usbPort */
     std::cout << std::endl;
     time_t currentTime;
     struct tm *localTime;
@@ -182,46 +162,40 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] Printing Ended ==========" << std::endl;
     printingData = false;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::transitionaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onEject__EjectPrinter( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_13uUwMOoEeSy9Z1Kd1VJnQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter transition Connected,Disconnected,Eject:usbPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] ejected!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_LocalPrinter::guard_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MessageSent__ifConnected( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter guard Connected?,Connected */
     return(connectionStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_LocalPrinter::guard_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MsgSendFail__ifNotConnected( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter guard Connected?,Disconnected */
     return(! connectionStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_LocalPrinter::actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MessageSent( const UMLRTMessage * msg )
@@ -261,7 +235,7 @@
     entryaction_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__Disconnected__Disconnected( msg );
 }
 
-Capsule_LocalPrinter::State Capsule_LocalPrinter::choice_____top__ChoicePoint2( const UMLRTMessage * msg )
+Capsule_LocalPrinter::State Capsule_LocalPrinter::choice_____top__Connected_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__MsgSendFail__ifNotConnected( msg ) )
     {
diff --git a/models/samples/ComputerSystem/expected_src/LocalPrinter.hh b/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
index 1da37ab..4fc60e1 100644
--- a/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
+++ b/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
@@ -30,8 +30,8 @@
 private:
     enum State
     {
-        top__Disconnected,
         top__Connected,
+        top__Disconnected,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[3];
@@ -53,7 +53,7 @@
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onData( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onEOD( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__Hardware__ExternalDevices__LocalPrinter__LocalPrinter_SM__Region1__onEject( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint2( const UMLRTMessage * msg );
+    State choice_____top__Connected_( const UMLRTMessage * msg );
     State state_____top__Connected( const UMLRTMessage * msg );
     State state_____top__Disconnected( const UMLRTMessage * msg );
 protected:
diff --git a/models/samples/ComputerSystem/expected_src/ResourceManager.cc b/models/samples/ComputerSystem/expected_src/ResourceManager.cc
index c2733a2..f909e4e 100644
--- a/models/samples/ComputerSystem/expected_src/ResourceManager.cc
+++ b/models/samples/ComputerSystem/expected_src/ResourceManager.cc
@@ -28,8 +28,8 @@
 , currentState( SPECIAL_INTERNAL_STATE_UNVISITED )
 {
     stateNames[top__InitFail] = "top__InitFail";
-    stateNames[top__WaitingForRequest] = "top__WaitingForRequest";
     stateNames[top__WaitInitTimeout] = "top__WaitInitTimeout";
+    stateNames[top__WaitingForRequest] = "top__WaitingForRequest";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
 }
 
@@ -116,107 +116,87 @@
 
 void Capsule_ResourceManager::entryaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__InitFail__initFailState( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_QH-LUA7dEeWWHqV5N_7gJQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager::InitFail entry  */
     std::cout << "[" << this->getName() << "] is in state {InitFail}" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::entryaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__WaitInitTimeout__waitOnTimeout( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_5nGcIA48EeWfxoP9jGN4_w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager::WaitInitTimeout entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in state {WaitInitTimeout}" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::entryaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__WaitingForRequest__waitingForRequest( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_YOXT8O0NEeSzlZWHZcnPXA */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager::WaitingForRequest entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is in state {WaitingForRequest},  waiting for a request" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::exitaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__WaitingForRequest__requestReceived( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_m4LMsA7dEeWWHqV5N_7gJQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager::WaitingForRequest exit  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] received a request!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__NOK__InitiFailed( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_jXgVEPBOEeSy0dZlYL7EHw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition instantiateOK,InitFail */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] FAILed to initialize!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__OK__InstantiateSuccess( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_qLX1kPBOEeSy0dZlYL7EHw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition instantiateOK,WaitInitTimeout */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] drivers instantiated." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__initialize__Initialize( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_NM_EQMXIEeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition Initial1,instantiateOK */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -263,17 +243,14 @@
     std::cout << "set a " << numSec << " seconds timer for drivers initialization." << std::endl;
     }
     status = ( localPrinterStatus && localStorageStatus && localTimerStatus);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__onAppPortStorageRequest__sendAppPortStorageResource( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_fybTYA8cEeWl7ddVi7dGGQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition WaitingForRequest,WaitingForRequest,requestStorageDriver:appPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -293,17 +270,14 @@
     std::cout << "but ERROR sending storage resource not available!" << std::endl;
     }
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__onAppPrinterRequest__sendAppPortPrinterResource( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_BXI1oA8cEeWl7ddVi7dGGQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition WaitingForRequest,WaitingForRequest,requestPrinterDriver:appPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -323,17 +297,14 @@
     std::cout << "but ERROR sending printer resource not available" << std::endl;
     }
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__onResMgrPrinterRequest__sendResMgrPrinterResource( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_iA5vkMX-EeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition WaitingForRequest,WaitingForRequest,requestPrinterDriver:resMgr */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -353,17 +324,14 @@
     std::cout << " but ERROR sending printer resource not available!" << std::endl;
     }
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__onResMgrStorageRequest__sendResMgrStorageResource( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_095lEMX-EeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition WaitingForRequest,WaitingForRequest,requestStorageDriver:resMgr */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -383,17 +351,14 @@
     std::cout << " but ERROR sending storage resource not available" << std::endl;
     }
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::transitionaction_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__onTimeout__broadcastReady( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_T_5GEA5DEeWfxoP9jGN4_w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager transition WaitInitTimeout,WaitingForRequest,timeout:timer */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -405,34 +370,30 @@
     std::cout << "[" << this->getName() << "] ";
     if ( resMgr.resMgrRunning().send() ) {
     std::cout << "told ";
-
     } else {
     std::cout << "FAILED to tell ";
     }
     std::cout << "its clients that it is taking requests." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ResourceManager::guard_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__NOK__FailedInitialization( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager guard instantiateOK,InitFail */
     return ( ! status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_ResourceManager::guard_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__OK__SuccesfulInitialization( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager guard instantiateOK,WaitInitTimeout */
     return( status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_ResourceManager::actionchain_____action_____ComputerSystem__Computer__ResourceManager__ResourceManager_SM__Region1__NOK( const UMLRTMessage * msg )
diff --git a/models/samples/ComputerSystem/expected_src/ResourceManager.hh b/models/samples/ComputerSystem/expected_src/ResourceManager.hh
index 0b0c90e..1f75d28 100644
--- a/models/samples/ComputerSystem/expected_src/ResourceManager.hh
+++ b/models/samples/ComputerSystem/expected_src/ResourceManager.hh
@@ -77,8 +77,8 @@
     enum State
     {
         top__InitFail,
-        top__WaitingForRequest,
         top__WaitInitTimeout,
+        top__WaitingForRequest,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[4];
diff --git a/models/samples/ComputerSystem/expected_src/User.cc b/models/samples/ComputerSystem/expected_src/User.cc
index f0c9a6d..8d9ef32 100644
--- a/models/samples/ComputerSystem/expected_src/User.cc
+++ b/models/samples/ComputerSystem/expected_src/User.cc
@@ -17,11 +17,11 @@
 , timer( borderPorts[borderport_timer] )
 , currentState( SPECIAL_INTERNAL_STATE_UNVISITED )
 {
-    stateNames[top__Waiting4DocSave] = "top__Waiting4DocSave";
     stateNames[top__Alive] = "top__Alive";
-    stateNames[top__Waiting4DocPrint] = "top__Waiting4DocPrint";
-    stateNames[top__TestDone] = "top__TestDone";
     stateNames[top__FAILED] = "top__FAILED";
+    stateNames[top__TestDone] = "top__TestDone";
+    stateNames[top__Waiting4DocPrint] = "top__Waiting4DocPrint";
+    stateNames[top__Waiting4DocSave] = "top__Waiting4DocSave";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
 }
 
@@ -85,7 +85,7 @@
 {
     msg = &message;
     actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__initialize( &message );
-    currentState = choice_____top__ChoicePoint2( &message );
+    currentState = choice_____top__tid1_( &message );
 }
 
 const char * Capsule_User::getCurrentStateString() const
@@ -98,27 +98,22 @@
 
 void Capsule_User::entryaction_____ComputerSystem__System__User__User_SM__Region1__Alive__UserIsAlive( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_gwa88Oz_EeSEsOihEv1CcQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Alive entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] is alive!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::entryaction_____ComputerSystem__System__User__User_SM__Region1__FAILED__testFailed( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_m7LQMBaaEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::FAILED entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -126,17 +121,14 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] {FAILED}!";
     std::exit(EXIT_FAILURE); // unsuccessful execution
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::entryaction_____ComputerSystem__System__User__User_SM__Region1__TestDone__testDone( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_f5R6wBaaEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::TestDone entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -144,128 +136,101 @@
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] is finished testing." << std::endl;
     std::exit(EXIT_SUCCESS); // successful execution
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::entryaction_____ComputerSystem__System__User__User_SM__Region1__Waiting4DocPrint__wait4Print( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_7CiQkJLcEeWTl7q8dOahXg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Waiting4DocPrint entry  */
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] user is {Waiting4DocPrint}" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::entryaction_____ComputerSystem__System__User__User_SM__Region1__Waiting4DocSave__Waiting4DocSave_EN( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#__09VoJJLEeWg8uhgJTo7AQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Waiting4DocSave entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] user is {Waiting4DocSave}" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__Transition0__saveRequested( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#__KXC8BaYEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid2?,Waiting4DocSave */
     std::cout << " asked for the document to be saved." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__Transition1__printRequested( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_2Q8J0JLcEeWTl7q8dOahXg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid3?,Waiting4DocPrint */
     std::cout << " asked for the document to be printed." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__Transition2__saveFailed( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_E7D2QBaZEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid2?,FAILED */
     std::cout << " FAILed to ask for the document to be saved!";
     if ( timerID.isValid() ) {
     std::cout << " - FAILed to send message!" << std::endl;
     } else {
     std::cout << " FAILed to set timer!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__Transition3__printFailure( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_uAQGAJLcEeWTl7q8dOahXg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid3?,FAILED */
     std::cout << " FAILed to ask for the document to be printed!";
     if ( timerID.isValid() ) {
     std::cout << " - FAILed to send message!" << std::endl;
     } else {
     std::cout << " FAILed to set timer!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__initTimerFail__initTimerFail( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_QFvQ4BaXEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid1?,FAILED */
     std::cout << " but FAILed to set a " << numSec << " seconds timer." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__initTimerSet__initTimerSet( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_EY4oMBaXEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition tid1?,Alive */
     std::cout << " and set a " << numSec << " seconds timer." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__initialize__Initialize_USER( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_b3oZ8MWrEeS9x_uTNp8Ezw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition Initial,tid1? */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -274,17 +239,14 @@
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] initializing";
     numSec = 15;
     timerID = timer.informIn(UMLRTTimespec(numSec,0));
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc__printDoc( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_NakGcBbLEeWa4sJtLVaM7A */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition TesterChoice,tid3? */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -295,34 +257,28 @@
     //numSec = 10;
     timerID = timer.informIn(UMLRTTimespec(numSec,0));
     status = sendStatus && timerID.isValid();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__isTrueDone__SuccessfulRun( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_DCwnAJJPEeWg8uhgJTo7AQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition TesterChoice,TestDone */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "["<< std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] Successful Run!" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__onTimeout1__saveDocument( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_laox4BaXEeWD0440ocvGbg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition Alive,tid2?,timeout:timer */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -333,106 +289,94 @@
     //numSec = 10;
     timerID = timer.informIn(UMLRTTimespec(numSec,0));
     status = sendStatus && timerID.isValid();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::transitionaction_____ComputerSystem__System__User__User_SM__Region1__onTimeout2__saveTimout( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_XefLsJJMEeWg8uhgJTo7AQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User transition Waiting4DocSave,TesterChoice,timeout:timer */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "(" << this->getClass()->name << ")] Save timeout received" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__Transition0__saveOK( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid2?,Waiting4DocSave */
     return(status);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__Transition1__printSet( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid3?,Waiting4DocPrint */
     return(status);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__Transition2__saveFail( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid2?,FAILED */
     return(!status);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__Transition3__printFail( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid3?,FAILED */
     return(!status);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__initTimerFail__invalidTimer( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid1?,FAILED */
     return(!timerID.isValid());
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__initTimerSet__timerValid( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard tid1?,Alive */
     return(timerID.isValid());
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc__isFalse( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard TesterChoice,tid3? */
     return(false);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_User::guard_____ComputerSystem__System__User__User_SM__Region1__isTrueDone__isTrue( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User guard TesterChoice,TestDone */
     return(true);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_User::actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__Transition0( const UMLRTMessage * msg )
@@ -507,7 +451,22 @@
     entryaction_____ComputerSystem__System__User__User_SM__Region1__FAILED__testFailed( msg );
 }
 
-Capsule_User::State Capsule_User::choice_____top__ChoicePoint2( const UMLRTMessage * msg )
+Capsule_User::State Capsule_User::choice_____top__TesterChoice( const UMLRTMessage * msg )
+{
+    if( guard_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc__isFalse( msg ) )
+    {
+        actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc( msg );
+        return choice_____top__tid3_( msg );
+    }
+    else if( guard_____ComputerSystem__System__User__User_SM__Region1__isTrueDone__isTrue( msg ) )
+    {
+        actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__isTrueDone( msg );
+        return top__TestDone;
+    }
+    return currentState;
+}
+
+Capsule_User::State Capsule_User::choice_____top__tid1_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__System__User__User_SM__Region1__initTimerSet__timerValid( msg ) )
     {
@@ -522,7 +481,7 @@
     return currentState;
 }
 
-Capsule_User::State Capsule_User::choice_____top__ChoicePoint3( const UMLRTMessage * msg )
+Capsule_User::State Capsule_User::choice_____top__tid2_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__System__User__User_SM__Region1__Transition0__saveOK( msg ) )
     {
@@ -537,7 +496,7 @@
     return currentState;
 }
 
-Capsule_User::State Capsule_User::choice_____top__ChoicePoint4( const UMLRTMessage * msg )
+Capsule_User::State Capsule_User::choice_____top__tid3_( const UMLRTMessage * msg )
 {
     if( guard_____ComputerSystem__System__User__User_SM__Region1__Transition1__printSet( msg ) )
     {
@@ -552,21 +511,6 @@
     return currentState;
 }
 
-Capsule_User::State Capsule_User::choice_____top__TesterChoice( const UMLRTMessage * msg )
-{
-    if( guard_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc__isFalse( msg ) )
-    {
-        actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__isFalsePrintDoc( msg );
-        return choice_____top__ChoicePoint4( msg );
-    }
-    else if( guard_____ComputerSystem__System__User__User_SM__Region1__isTrueDone__isTrue( msg ) )
-    {
-        actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__isTrueDone( msg );
-        return top__TestDone;
-    }
-    return currentState;
-}
-
 Capsule_User::State Capsule_User::state_____top__Alive( const UMLRTMessage * msg )
 {
     switch( msg->destPort->role()->id )
@@ -576,7 +520,7 @@
         {
         case UMLRTTimerProtocol::signal_timeout:
             actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__onTimeout1( msg );
-            return choice_____top__ChoicePoint3( msg );
+            return choice_____top__tid2_( msg );
         default:
             this->unexpectedMessage();
             break;
diff --git a/models/samples/ComputerSystem/expected_src/User.hh b/models/samples/ComputerSystem/expected_src/User.hh
index 494e333..ceb1c2f 100644
--- a/models/samples/ComputerSystem/expected_src/User.hh
+++ b/models/samples/ComputerSystem/expected_src/User.hh
@@ -51,11 +51,11 @@
 private:
     enum State
     {
-        top__Waiting4DocSave,
         top__Alive,
-        top__Waiting4DocPrint,
-        top__TestDone,
         top__FAILED,
+        top__TestDone,
+        top__Waiting4DocPrint,
+        top__Waiting4DocSave,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[6];
@@ -97,10 +97,10 @@
     void actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__onTimeout1( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__onTimeout2( const UMLRTMessage * msg );
     void actionchain_____action_____ComputerSystem__System__User__User_SM__Region1__onTimeout3( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint2( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint3( const UMLRTMessage * msg );
-    State choice_____top__ChoicePoint4( const UMLRTMessage * msg );
     State choice_____top__TesterChoice( const UMLRTMessage * msg );
+    State choice_____top__tid1_( const UMLRTMessage * msg );
+    State choice_____top__tid2_( const UMLRTMessage * msg );
+    State choice_____top__tid3_( const UMLRTMessage * msg );
     State state_____top__Alive( const UMLRTMessage * msg );
     State state_____top__FAILED( const UMLRTMessage * msg );
     State state_____top__TestDone( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc b/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
index ffca336..5cc5fcb 100644
--- a/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
+++ b/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
@@ -29,13 +29,13 @@
 {
     stateNames[top__Printing] = "top__Printing";
     stateNames[top__Saving] = "top__Saving";
-    stateNames[top__Printing__waitForPrinter] = "top__Printing__waitForPrinter";
-    stateNames[top__WaitingForCommand] = "top__WaitingForCommand";
     stateNames[top__Printing__Printing] = "top__Printing__Printing";
     stateNames[top__Printing__boundary] = "top__Printing__boundary";
-    stateNames[top__Saving__WaitForStorage] = "top__Saving__WaitForStorage";
+    stateNames[top__Printing__waitForPrinter] = "top__Printing__waitForPrinter";
     stateNames[top__Saving__Saving] = "top__Saving__Saving";
+    stateNames[top__Saving__WaitForStorage] = "top__Saving__WaitForStorage";
     stateNames[top__Saving__boundary] = "top__Saving__boundary";
+    stateNames[top__WaitingForCommand] = "top__WaitingForCommand";
     stateNames[SPECIAL_INTERNAL_STATE_UNVISITED] = "<uninitialized>";
     int i = 0;
     while( i < 2 )
@@ -154,95 +154,78 @@
 
 void Capsule_WordProcessorApp::entryaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__waitForPrinter__waitingForPrinter( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_WFrQ0O4YEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing::waitForPrinter entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] waiting for printer driver" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::entryaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__printing_EN( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_ffx8MBbHEeWa4sJtLVaM7A */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is {Printing}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::entryaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__WaitForStorage__waitingForStorage( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_JqErwO4YEeSJPsWo_Mnp3w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving::WaitForStorage entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] waiting for storage driver" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::entryaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__saving_EN( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_apcfYBbHEeWa4sJtLVaM7A */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is {Saving}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::entryaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__WaitingForCommand__waitingForCommand_EN( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_F_0I8BbHEeWa4sJtLVaM7A */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::WaitingForCommand entry  */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is {WaitingForCommand}." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Initial__initializingApplication( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_EWxlsMeCEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition Initial1,WaitingForCommand */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -251,34 +234,28 @@
     strcpy(document, "Aenean lacinia bibendum nulla sed consectetur.\0\0");
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] is initializing and document contains string \"" << document << "\"." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__Transition0__couldNotPrint( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_I2cMAPBgEeSy0dZlYL7EHw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::printOK,Printing::ExitPoint1 */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] could not print document" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__getPrinter__requestPrinterDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_J8zV8MbFEeSvmLj5mtpd2g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::EntryPoint1,Printing::waitForPrinter */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -290,34 +267,28 @@
     } else {
     std::cout << " FAILed to  request a printer driver" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__importNOK__importNOK1( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_RsWXoO09EeStM4MpdkuAjQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::importOK,Printing::ExitPoint1 */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] could not import printer driver" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__importOK0__printDocument( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_IaS9cO09EeStM4MpdkuAjQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::importOK,Printing::printOK */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -329,18 +300,15 @@
     } else {
     std::cout << "[" << this->getName() << "] ERROR sending document to print" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__onPrintResource__importPrinterDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_hD2kgMbaEeSvmLj5mtpd2g */
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::waitForPrinter,Printing::importOK,resourceID:resourcePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -355,50 +323,41 @@
     importOK = false;
     std::cout << " received an invalid Printer ID" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__onPrintStatus__getProgress( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_9-zoAMbGEeSvmLj5mtpd2g */
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::Printing,Printing::Choice1,status:usbPort */
     progress = (int) *rtdata;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__onResNotAvail__printResourceNotAvailable( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Dvz-QMeAEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::waitForPrinter,Printing::ExitPoint1,resNotAvail:resourcePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] print driver not available" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__printCompleted__releasePrinterDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_EZ8vYMbbEeSvmLj5mtpd2g */
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::Choice1,Printing::ExitPoint2,status:usbPort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -411,35 +370,29 @@
     } else {
     std::cout << "[" << this->getName() << "] - FAILed to send EOD";
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__printPrintProgress__printPrintProgress( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_79hWkMeTEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing transition Printing::Choice1,Printing::Printing */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] Printing... " << (int) progress << "%%" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__getStorage__requestStorageDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Kn8eQMeBEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::EntryPoint1,Saving::WaitForStorage */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -451,34 +404,28 @@
     } else {
     std::cout << "FAILed to request a storage driver" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__importNOK__CouldNotImport( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_k0IWQO08EeStM4MpdkuAjQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::importOK,Saving::ExitPoint1 */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[APPLICATION] could not import storage driver" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__importOK0__saveDocument( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_790dEMeJEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::importOK,Saving::saveOK */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -490,66 +437,54 @@
     } else {
     std::cout << "[" << this->getName() << "] error sending document to save" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__isNOK__couldNotSave( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_ZsBegPBfEeSy0dZlYL7EHw */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::saveOK,Saving::ExitPoint1 */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] could not save document" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__onResNotAvail__noStorageAvailable( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_lmUFAMeIEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::WaitForStorage,Saving::ExitPoint1,resNotAvail:resourcePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[APPLICATION] storage driver not available" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__onSaveStatus__saveProgress( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_cysfEMbfEeSvmLj5mtpd2g */
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::Saving,Saving::Choice1,status:usbPort */
     progress = (int) *rtdata;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__onStorageResource__importStorageDriver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_mJe9IMeAEeSz1oN1Kl4Now */
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::WaitForStorage,Saving::importOK,resourceID:resourcePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -563,35 +498,29 @@
     importOK = false;
     std::cout << "[" << this->getName() << "] Invalid StorageDriver ID." << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__printSaveProgress__printSaveProgress( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_Coi5kMeTEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::Choice1,Saving::Saving */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] Saving..." << (int) progress << "%%" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__saveCompleted__releaseStorage_Driver( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_xGvAAMbfEeSvmLj5mtpd2g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving transition Saving::Choice1,Saving::ExitPoint2 */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -604,89 +533,74 @@
     } else {
     std::cout << " - FAILed to send EOD" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__onAddToDoc__addString( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_6vVwgMYEEeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition WaitingForCommand,WaitingForCommand,addToDoc:UserControlePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] String added to document." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__onCreateDoc__createDocument( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_pfv4AMYEEeSsD5C2f30z-g */
     #define umlrtparam_fileName ( *(const char * *)msg->getParam( 0 ) )
     #define umlrtparam_data ( *(const void * *)msg->getParam( 1 ) )
     #define rtdata ( (char *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition WaitingForCommand,WaitingForCommand,createDocument:UserControlePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << (localTime->tm_year + 1900) << "." << std::setw(2) << (localTime->tm_mon + 1) << "." << std::setw(2) << localTime->tm_mday << " " << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] document created with provided string." << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_data
     #undef umlrtparam_fileName
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__onPrintDocument__printDocumentRequest( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_CCoQkMYIEeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition WaitingForCommand,Printing::EntryPoint1,printDocument:UserControlePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] received request to print the document" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__onSaveDocument__saveDocumentRequest( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_a2JHAMeIEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition WaitingForCommand,Saving::EntryPoint1,saveDocument:UserControlePort */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
     localTime = localtime( &currentTime );
     std::cout << std::setfill('0') << "[" << std::setw(2) << localTime->tm_hour << ":" << std::setw(2) << localTime->tm_min << ":" << std::setw(2) << localTime->tm_sec << "] ";
     std::cout << "[" << this->getName() << "] received request to save the document" << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__printComplete_cont__printComplete( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_ZvcWEMYGEeSsD5C2f30z-g */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition Printing::ExitPoint2,WaitingForCommand */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -698,17 +612,14 @@
     } else {
     std::cout << " - FAILed to release the printer driver!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::transitionaction_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__saveComplete_cont__saveComplete( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/ComputerSystem/ComputerSystem.uml#_rV5iMMeBEeSz1oN1Kl4Now */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp transition Saving::ExitPoint2,WaitingForCommand */
     time_t currentTime;
     struct tm *localTime;
     time( &currentTime );
@@ -720,153 +631,140 @@
     } else {
     std::cout << " - FAILed to release the storage driver!" << std::endl;
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__Transition0__statusNOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::printOK,Printing::ExitPoint1 */
     return( ! status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__Transition1__statusOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::printOK,Printing::Printing */
     return( status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__importNOK__importNOK0( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::importOK,Printing::ExitPoint1 */
     return( ! importOK );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__importOK0__Constraint( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::importOK,Printing::printOK */
     return( importOK );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__printCompleted__progress_GTE_100( const UMLRTMessage * msg )
 {
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::Choice1,Printing::ExitPoint2,status:usbPort */
     return( progress >= 100);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Printing__Region1__printPrintProgress__Progress_LT_100( const UMLRTMessage * msg )
 {
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing guard Printing::Choice1,Printing::Printing */
     return( progress < 100);
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__importNOK__importNOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::importOK,Saving::ExitPoint1 */
     return( ! importOK );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__importOK0__importOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::importOK,Saving::saveOK */
     return( importOK );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__isNOK__statusNOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::saveOK,Saving::ExitPoint1 */
     return ( ! status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__isOK__isOK( const UMLRTMessage * msg )
 {
     #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
     #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::saveOK,Saving::Saving */
     return( status );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_resourceID
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__printSaveProgress__progress_LT_100( const UMLRTMessage * msg )
 {
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::Choice1,Saving::Saving */
     return( progress < 100 );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 bool Capsule_WordProcessorApp::guard_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Saving__saveCompleted__progress_GTE_100( const UMLRTMessage * msg )
 {
     #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving guard Saving::Choice1,Saving::ExitPoint2 */
     return( progress >= 100 );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_percent
-    // generated code ends
 }
 
 void Capsule_WordProcessorApp::actionchain_____action_____ComputerSystem__Software__WordProcessorApp__WordProcessorApp_SM__Region1__Initial( const UMLRTMessage * msg )
diff --git a/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh b/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
index 2dfaf0d..32fa55a 100644
--- a/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
+++ b/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
@@ -76,13 +76,13 @@
     {
         top__Printing,
         top__Saving,
-        top__Printing__waitForPrinter,
-        top__WaitingForCommand,
         top__Printing__Printing,
         top__Printing__boundary,
-        top__Saving__WaitForStorage,
+        top__Printing__waitForPrinter,
         top__Saving__Saving,
+        top__Saving__WaitForStorage,
         top__Saving__boundary,
+        top__WaitingForCommand,
         SPECIAL_INTERNAL_STATE_UNVISITED
     };
     const char * stateNames[10];
diff --git a/models/tests/PingPong/PingPong.uml b/models/tests/PingPong/PingPong.uml
index 92451b8..1fe2340 100755
--- a/models/tests/PingPong/PingPong.uml
+++ b/models/tests/PingPong/PingPong.uml
@@ -1,24 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:RTCppProperties="http://www.eclipse.org/papyrus/umlrt/cppproperties" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:UMLRealTimeStateMach="http://www.eclipse.org/papyrus/umlrt/statemachine" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
   <uml:Model xmi:id="_yKukYCSQEeS0XNKzoL660g" name="PingPong">
-    <packageImport xmi:type="uml:PackageImport" xmi:id="_yKukYSSQEeS0XNKzoL660g">
+    <packageImport xmi:id="_yKukYSSQEeS0XNKzoL660g">
       <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
     </packageImport>
     <packagedElement xmi:type="uml:Class" xmi:id="_97ZrMCSSEeS0XNKzoL660g" name="Top" isActive="true">
-      <ownedAttribute xmi:type="uml:Property" xmi:id="_AkoIgCSZEeS0XNKzoL660g" name="pinger" visibility="protected" type="__EW3UCSSEeS0XNKzoL660g" aggregation="composite" association="_AkpWoCSZEeS0XNKzoL660g">
+      <ownedAttribute xmi:id="_AkoIgCSZEeS0XNKzoL660g" name="pinger" visibility="protected" type="__EW3UCSSEeS0XNKzoL660g" aggregation="composite" association="_AkpWoCSZEeS0XNKzoL660g">
         <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AkoIgSSZEeS0XNKzoL660g" value="1"/>
         <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AkoIgiSZEeS0XNKzoL660g" value="1"/>
       </ownedAttribute>
-      <ownedAttribute xmi:type="uml:Property" xmi:id="_CRig0CSaEeS0XNKzoL660g" name="ponger" visibility="protected" type="_BMMGgCSTEeS0XNKzoL660g" aggregation="composite" association="_CRjH4CSaEeS0XNKzoL660g">
+      <ownedAttribute xmi:id="_CRig0CSaEeS0XNKzoL660g" name="ponger" visibility="protected" type="_BMMGgCSTEeS0XNKzoL660g" aggregation="composite" association="_CRjH4CSaEeS0XNKzoL660g">
         <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_CRig0SSaEeS0XNKzoL660g" value="1"/>
         <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_CRig0iSaEeS0XNKzoL660g" value="1"/>
       </ownedAttribute>
-      <ownedConnector xmi:type="uml:Connector" xmi:id="_nfqtsCbyEeSBQ4h-CZj2Uw" name="Connector1">
-        <end xmi:type="uml:ConnectorEnd" xmi:id="_nfyCcCbyEeSBQ4h-CZj2Uw" partWithPort="_AkoIgCSZEeS0XNKzoL660g" role="_PQ_kMCbnEeSBQ4h-CZj2Uw">
+      <ownedConnector xmi:id="_nfqtsCbyEeSBQ4h-CZj2Uw" name="Connector1">
+        <end xmi:id="_nfyCcCbyEeSBQ4h-CZj2Uw" partWithPort="_AkoIgCSZEeS0XNKzoL660g" role="_PQ_kMCbnEeSBQ4h-CZj2Uw">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_nfyCcSbyEeSBQ4h-CZj2Uw" value="1"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_nfyCcibyEeSBQ4h-CZj2Uw" value="1"/>
         </end>
-        <end xmi:type="uml:ConnectorEnd" xmi:id="_nfypgCbyEeSBQ4h-CZj2Uw" partWithPort="_CRig0CSaEeS0XNKzoL660g" role="_aXdiUCbnEeSBQ4h-CZj2Uw">
+        <end xmi:id="_nfypgCbyEeSBQ4h-CZj2Uw" partWithPort="_CRig0CSaEeS0XNKzoL660g" role="_aXdiUCbnEeSBQ4h-CZj2Uw">
           <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_nfypgSbyEeSBQ4h-CZj2Uw" value="1"/>
           <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_nfypgibyEeSBQ4h-CZj2Uw" value="1"/>
         </end>
@@ -30,16 +30,17 @@
         <type xmi:type="uml:Collaboration" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_MxQZgGXsEeS_4daqvwyFrg"/>
       </ownedAttribute>
       <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_aKvpECb0EeSBQ4h-CZj2Uw" name="Pinger_SM" isReentrant="false">
-        <region xmi:type="uml:Region" xmi:id="_ibsLkCb0EeSBQ4h-CZj2Uw" name="Region1">
-          <transition xmi:type="uml:Transition" xmi:id="_9D_DYCb1EeSBQ4h-CZj2Uw" name="initial" source="_XswHMCb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
+        <region xmi:id="_ibsLkCb0EeSBQ4h-CZj2Uw" name="Region1">
+          <transition xmi:id="_9D_DYCb1EeSBQ4h-CZj2Uw" name="initial" source="_XswHMCb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="_GPufUFYLEeSmi4Fyw18d0w" name="onInit" isAbstract="true">
               <language>C++</language>
-              <body>std::cout &lt;&lt; getName() &lt;&lt; &quot;: timer started&quot; &lt;&lt; std::endl;
-timerPort.informIn( UMLRTTimespec( 1, 0 ) );</body>
+              <body>    std::cout &lt;&lt; getName() &lt;&lt; &quot;: timer started&quot; &lt;&lt; std::endl;
+    timerPort.informIn( UMLRTTimespec( 1, 0 ) );
+</body>
             </effect>
           </transition>
-          <transition xmi:type="uml:Transition" xmi:id="_9xGBACb1EeSBQ4h-CZj2Uw" name="onPong" source="_lY5HECb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
-            <ownedRule xmi:type="uml:Constraint" xmi:id="_y9GtMFYMEeSmi4Fyw18d0w" name="true">
+          <transition xmi:id="_9xGBACb1EeSBQ4h-CZj2Uw" name="onPong" source="_lY5HECb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
+            <ownedRule xmi:id="_y9GtMFYMEeSmi4Fyw18d0w" name="true">
               <specification xmi:type="uml:LiteralBoolean" xmi:id="_y9GtMVYMEeSmi4Fyw18d0w" value="true"/>
             </ownedRule>
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="_XTukYCcPEeSlGd4okkPIfw" name="onPong" isAbstract="true">
@@ -47,16 +48,16 @@
               <body>std::cout &lt;&lt; getName() &lt;&lt; &quot;: pong( &quot; &lt;&lt; * rtdata &lt;&lt; &quot; ) received, sending ping&quot; &lt;&lt; std::endl;&#xD;
 PingPort.ping( * rtdata + 1 ).send(); </body>
             </effect>
-            <trigger xmi:type="uml:Trigger" xmi:id="_byJF4CcOEeSlGd4okkPIfw" name="" event="_zFJ2YCS-EeS0XNKzoL660g" port="_PQ_kMCbnEeSBQ4h-CZj2Uw"/>
+            <trigger xmi:id="_byJF4CcOEeSlGd4okkPIfw" name="" event="_zFJ2YCS-EeS0XNKzoL660g" port="_PQ_kMCbnEeSBQ4h-CZj2Uw"/>
           </transition>
-          <transition xmi:type="uml:Transition" xmi:id="_4p71EGxxEeSWy5Y1YWzXfQ" name="onTimeout" source="_lY5HECb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
+          <transition xmi:id="_4p71EGxxEeSWy5Y1YWzXfQ" name="onTimeout" source="_lY5HECb1EeSBQ4h-CZj2Uw" target="_lY5HECb1EeSBQ4h-CZj2Uw">
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="__I0kEGxxEeSWy5Y1YWzXfQ" name="onTimeout" isAbstract="true">
               <language>C++</language>
-              <body>std::cout &lt;&lt; getName() &lt;&lt; &quot;: timeout, sending ping( 0 )&quot; &lt;&lt; std::endl;
-PingPort.ping( 0 ).send();
+              <body>    std::cout &lt;&lt; getName() &lt;&lt; &quot;: timeout, sending ping( 0 )&quot; &lt;&lt; std::endl;
+    PingPort.ping( 0 ).send();
 </body>
             </effect>
-            <trigger xmi:type="uml:Trigger" xmi:id="_B9aZUGx3EeSqHojLEIPEZQ" port="_cV5-wGxxEeSWy5Y1YWzXfQ">
+            <trigger xmi:id="_B9aZUGx3EeSqHojLEIPEZQ" port="_cV5-wGxxEeSWy5Y1YWzXfQ">
               <event xmi:type="uml:CallEvent" href="pathmap://UMLRTRTSLIB/UMLRT-RTS.uml#_IaEO8HDxEeSwWKwNKw1iAA"/>
             </trigger>
           </transition>
@@ -72,47 +73,46 @@
     </packagedElement>
     <packagedElement xmi:type="uml:Class" xmi:id="_BMMGgCSTEeS0XNKzoL660g" name="Ponger" visibility="private" classifierBehavior="_ltVRwCcQEeSlGd4okkPIfw" isActive="true">
       <ownedAttribute xmi:type="uml:Port" xmi:id="_aXdiUCbnEeSBQ4h-CZj2Uw" name="PongPort" visibility="public" type="_bEbXYCS1EeS0XNKzoL660g" aggregation="composite" isBehavior="true" isConjugated="true"/>
-      <ownedAttribute xmi:type="uml:Property" xmi:id="_JCGtUNRwEeSDr9Y6ukJekA" name="messageLimit">
+      <ownedAttribute xmi:id="_JCGtUNRwEeSDr9Y6ukJekA" name="messageLimit">
         <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
       </ownedAttribute>
       <ownedBehavior xmi:type="uml:StateMachine" xmi:id="_ltVRwCcQEeSlGd4okkPIfw" name="Ponger_SM" isReentrant="false">
-        <region xmi:type="uml:Region" xmi:id="_mjyYoCcQEeSlGd4okkPIfw" name="Region1">
-          <transition xmi:type="uml:Transition" xmi:id="_Cf6sUCcREeSlGd4okkPIfw" name="initial" source="_0s6PcCcQEeSlGd4okkPIfw" target="_1KbR4CcQEeSlGd4okkPIfw">
+        <region xmi:id="_mjyYoCcQEeSlGd4okkPIfw" name="Region1">
+          <transition xmi:id="_Cf6sUCcREeSlGd4okkPIfw" name="initial" source="_0s6PcCcQEeSlGd4okkPIfw" target="_1KbR4CcQEeSlGd4okkPIfw">
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="__Obm0FYKEeSmi4Fyw18d0w" name="onInit" isAbstract="true">
               <language>C++</language>
-              <body>int limit = 0;
-if( UMLRTMain::getArgCount() > 0 )
-{
-	std::cout &lt;&lt; &quot;parsing arg '&quot; &lt;&lt; UMLRTMain::getArg( 0 ) &lt;&lt; '\'' &lt;&lt; std::endl;
-	limit = atoi( UMLRTMain::getArg( 0 ) );
-}
-
-if( limit &lt;= 0 )
-	limit = 15;
-
-messageLimit = limit;
-
-std::cout &lt;&lt; getName() &lt;&lt; &quot;: initialized with message limit &quot; &lt;&lt; messageLimit &lt;&lt; std::endl;</body>
+              <body>    int limit = 0;
+    if( UMLRTMain::getArgCount() > 0 )
+    {
+    std::cout &lt;&lt; &quot;parsing arg '&quot; &lt;&lt; UMLRTMain::getArg( 0 ) &lt;&lt; '\'' &lt;&lt; std::endl;
+    limit = atoi( UMLRTMain::getArg( 0 ) );
+    }
+    if( limit &lt;= 0 )
+    limit = 15;
+    messageLimit = limit;
+    std::cout &lt;&lt; getName() &lt;&lt; &quot;: initialized with message limit &quot; &lt;&lt; messageLimit &lt;&lt; std::endl;
+</body>
             </effect>
           </transition>
-          <transition xmi:type="uml:Transition" xmi:id="_DEnU0CcREeSlGd4okkPIfw" name="onPing" source="_1KbR4CcQEeSlGd4okkPIfw" target="_1KbR4CcQEeSlGd4okkPIfw">
-            <ownedRule xmi:type="uml:Constraint" xmi:id="_owLJsFYNEeSmi4Fyw18d0w" name="true">
+          <transition xmi:id="_DEnU0CcREeSlGd4okkPIfw" name="onPing" source="_1KbR4CcQEeSlGd4okkPIfw" target="_1KbR4CcQEeSlGd4okkPIfw">
+            <ownedRule xmi:id="_owLJsFYNEeSmi4Fyw18d0w" name="true">
               <specification xmi:type="uml:LiteralBoolean" xmi:id="_owLJsVYNEeSmi4Fyw18d0w" value="true"/>
             </ownedRule>
             <effect xmi:type="uml:OpaqueBehavior" xmi:id="_szp-wCcREeSlGd4okkPIfw" name="onPing" isAbstract="true">
               <language>C++</language>
-              <body>if(* rtdata &lt; messageLimit )&#xD;
-{&#xD;
-	std::cout &lt;&lt; getName() &lt;&lt; &quot;: ping( &quot; &lt;&lt; * rtdata &lt;&lt; &quot; ) received, sending Pong&quot; &lt;&lt; std::endl;&#xD;
-	PongPort.pong( * rtdata ).send(); &#xD;
-}&#xD;
-else&#xD;
-{&#xD;
-	std::cout &lt;&lt; getName() &lt;&lt; &quot;: ping( &quot; &lt;&lt; * rtdata &lt;&lt; &quot; ) received, done&quot; &lt;&lt; std::endl;&#xD;
-	exit( 0 );&#xD;
-}</body>
+              <body>    if(* rtdata &lt; messageLimit )
+    {
+    std::cout &lt;&lt; getName() &lt;&lt; &quot;: ping( &quot; &lt;&lt; * rtdata &lt;&lt; &quot; ) received, sending Pong&quot; &lt;&lt; std::endl;
+    PongPort.pong( * rtdata ).send(); 
+    }
+    else
+    {
+    std::cout &lt;&lt; getName() &lt;&lt; &quot;: ping( &quot; &lt;&lt; * rtdata &lt;&lt; &quot; ) received, done&quot; &lt;&lt; std::endl;
+    exit( 0 );
+    }
+</body>
             </effect>
-            <trigger xmi:type="uml:Trigger" xmi:id="_mEy6ECcREeSlGd4okkPIfw" name="" event="_yIlgcCS-EeS0XNKzoL660g" port="_aXdiUCbnEeSBQ4h-CZj2Uw"/>
+            <trigger xmi:id="_mEy6ECcREeSlGd4okkPIfw" name="" event="_yIlgcCS-EeS0XNKzoL660g" port="_aXdiUCbnEeSBQ4h-CZj2Uw"/>
           </transition>
           <subvertex xmi:type="uml:Pseudostate" xmi:id="_0s6PcCcQEeSlGd4okkPIfw" name="Initial"/>
           <subvertex xmi:type="uml:State" xmi:id="_1KbR4CcQEeSlGd4okkPIfw" name="Running"/>
@@ -120,13 +120,13 @@
       </ownedBehavior>
     </packagedElement>
     <packagedElement xmi:type="uml:Association" xmi:id="_AkpWoCSZEeS0XNKzoL660g" name="A_top_pinger_1" visibility="protected" memberEnd="_AkpWoSSZEeS0XNKzoL660g _AkoIgCSZEeS0XNKzoL660g">
-      <ownedEnd xmi:type="uml:Property" xmi:id="_AkpWoSSZEeS0XNKzoL660g" name="top" type="_97ZrMCSSEeS0XNKzoL660g" association="_AkpWoCSZEeS0XNKzoL660g">
+      <ownedEnd xmi:id="_AkpWoSSZEeS0XNKzoL660g" name="top" type="_97ZrMCSSEeS0XNKzoL660g" association="_AkpWoCSZEeS0XNKzoL660g">
         <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AkpWoiSZEeS0XNKzoL660g" value="1"/>
         <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AkpWoySZEeS0XNKzoL660g" value="1"/>
       </ownedEnd>
     </packagedElement>
     <packagedElement xmi:type="uml:Association" xmi:id="_CRjH4CSaEeS0XNKzoL660g" name="A_top_ponger_1" visibility="protected" memberEnd="_CRjH4SSaEeS0XNKzoL660g _CRig0CSaEeS0XNKzoL660g">
-      <ownedEnd xmi:type="uml:Property" xmi:id="_CRjH4SSaEeS0XNKzoL660g" name="top" type="_97ZrMCSSEeS0XNKzoL660g" association="_CRjH4CSaEeS0XNKzoL660g">
+      <ownedEnd xmi:id="_CRjH4SSaEeS0XNKzoL660g" name="top" type="_97ZrMCSSEeS0XNKzoL660g" association="_CRjH4CSaEeS0XNKzoL660g">
         <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_CRjH4iSaEeS0XNKzoL660g" value="1"/>
         <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_CRjH4ySaEeS0XNKzoL660g" value="1"/>
       </ownedEnd>
@@ -134,15 +134,15 @@
     <packagedElement xmi:type="uml:Package" xmi:id="_AsGVkCSxEeS0XNKzoL660g" name="PingPongProtocol">
       <packagedElement xmi:type="uml:Collaboration" xmi:id="_bEbXYCS1EeS0XNKzoL660g" name="PingPongProtocol"/>
       <packagedElement xmi:type="uml:Interface" xmi:id="_P5bzsCS3EeS0XNKzoL660g" name="PingPongProtocol">
-        <ownedOperation xmi:type="uml:Operation" xmi:id="_wRxiECS5EeS0XNKzoL660g" name="pong">
-          <ownedParameter xmi:type="uml:Parameter" xmi:id="_eCUpsNRuEeSDr9Y6ukJekA" name="param">
+        <ownedOperation xmi:id="_wRxiECS5EeS0XNKzoL660g" name="pong">
+          <ownedParameter xmi:id="_eCUpsNRuEeSDr9Y6ukJekA" name="param">
             <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
           </ownedParameter>
         </ownedOperation>
       </packagedElement>
       <packagedElement xmi:type="uml:Interface" xmi:id="_s_Lv8CS5EeS0XNKzoL660g" name="PingPongProtocol~">
-        <ownedOperation xmi:type="uml:Operation" xmi:id="_k7sskCS3EeS0XNKzoL660g" name="ping">
-          <ownedParameter xmi:type="uml:Parameter" xmi:id="_NBLSYFmXEeSDPbT4aJ98QA" name="param">
+        <ownedOperation xmi:id="_k7sskCS3EeS0XNKzoL660g" name="ping">
+          <ownedParameter xmi:id="_NBLSYFmXEeSDPbT4aJ98QA" name="param">
             <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
           </ownedParameter>
         </ownedOperation>
@@ -158,30 +158,30 @@
     </packagedElement>
     <packagedElement xmi:type="uml:Usage" xmi:id="_yt4-MCTEEeS0XNKzoL660g" name="Ponger uses PingPong Protocol" client="_BMMGgCSTEeS0XNKzoL660g" supplier="_bEbXYCS1EeS0XNKzoL660g"/>
     <packagedElement xmi:type="uml:Usage" xmi:id="_zQ-dICTEEeS0XNKzoL660g" name="Pinger uses PingPong Protocol" client="__EW3UCSSEeS0XNKzoL660g" supplier="_bEbXYCS1EeS0XNKzoL660g"/>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_ubQ9AFSIEeSJBo_pyoMAEg">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uc2RYFSIEeSJBo_pyoMAEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+    <profileApplication xmi:id="_ubQ9AFSIEeSJBo_pyoMAEg">
+      <eAnnotations xmi:id="_uc2RYFSIEeSJBo_pyoMAEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+      <appliedProfile href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
     </profileApplication>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_uc7J4FSIEeSJBo_pyoMAEg">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ufYoAFSIEeSJBo_pyoMAEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+    <profileApplication xmi:id="_uc7J4FSIEeSJBo_pyoMAEg">
+      <eAnnotations xmi:id="_ufYoAFSIEeSJBo_pyoMAEg" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/statemachine#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/UMLRealTimeSM-addendum.profile.uml#_KLcn0FDtEeOA4ecmvfqvaw"/>
+      <appliedProfile href="pathmap://UML_RT_PROFILE/UMLRealTimeSM-addendum.profile.uml#_KLcn0FDtEeOA4ecmvfqvaw"/>
     </profileApplication>
-    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_oodZUDbDEeWk0IgRaQ1GWg">
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5R0zMJ9ZEeWpBO8Vu59Fyg" source="PapyrusVersion">
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5R0zMZ9ZEeWpBO8Vu59Fyg" key="Version" value="0.0.11"/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5R0zMp9ZEeWpBO8Vu59Fyg" key="Comment" value=""/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5R0zM59ZEeWpBO8Vu59Fyg" key="Copyright" value=""/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5R0zNJ9ZEeWpBO8Vu59Fyg" key="Date" value="2015-12-10"/>
-        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_5R0zNZ9ZEeWpBO8Vu59Fyg" key="Author" value=""/>
+    <profileApplication xmi:id="_oodZUDbDEeWk0IgRaQ1GWg">
+      <eAnnotations xmi:id="_5R0zMJ9ZEeWpBO8Vu59Fyg" source="PapyrusVersion">
+        <details xmi:id="_5R0zMZ9ZEeWpBO8Vu59Fyg" key="Version" value="0.0.11"/>
+        <details xmi:id="_5R0zMp9ZEeWpBO8Vu59Fyg" key="Comment" value=""/>
+        <details xmi:id="_5R0zM59ZEeWpBO8Vu59Fyg" key="Copyright" value=""/>
+        <details xmi:id="_5R0zNJ9ZEeWpBO8Vu59Fyg" key="Date" value="2015-12-10"/>
+        <details xmi:id="_5R0zNZ9ZEeWpBO8Vu59Fyg" key="Author" value=""/>
       </eAnnotations>
-      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_oohqwDbDEeWk0IgRaQ1GWg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+      <eAnnotations xmi:id="_oohqwDbDEeWk0IgRaQ1GWg" source="http://www.eclipse.org/uml2/2.0.0/UML">
         <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
       </eAnnotations>
-      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+      <appliedProfile href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
     </profileApplication>
   </uml:Model>
   <UMLRealTime:Capsule xmi:id="_xRIW4FSIEeSJBo_pyoMAEg" base_Class="__EW3UCSSEeS0XNKzoL660g"/>
diff --git a/models/tests/PingPong/expected_src/CMakeLists.txt b/models/tests/PingPong/expected_src/CMakeLists.txt
index 25373ad..afbb7fc 100644
--- a/models/tests/PingPong/expected_src/CMakeLists.txt
+++ b/models/tests/PingPong/expected_src/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Generated
+# Generated 2016-07-20 11:17:11
 
 cmake_minimum_required(VERSION 2.8.7)
 set(TARGET TopMain)
diff --git a/models/tests/PingPong/expected_src/Pinger.cc b/models/tests/PingPong/expected_src/Pinger.cc
index 105917c..46533ed 100644
--- a/models/tests/PingPong/expected_src/Pinger.cc
+++ b/models/tests/PingPong/expected_src/Pinger.cc
@@ -87,54 +87,42 @@
 
 void Capsule_Pinger::entryaction_____PingPong__Pinger__Pinger_SM__Region1__Running__onEntry( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#_HUocgClWEeSG6Mdl9j2DSg */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Pinger::Running entry  */
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Pinger::transitionaction_____PingPong__Pinger__Pinger_SM__Region1__initial__onInit( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#_GPufUFYLEeSmi4Fyw18d0w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Pinger transition Initial,Running */
     std::cout << getName() << ": timer started" << std::endl;
     timerPort.informIn( UMLRTTimespec( 1, 0 ) );
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Pinger::transitionaction_____PingPong__Pinger__Pinger_SM__Region1__onPong__onPong( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#_XTukYCcPEeSlGd4okkPIfw */
     #define umlrtparam_param ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Pinger transition Running,Running,pong:PingPort */
     std::cout << getName() << ": pong( " << * rtdata << " ) received, sending ping" << std::endl;
     PingPort.ping( * rtdata + 1 ).send(); 
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_param
-    // generated code ends
 }
 
 void Capsule_Pinger::transitionaction_____PingPong__Pinger__Pinger_SM__Region1__onTimeout__onTimeout( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#__I0kEGxxEeSWy5Y1YWzXfQ */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Pinger transition Running,Running,timeout:timerPort */
     std::cout << getName() << ": timeout, sending ping( 0 )" << std::endl;
     PingPort.ping( 0 ).send();
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Pinger::actionchain_____action_____PingPong__Pinger__Pinger_SM__Region1__initial( const UMLRTMessage * msg )
diff --git a/models/tests/PingPong/expected_src/Ponger.cc b/models/tests/PingPong/expected_src/Ponger.cc
index 81ea656..89e1954 100644
--- a/models/tests/PingPong/expected_src/Ponger.cc
+++ b/models/tests/PingPong/expected_src/Ponger.cc
@@ -78,10 +78,8 @@
 
 void Capsule_Ponger::transitionaction_____PingPong__Ponger__Ponger_SM__Region1__initial__onInit( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#__Obm0FYKEeSmi4Fyw18d0w */
     #define rtdata ( (void *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Ponger transition Initial,Running */
     int limit = 0;
     if( UMLRTMain::getArgCount() > 0 )
     {
@@ -92,18 +90,15 @@
     limit = 15;
     messageLimit = limit;
     std::cout << getName() << ": initialized with message limit " << messageLimit << std::endl;
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
-    // generated code ends
 }
 
 void Capsule_Ponger::transitionaction_____PingPong__Ponger__Ponger_SM__Region1__onPing__onPing( const UMLRTMessage * msg )
 {
-    // the following code has been generated
-    /* UMLRT-CODEGEN:platform:/resource/PingPong/PingPong.uml#_szp-wCcREeSlGd4okkPIfw */
     #define umlrtparam_param ( *(int *)msg->getParam( 0 ) )
     #define rtdata ( (int *)msg->getParam( 0 ) )
-    // generated code ends
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Ponger transition Running,Running,ping:PongPort */
     if(* rtdata < messageLimit )
     {
     std::cout << getName() << ": ping( " << * rtdata << " ) received, sending Pong" << std::endl;
@@ -114,10 +109,9 @@
     std::cout << getName() << ": ping( " << * rtdata << " ) received, done" << std::endl;
     exit( 0 );
     }
-    // the following code has been generated
+    /* UMLRTGEN-USERREGION-END */
     #undef rtdata
     #undef umlrtparam_param
-    // generated code ends
 }
 
 void Capsule_Ponger::actionchain_____action_____PingPong__Ponger__Ponger_SM__Region1__initial( const UMLRTMessage * msg )
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.capopaquebehaviour/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.rts/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/.classpath
index 3906c3b..13a6c65 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/.classpath
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" path="xtend-gen"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="xtend-gen"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/ActionDeclarationGenerator.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/ActionDeclarationGenerator.xtend
index f6ce06c..aab99f8 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/ActionDeclarationGenerator.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/ActionDeclarationGenerator.xtend
@@ -1,71 +1,65 @@
 /*******************************************************************************
-* Copyright (c) 2014-2015 Zeligsoft (2009) Limited  and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*******************************************************************************/
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited  and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
 
 package org.eclipse.papyrusrt.codegen.cpp.statemachines.flat
 
-import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.papyrusrt.codegen.UserEditableRegion
 import org.eclipse.papyrusrt.codegen.cpp.SerializationManager
 import org.eclipse.papyrusrt.codegen.lang.cpp.Type
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.MemberFunction
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.Parameter
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.PrimitiveType
-import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.Comment
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.UserCode
+import org.eclipse.papyrusrt.codegen.statemachines.transformations.FlatteningTransformer
 import org.eclipse.papyrusrt.codegen.utils.GlobalConstants
-import org.eclipse.papyrusrt.codegen.utils.CodeGenUtils
-import org.eclipse.papyrusrt.xtumlrt.trans.from.uml.UML2xtumlrtTranslator
 import org.eclipse.papyrusrt.xtumlrt.common.ActionCode
+import org.eclipse.papyrusrt.xtumlrt.common.Entity
 import org.eclipse.papyrusrt.xtumlrt.statemachext.SaveHistory
+import org.eclipse.papyrusrt.xtumlrt.trans.from.uml.UML2xtumlrtTranslator
 import org.eclipse.xtend.lib.annotations.Data
 
 import static extension org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.CppNamesUtil.*
+import static extension org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.UserCodeTagUtil.*
 
 /**
  * This visitor generates function declarations for actions in the state machine.
- *
+ * 
  * @author Ernesto Posse
  */
-class ActionDeclarationGenerator
-{
+class ActionDeclarationGenerator {
 
-    static class Context {}
+	static class Context {
+	}
 
-    @Data static class UserActionContext extends Context
-    {
-        Type rtmessageType
-        SerializationManager.ParameterSet params
-        UML2xtumlrtTranslator translator
-    }
+	@Data static class UserActionContext extends Context {
+		Type rtmessageType
+		SerializationManager.ParameterSet params
+		UML2xtumlrtTranslator translator
+		FlatteningTransformer flattener		
+		Entity capsuleContext
+	}
 
-    def dispatch visit( SaveHistory action, Context ctx )
-    {
-        //... only one needs to be generated... better in the transformer class
-    }
+	def dispatch visit(SaveHistory action, Context ctx) {
+		// ... only one needs to be generated... better in the transformer class
+	}
 
-    def dispatch
-    create
+	def dispatch create
         func: new MemberFunction( PrimitiveType.VOID, action.funcName.toString )
-    visit( ActionCode action, Context ctx )
-    {
-        val type = (ctx as UserActionContext).rtmessageType
-        val translator = (ctx as UserActionContext).translator
-        val param = new Parameter( type, GlobalConstants.ACTION_FUNC_PARAM )
-        val body = new UserCode( action.source, 0 )
+    visit(ActionCode action, Context ctx) {
+		val type = (ctx as UserActionContext).rtmessageType
+		val param = new Parameter(type, GlobalConstants.ACTION_FUNC_PARAM)
+		val body = new UserCode(action.source, 0)
+		func.add(param)
 
-        func.add( param )
-        val src = translator.getSource( action )
-        if (src !== null)
-        {
-            val uri = EcoreUtil.getURI( src )
-            func.add( new Comment( true, CodeGenUtils.GENERATED_START ) )
-            func.add( new Comment( false, "UMLRT-CODEGEN:" + uri.toString ) )
-        }
-        SerializationManager.getInstance().generateUserCode( func, param, (ctx as UserActionContext).params, body )
-    }
-
-}
\ No newline at end of file
+		val translator = (ctx as UserActionContext).translator
+		val capsuleContext = (ctx as UserActionContext).capsuleContext
+		val flattener = (ctx as UserActionContext).flattener
+		SerializationManager.getInstance().generateUserCode(func, param, (ctx as UserActionContext).params, body,
+			UserEditableRegion.userEditBegin(action.generateLabel(translator, flattener, capsuleContext)))
+	}
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/FlatModel2Cpp.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/FlatModel2Cpp.xtend
index 38c537a..a6baeed 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/FlatModel2Cpp.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/FlatModel2Cpp.xtend
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2014-2015 Zeligsoft (2009) Limited  and others.
+* Copyright (c) 2014-2016 Zeligsoft (2009) Limited  and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
 import java.util.Arrays
 import java.util.Collection
 import java.util.HashSet
+import java.util.LinkedHashMap
 import java.util.LinkedHashSet
 import java.util.Map
 import org.eclipse.papyrusrt.codegen.CodeGenPlugin
@@ -53,12 +54,12 @@
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.SwitchStatement
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.VariableDeclarationStatement
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.WhileStatement
-import org.eclipse.papyrusrt.codegen.utils.GlobalConstants
 import org.eclipse.papyrusrt.codegen.statemachines.transformations.FlatteningTransformer
 import org.eclipse.papyrusrt.codegen.statemachines.transformations.InPlaceTransformation
 import org.eclipse.papyrusrt.codegen.statemachines.transformations.StateNestingFlattener
 import org.eclipse.papyrusrt.codegen.statemachines.transformations.TransformationContext
 import org.eclipse.papyrusrt.codegen.statemachines.transformations.TransitionDepthComparator
+import org.eclipse.papyrusrt.codegen.utils.GlobalConstants
 import org.eclipse.papyrusrt.xtumlrt.common.AbstractAction
 import org.eclipse.papyrusrt.xtumlrt.common.ActionCode
 import org.eclipse.papyrusrt.xtumlrt.common.ActionReference
@@ -84,7 +85,7 @@
 import static extension org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames.*
 import static extension org.eclipse.papyrusrt.xtumlrt.util.XTUMLRTSMVirtualInheritanceExtensions.*
 import static extension org.eclipse.papyrusrt.xtumlrt.util.XTUMLRTStateMachineUtil.*
-import java.util.LinkedHashMap
+import org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.GuardDeclarationGenerator.UserGuardContext
 
 /**
  * This class contains the transformation from flat UML-RT state machines to the
@@ -145,8 +146,8 @@
 
     /** Objects used for the generation */
     val actionDeclarationGenerator = new ActionDeclarationGenerator
+    val guardDeclarationGenerator = new GuardDeclarationGenerator
     val actionInvocationGenerator  = new ActionInvocationGenerator
-    val guardDeclarationGenerator  = new GuardDeclarationGenerator
     val guardInvocationGenerator   = new GuardInvocationGenerator
 
     Map<State, String> stateNames
@@ -588,7 +589,9 @@
             (
                 RTMessageType,
                 getTriggerParams( t ),
-                cpp.translator?.stateMachineTranslator
+                cpp.translator?.stateMachineTranslator,
+                flattener,
+                capsuleContext
             )
             as ActionDeclarationGenerator.Context
         val f = actionDeclarationGenerator.visit( a, ctx )
@@ -632,25 +635,27 @@
         // guardDeclarationGenerator.visit( g, null )
     }
 
-    protected def dispatch generateGuardFunc( Guard g, Transition t )
+	protected def dispatch generateGuardFunc( Guard g, Transition t )
     {
         if (g.body !== null && !(g.body instanceof CheckHistory))
         {
             var sourceTransition = getTransitionChainUniqueSource( t )
             sourceTransition = if (sourceTransition === null) t else sourceTransition
-            val ctxt =
-                new GuardDeclarationGenerator.UserGuardContext
-                (
-                    RTMessageType,
-                    getTriggerParams( sourceTransition )
-                )
-                as GuardDeclarationGenerator.Context
-            val f = guardDeclarationGenerator.visit( g, ctxt )
+        	val ctx =
+	            new GuardDeclarationGenerator.UserGuardContext
+	            (
+	                RTMessageType,
+	                getTriggerParams( sourceTransition ),
+	                cpp.translator?.stateMachineTranslator,
+	                flattener,
+	                capsuleContext
+	            )
+	            as GuardDeclarationGenerator.Context
+            val f = guardDeclarationGenerator.visit( g, ctx )
             userGuardFunctions.put( g, f )
         }
     }
 
-
     /**
      * Generate function declarations for transition action chains.
      *
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/GuardDeclarationGenerator.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/GuardDeclarationGenerator.xtend
index a7c5e10..b348ffe 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/GuardDeclarationGenerator.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/GuardDeclarationGenerator.xtend
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2014-2015 Zeligsoft (2009) Limited  and others.
+* Copyright (c) 2014-2016 Zeligsoft (2009) Limited  and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
@@ -15,14 +15,19 @@
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.Parameter
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.PrimitiveType
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.UserCode
+import org.eclipse.papyrusrt.codegen.statemachines.transformations.FlatteningTransformer
 import org.eclipse.papyrusrt.codegen.utils.GlobalConstants
 import org.eclipse.papyrusrt.xtumlrt.common.ActionCode
 import org.eclipse.papyrusrt.xtumlrt.common.ActionReference
+import org.eclipse.papyrusrt.xtumlrt.common.Entity
 import org.eclipse.papyrusrt.xtumlrt.statemach.Guard
+import org.eclipse.papyrusrt.xtumlrt.trans.from.uml.UML2xtumlrtTranslator
 import org.eclipse.xtend.lib.annotations.Data
 
 import static extension org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.CppNamesUtil.*
 import static extension org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames.*
+import static extension org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.UserCodeTagUtil.*
+import org.eclipse.papyrusrt.codegen.UserEditableRegion
 
 /**
  * This visitor generates function declarations for guards in the state machine.
@@ -38,8 +43,11 @@
 
     @Data static class UserGuardContext extends Context
     {
-        Type rtmessageType
-        SerializationManager.ParameterSet params
+		Type rtmessageType
+		SerializationManager.ParameterSet params
+		UML2xtumlrtTranslator translator
+		FlatteningTransformer flattener		
+		Entity capsuleContext
     }
 
     def dispatch
@@ -49,9 +57,15 @@
         val type = (ctx as UserGuardContext).rtmessageType
         val param = new Parameter( type, GlobalConstants.ACTION_FUNC_PARAM )
         val body = new UserCode( getGuardBody( guard ) )
-
+		val action = guard.body as ActionCode
+		
+		val translator = (ctx as UserGuardContext).translator
+		val capsuleContext = (ctx as UserGuardContext).capsuleContext
+		val flattener = (ctx as UserGuardContext).flattener
+		
         func.add( param )
-        SerializationManager.getInstance().generateUserCode( func, param, (ctx as UserGuardContext).params, body )
+		SerializationManager.getInstance().generateUserCode(func, param, (ctx as UserGuardContext).params, body,
+			UserEditableRegion.userEditBegin(action.generateLabel(translator, flattener, capsuleContext)))        
     }
 
     def getGuardBody( Guard guard )
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/UserCodeTagUtil.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/UserCodeTagUtil.xtend
new file mode 100644
index 0000000..8a1c70d
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.statemachines.flat/src/org/eclipse/papyrusrt/codegen/cpp/statemachines/flat/UserCodeTagUtil.xtend
@@ -0,0 +1,144 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited  and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.papyrusrt.codegen.cpp.statemachines.flat
+
+import java.util.ArrayList
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.papyrusrt.codegen.CodeGenPlugin
+import org.eclipse.papyrusrt.codegen.UserEditableRegion
+import org.eclipse.papyrusrt.codegen.UserEditableRegion.Label
+import org.eclipse.papyrusrt.codegen.statemachines.transformations.FlatteningTransformer
+import org.eclipse.papyrusrt.xtumlrt.common.ActionCode
+import org.eclipse.papyrusrt.xtumlrt.common.CommonElement
+import org.eclipse.papyrusrt.xtumlrt.common.Entity
+import org.eclipse.papyrusrt.xtumlrt.common.NamedElement
+import org.eclipse.papyrusrt.xtumlrt.statemach.State
+import org.eclipse.papyrusrt.xtumlrt.statemach.Transition
+import org.eclipse.papyrusrt.xtumlrt.statemachext.GuardAction
+import org.eclipse.papyrusrt.xtumlrt.statemachext.TransitionAction
+import org.eclipse.papyrusrt.xtumlrt.trans.from.uml.UML2xtumlrtTranslator
+import org.eclipse.papyrusrt.xtumlrt.umlrt.RTTrigger
+import org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames
+
+/**
+ * Utility class for generating user editable region tag.
+ * 
+ * @author Young-Soo Roh
+ */
+class UserCodeTagUtil {
+
+	/**
+	 * Get information required to calculate user edit region tag
+	 */
+	static def Label generateLabel(ActionCode context, UML2xtumlrtTranslator translator, FlatteningTransformer flattener, Entity capsuleOrClass) {
+		val label = new Label
+		if (capsuleOrClass.eResource != null) {
+			label.uri = capsuleOrClass.eResource.URI.toString
+		} else {
+			var src = translator.getSource(context)
+			if(src == null){
+				src = translator.getSource(context.eContainer as CommonElement)
+			}
+			if (src !== null){
+				label.uri = src.eResource.URI.toString
+			}
+		}
+		val originalOwner = flattener.getOriginalOwner(context as CommonElement)
+		label.qualifiedName = originalOwner.getQualifiedName(capsuleOrClass)
+		label.type = context.eClass.name.replace("Action", "").toLowerCase
+		label.details = ""
+		if(context instanceof TransitionAction || context instanceof GuardAction){
+			label.details = context.eContainer.getTransitionDetails(flattener)
+		}
+		return label
+	}
+
+	/**
+	 * Get details for identifying transition or guard since they require more informaiton
+	 * in order to distinguish among other elements.
+	 */
+	static def String getTransitionDetails(EObject object, FlatteningTransformer flattener) {
+			var container = object
+			while (container != null) {
+				if (container instanceof Transition) {
+					var CommonElement source = container.sourceVertex
+					if(flattener.isNewElement(source)){
+						source = flattener.getOriginalOwner(source)
+					}else{
+						source = flattener.getOriginalElement(source)
+					}
+					if(source == null){
+						CodeGenPlugin.debug("source is null : " + (source as NamedElement).name)
+					}
+					var CommonElement target = container.targetVertex
+					if(flattener.isNewElement(target)){
+						target = flattener.getOriginalOwner(target)
+					}else{
+						target = flattener.getOriginalElement(target)
+					}	
+					if(target == null){
+						CodeGenPlugin.debug("target is null : " + (target as NamedElement).name)
+					}
+					if(target != null && source != null){
+						var sourceQname = QualifiedNames.cachedFullSMName(source as NamedElement).removeTopCompositeState
+						var targetQname = QualifiedNames.cachedFullSMName(target as NamedElement).removeTopCompositeState
+						var details = new UserEditableRegion.TransitionDetails(sourceQname, targetQname)
+						for (t : container.triggers) {
+							val ports = new ArrayList
+							for (p : (t as RTTrigger).ports) {
+								ports.add(p.name)
+							}
+							details.addTriggerDetail((t as RTTrigger).signal.name, ports)
+						}
+						return details.tagString
+					}else{
+						CodeGenPlugin.error("Source vertex and target vertex should not be null")
+						return ""
+					}
+				}
+				container = container.eContainer
+		}
+		""
+	}
+
+	/**
+	 * Remove dummy top level composite from qualified name 
+	 */
+	static def String removeTopCompositeState(String smqname) {
+		
+		val index = smqname.indexOf(QualifiedNames.SEPARATOR)
+		if (index != -1) {
+			return smqname.substring(index + 2);
+		}
+		return smqname;
+	}
+
+	/** 
+	 * Calculate qualified name for object's container in the context of UMLRT codegen
+	 */
+	static def String getQualifiedName(EObject eobject, EObject capsule) {
+		var EObject container = eobject
+		while (container != null) {
+			if (container instanceof State) {
+				val smqname = QualifiedNames.cachedFullSMName(container as NamedElement)
+				val capsuleqname = QualifiedNames.cachedFullName(capsule as NamedElement)
+				val index = smqname.indexOf(QualifiedNames.SEPARATOR)
+				if (index != -1 && index != smqname.length - 1) {
+					return capsuleqname + QualifiedNames.SEPARATOR + smqname.substring(index + 2)
+				}
+				return capsuleqname
+			}
+
+			container = container.eContainer
+		}
+
+		""
+	}
+
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.classpath
index 325150d..428337e 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp.structure/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.classpath
index 325150d..428337e 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppProjectGenerator.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppProjectGenerator.xtend
index 671a4cb..aea34eb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppProjectGenerator.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/CppProjectGenerator.xtend
@@ -64,6 +64,11 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
+			<name>org.eclipse.papyrusrt.codegen.umlrtgensrcbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>	
+		<buildCommand>
 			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
 			<triggers>clean,full,incremental,</triggers>
 			<arguments>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/SerializationManager.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/SerializationManager.java
index 6727d66..695b78d 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/SerializationManager.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/SerializationManager.java
@@ -12,6 +12,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.papyrusrt.codegen.UserEditableRegion;
 import org.eclipse.papyrusrt.codegen.cpp.rts.UMLRTRuntime;
 import org.eclipse.papyrusrt.codegen.lang.cpp.Expression;
 import org.eclipse.papyrusrt.codegen.lang.cpp.Type;
@@ -69,19 +70,22 @@
 	 *            - The {@link ParameterSet} of signal parameters.
 	 * @param userCode
 	 *            - The actual {@link UserCode} to be inserted.
+	 * @param userRegionIdentifier
+	 *            - User region identifier
 	 */
-	public void generateUserCode(AbstractFunction func, Parameter msg, ParameterSet params, UserCode userCode) {
+	public void generateUserCode(AbstractFunction func, Parameter msg, ParameterSet params, UserCode userCode, String userRegionIdentifier) {
 		List<Macro> paramMacros = params.generateDefinitions(func, msg);
 
-		func.add(new Comment(true, CodeGenUtils.GENERATED_END));
+		func.add(new Comment(false, userRegionIdentifier));
+
 		func.add(userCode);
-		func.add(new Comment(true, CodeGenUtils.GENERATED_START));
+
+		func.add(new Comment(false, UserEditableRegion.userEditEnd()));
+
 		// Generate the #undefs in the reverse of the definition order.
 		for (int i = paramMacros.size() - 1; i >= 0; --i) {
 			func.add(new UndefDirective(paramMacros.get(i)));
 		}
-		func.add(new Comment(true, CodeGenUtils.GENERATED_END));
-
 	}
 
 	/**
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/BasicClassGenerator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/BasicClassGenerator.java
index b316e2e..dca7785 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/BasicClassGenerator.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.cpp/src/org/eclipse/papyrusrt/codegen/cpp/internal/BasicClassGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2014-2015 Zeligsoft (2009) Limited and others.
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,8 +12,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
 import org.eclipse.papyrusrt.codegen.CodeGenPlugin;
+import org.eclipse.papyrusrt.codegen.UserEditableRegion;
 import org.eclipse.papyrusrt.codegen.cpp.AbstractElementGenerator;
 import org.eclipse.papyrusrt.codegen.cpp.CppCodePattern;
 import org.eclipse.papyrusrt.codegen.cpp.CppCodePattern.Output;
@@ -32,6 +33,7 @@
 import org.eclipse.papyrusrt.codegen.lang.cpp.Expression;
 import org.eclipse.papyrusrt.codegen.lang.cpp.Type;
 import org.eclipse.papyrusrt.codegen.lang.cpp.dep.Dependency;
+import org.eclipse.papyrusrt.codegen.lang.cpp.dep.Dependency.Kind;
 import org.eclipse.papyrusrt.codegen.lang.cpp.dep.ElementDependency;
 import org.eclipse.papyrusrt.codegen.lang.cpp.dep.TypeDependency;
 import org.eclipse.papyrusrt.codegen.lang.cpp.element.AbstractFunction;
@@ -74,12 +76,13 @@
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.ForStatement;
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.ReturnStatement;
 import org.eclipse.papyrusrt.codegen.lang.cpp.stmt.UserCode;
-import org.eclipse.papyrusrt.codegen.utils.CodeGenUtils;
 import org.eclipse.papyrusrt.xtumlrt.common.AbstractAction;
 import org.eclipse.papyrusrt.xtumlrt.common.ActionCode;
 import org.eclipse.papyrusrt.xtumlrt.common.Attribute;
 import org.eclipse.papyrusrt.xtumlrt.common.CommonPackage;
+import org.eclipse.papyrusrt.xtumlrt.common.Entity;
 import org.eclipse.papyrusrt.xtumlrt.common.Generalization;
+import org.eclipse.papyrusrt.xtumlrt.common.Model;
 import org.eclipse.papyrusrt.xtumlrt.common.NamedElement;
 import org.eclipse.papyrusrt.xtumlrt.common.Operation;
 import org.eclipse.papyrusrt.xtumlrt.common.StructuredType;
@@ -475,20 +478,38 @@
 		AbstractAction act = operation.getBody();
 		ActionCode code = act instanceof ActionCode ? (ActionCode) act : null;
 		if (code != null) {
+			List<String> qNames = new ArrayList<>();
+			EObject container = operation.eContainer();
+			while (container != null) {
+				if (container instanceof Entity || container instanceof Package || container instanceof Model) {
+					qNames.add(0, ((NamedElement) container).getName());
+				}
+				container = container.eContainer();
+			}
+			UserEditableRegion.Label label = new UserEditableRegion.Label();
+			label.setQualifiedName(String.join("::", qNames));
+			label.setType(operation.eClass().getName().toLowerCase());
+			label.setDetails(operation.getName());
 			org.eclipse.uml2.uml.Element srcElement = cpp.getTranslator().getSource(operation);
+			if (srcElement != null) {
+				label.setUri(srcElement.eResource().getURI().toString());
+			} else {
+				label.setUri(operation.eResource().getURI().toString());
+			}
 			StringBuilder result = new StringBuilder();
-			result.append("// " + CodeGenUtils.GENERATED_START + "\n");
-			result.append("/* UMLRT-CODEGEN:" + EcoreUtil.getURI(srcElement).toString() + " */\n");
-			result.append("// " + CodeGenUtils.GENERATED_END + "\n");
+			result.append(UserEditableRegion.COMMENT_START_STRING + UserEditableRegion.userEditBegin(label) + UserEditableRegion.COMMENT_END_STRING).append(System.lineSeparator());
+
 			String source = code.getSource();
 			if (!UMLUtil.isEmpty(source)) {
 				result.append(source);
 			}
+			result.append(UserEditableRegion.COMMENT_START_STRING + UserEditableRegion.userEditEnd() + UserEditableRegion.COMMENT_END_STRING).append(System.lineSeparator());
 
 			function.add(new UserCode(result.toString()));
 		}
 	}
 
+
 	/**
 	 * Generate the attributes of the class.
 	 * 
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.settings/org.eclipse.jdt.core.prefs
index 48480e5..72db30e 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang.cpp/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -97,7 +97,7 @@
 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.lang/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/META-INF/MANIFEST.MF b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/META-INF/MANIFEST.MF
index 7aa40f7..a22f08a 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/META-INF/MANIFEST.MF
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/META-INF/MANIFEST.MF
@@ -27,11 +27,9 @@
  org.eclipse.papyrusrt.xtumlrt.common.model,
  org.eclipse.ui,
  org.eclipse.xtext.xbase.lib;bundle-version="2.9.0",
- org.eclipse.papyrus.designer.languages.common.extensionpoints;bundle-version="1.0.1",
- org.eclipse.papyrus.designer.languages.cpp.cdt.texteditor;bundle-version="1.0.1",
- org.eclipse.papyrus.designer.languages.common.profile;bundle-version="1.0.1",
  org.eclipse.papyrusrt.xtumlrt.util;bundle-version="0.7.2",
- org.eclipse.papyrusrt.xtumlrt.external;bundle-version="0.7.2"
+ org.eclipse.papyrusrt.xtumlrt.external;bundle-version="0.7.2",
+ org.eclipse.papyrusrt.umlrt.core;bundle-version="0.7.2"
 Export-Package: org.eclipse.papyrusrt.codegen.papyrus
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: org.eclipse.papyrusrt.codegen.papyrus.Activator
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/plugin.xml b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/plugin.xml
index d3a5b04..dfe7bce 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/plugin.xml
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/plugin.xml
@@ -29,6 +29,12 @@
               id="org.eclipse.papyrusrt.codegen.papyrus.generateAsTop"
               name="Generate as Top">
         </command>
+        <command
+              categoryId="org.eclipse.papyrusrt.codegen.papyrus.commands-category"
+              description="Open CDT editor"
+              id="org.eclipse.papyrusrt.codegen.papyrus.editsource"
+              name="Edit Source">
+        </command>
     </extension>
 
     <extension point="org.eclipse.ui.handlers">
@@ -48,6 +54,10 @@
               class="org.eclipse.papyrusrt.codegen.papyrus.handlers.GenerateAsTopActionHandler"
               commandId="org.eclipse.papyrusrt.codegen.papyrus.generateAsTop">
         </handler>
+         <handler
+               class="org.eclipse.papyrusrt.codegen.papyrus.handlers.EditSourceActionHandler"
+               commandId="org.eclipse.papyrusrt.codegen.papyrus.editsource">
+         </handler>
     </extension>
 
     <extension point="org.eclipse.ui.menus">
@@ -58,56 +68,48 @@
                 commandId="org.eclipse.papyrusrt.codegen.papyrus.codegen">
                 <visibleWhen
                       checkEnabled="false">
-                 <test
-                       forcePluginActivation="true"
-                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eobjecttype"
-                       value="Model">
-                 </test>
-                </visibleWhen>
-            </command>
-            <command
-                commandId="org.eclipse.papyrusrt.codegen.papyrus.codegen">
-                <visibleWhen
-                      checkEnabled="false">
-                 <test
-                       forcePluginActivation="true"
-                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eobjecttype"
-                       value="Package">
-                 </test>
+                   <or>
+                      <test
+                            forcePluginActivation="true"
+                            property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eClass"
+                            value="Model">
+                      </test>
+                      <test
+                            forcePluginActivation="true"
+                            property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eClass"
+                            value="Package">
+                      </test>
+                   </or>
                 </visibleWhen>
             </command>
             <command
                   commandId="org.eclipse.papyrusrt.codegen.papyrus.codegen.regen">
                 <visibleWhen
                       checkEnabled="false">
-                 <test
-                       forcePluginActivation="true"
-                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eobjecttype"
-                       value="Model">
-                 </test>
+                   <or>
+                      <test
+                            forcePluginActivation="true"
+                            property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eClass"
+                            value="Model">
+                      </test>
+                      <test
+                            forcePluginActivation="true"
+                            property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eClass"
+                            value="Package">
+                      </test>
+                   </or>
                 </visibleWhen>
             </command> 
             <command
-                  commandId="org.eclipse.papyrusrt.codegen.papyrus.codegen.regen">
-                <visibleWhen
-                      checkEnabled="false">
-                 <test
-                       forcePluginActivation="true"
-                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.eobjecttype"
-                       value="Package">
-                 </test>
-                </visibleWhen>
-            </command>            
-            <command
                   commandId="org.eclipse.papyrusrt.codegen.papyrus.setAsDefaultTop"
                   style="push">
                <visibleWhen
                      checkEnabled="false">
                  <and>
 	                 <test
-	                       forcePluginActivation="true"
-	                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.stereotype"
-	                       value="UMLRealTime::Capsule">
+                        forcePluginActivation="true"
+                        property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.stereotype"
+                        value="UMLRealTime::Capsule">
 	                 </test>
                   <count
                         value="1">
@@ -122,9 +124,9 @@
                      checkEnabled="false">
                  <and>
 	                 <test
-	                       forcePluginActivation="true"
-	                       property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.stereotype"
-	                       value="UMLRealTime::Capsule">
+                        forcePluginActivation="true"
+                        property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.stereotype"
+                        value="UMLRealTime::Capsule">
 	                 </test>
                   <count
                         value="1">
@@ -132,6 +134,18 @@
                  </and>
                </visibleWhen>                  
             </command>
+             <command
+                   commandId="org.eclipse.papyrusrt.codegen.papyrus.editsource"
+                   style="push">
+                <visibleWhen
+                      checkEnabled="false">
+                   <test
+                         forcePluginActivation="true"
+                         property="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.isSourceEditable"
+                         value="true">
+                   </test>
+                </visibleWhen>
+             </command>
         </menuContribution>
     </extension>
     <extension
@@ -160,25 +174,17 @@
           point="org.eclipse.core.expressions.propertyTesters">
        <propertyTester
              class="org.eclipse.papyrusrt.codegen.papyrus.propertytester.UMLRTPropertyTester"
-             id="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.umlrtstereotype"
+             id="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester"
              namespace="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester"
-             properties="stereotype"
+             properties="stereotype, eClass, isSourceEditable"
              type="java.lang.Object">
        </propertyTester>
-       <propertyTester
-             class="org.eclipse.papyrusrt.codegen.papyrus.propertytester.UMLRTPropertyTester"
-             id="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester.umlrtobjecttype"
-             namespace="org.eclipse.papyrusrt.codegen.papyrus.internal.propertytester"
-             properties="eobjecttype"
-             type="java.lang.Object">
-       </propertyTester>       
     </extension>
     <extension
-          point="org.eclipse.papyrus.designer.languages.common.extensionpoints.languageCodegen">
-       <generator
-             class="org.eclipse.papyrusrt.codegen.papyrus.CppLangCodegen"
-             id="C++RT"
-             language="C++">
-       </generator>
+          point="org.eclipse.papyrusrt.codegen.eobjectlocator">
+       <eobjectlocator
+             class="org.eclipse.papyrusrt.codegen.papyrus.cdt.UMLEObjectLocator"
+             id="uml">
+       </eobjectlocator>
     </extension>
 </plugin>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/CppLangCodegen.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/CppLangCodegen.java
deleted file mode 100644
index e43097f..0000000
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/CppLangCodegen.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package org.eclipse.papyrusrt.codegen.papyrus;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.papyrus.designer.languages.common.extensionpoints.ILangCodegen2;
-import org.eclipse.papyrus.designer.languages.common.extensionpoints.MethodInfo;
-import org.eclipse.papyrus.designer.languages.common.extensionpoints.SyncInformation;
-import org.eclipse.papyrusrt.codegen.cpp.statemachines.flat.CppNamesUtil;
-import org.eclipse.papyrusrt.codegen.papyrus.internal.UMLRTCppCodeGen;
-import org.eclipse.papyrusrt.umlrt.profile.statemachine.UMLRealTimeStateMach.RTStateMachine;
-import org.eclipse.uml2.uml.Behavior;
-import org.eclipse.uml2.uml.BehavioralFeature;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.OpaqueBehavior;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.PackageableElement;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.Transition;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-/**
- * C++ language support.
- *
- * @author ysroh
- */
-public class CppLangCodegen implements ILangCodegen2 {
-
-	/** A model element that serves as the context. */
-	private static EObject context;
-
-	/**
-	 * Constructor.
-	 */
-	CppLangCodegen() {
-	}
-
-	@Override
-	public void generateCode(IProject project, PackageableElement element, IProgressMonitor monitor) {
-		context = element;
-		// Generate CPP code
-		List<EObject> targets = new ArrayList<>();
-		targets.add(EcoreUtil.getRootContainer(element));
-		String top = UMLRTCppCodeGen.getTopCapsuleName((Element) EcoreUtil.getRootContainer(element));
-		UMLRTGenerator.INSTANCE.generate(targets, top, true);
-
-	}
-
-	@Override
-	public IProject getTargetProject(PackageableElement pe, boolean createIfMissing) {
-
-		return UMLRTGenerator.INSTANCE.getProject(pe);
-
-	}
-
-	@Override
-	public String getFileName(IProject project, NamedElement element) {
-		String result = null;
-		Class clazz = null;
-		EObject container = element;
-		while (container != null) {
-			if (container instanceof Class) {
-				clazz = (Class) container;
-				break;
-			}
-			container = container.eContainer();
-		}
-		if (clazz != null) {
-			IFolder srcFolder = project.getFolder("src");
-			IFile file = srcFolder.getFile(clazz.getName());
-			result = file.getProjectRelativePath().toString();
-		}
-		return result;
-	}
-
-	@Override
-	public void cleanCode(IProject project, PackageableElement element, IProgressMonitor monitor) {
-
-	}
-
-	@Override
-	public String getDescription() {
-		return "UMLRT Code generator";
-	}
-
-	@Override
-	public SyncInformation getSyncInformation(String methodName, String body) {
-		SyncInformation si = new SyncInformation();
-		Pattern stringPattern = Pattern.compile("/\\* UMLRT-CODEGEN:(.*)\\*/");
-		Matcher m = stringPattern.matcher(body);
-		if (m.find()) {
-			si.isGenerated = false;
-			String uri = m.group(1);
-			TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(context);
-			EObject eo = domain.getResourceSet().getEObject(URI.createURI(uri.trim()), true);
-			if (eo instanceof Behavior) {
-				si.behavior = (Behavior) eo;
-			} else if (eo instanceof Operation) {
-				Operation op = (Operation) eo;
-				EList<Behavior> methods = op.getMethods();
-				if (!methods.isEmpty()) {
-					si.behavior = methods.get(0);
-				} else {
-					Behavior ob = getContainerClass(op).createOwnedBehavior(op.getName().toLowerCase(),
-							UMLPackage.Literals.OPAQUE_BEHAVIOR);
-					op.getMethods().add(ob);
-					si.behavior = ob;
-				}
-			}
-		} else {
-			si.isGenerated = true;
-		}
-		return si;
-	}
-
-	@Override
-	public boolean isEligible(Element element) {
-		boolean result = false;
-		if (element == null) {
-			throw new IllegalArgumentException("Element should not be null");
-		}
-		if (((org.eclipse.uml2.uml.Package) EcoreUtil.getRootContainer(element))
-				.getAppliedProfile("UMLRealTime") != null) {
-
-			if (element instanceof Class
-					|| (element instanceof Transition && getContainerRTStateMachine(element) != null)
-					|| element instanceof Operation) {
-				result = true;
-			}
-		}
-		return result;
-	}
-
-	/**
-	 * Obtains the UML {@link Class} that contains the element.
-	 * 
-	 * @param element
-	 *            - An {@link EObject}.
-	 * @return The UML {@link Class} that contains the element.
-	 */
-	private Class getContainerClass(EObject element) {
-		Class klass = null;
-		if (element != null) {
-			if (element instanceof Class) {
-				klass = (Class) element;
-			} else {
-				klass = getContainerClass(element.eContainer());
-			}
-		}
-		return klass;
-	}
-
-	/**
-	 * Obtains the UML {@link Class} that contains the element.
-	 * 
-	 * @param element
-	 *            - An {@link EObject}.
-	 * @return The UML {@link Class} that contains the element.
-	 */
-	private Element getContainerRTStateMachine(EObject element) {
-		Element result = null;
-		if (element != null) {
-			if (element instanceof Element
-					&& UMLUtil.getStereotypeApplication((Element) element, RTStateMachine.class) != null) {
-				result = (Element) element;
-			} else {
-				result = getContainerRTStateMachine(element.eContainer());
-			}
-		}
-		return result;
-	}
-
-	@Override
-	public String getSuffix(FILE_KIND fileKind) {
-		String suffix = "";
-		if (fileKind == FILE_KIND.BODY) {
-			suffix = "cc";
-		} else if (fileKind == FILE_KIND.HEADER) {
-			suffix = "hh";
-		}
-		return suffix;
-	}
-
-	@Override
-	public MethodInfo getMethodInfo(NamedElement operationOrBehavior) {
-		MethodInfo info = null;
-		if (operationOrBehavior instanceof OpaqueBehavior && getContainerRTStateMachine(operationOrBehavior) != null) {
-			// This is transition action so get generated name
-			String name = CppNamesUtil.getFuncName(operationOrBehavior).toString();
-			info = new MethodInfo(name);
-			info.addParameterType("const UMLRTMessage*");
-		} else {
-			Operation op = null;
-			if (operationOrBehavior instanceof Operation) {
-				op = (Operation) operationOrBehavior;
-			}
-			if (operationOrBehavior instanceof OpaqueBehavior) {
-				BehavioralFeature bf = ((OpaqueBehavior) operationOrBehavior).getSpecification();
-				if (bf != null && bf instanceof Operation) {
-					op = (Operation) bf;
-				}
-			}
-
-			if (op != null) {
-				info = new MethodInfo(op.getName());
-				for (Parameter p : op.getOwnedParameters()) {
-					if (p.getDirection() == ParameterDirectionKind.IN_LITERAL) {
-						info.addParameterType(p.getType().getName());
-					}
-				}
-			}
-		}
-		return null;
-	}
-}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/EditorUtil.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/EditorUtil.java
new file mode 100644
index 0000000..8641b92
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/EditorUtil.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.papyrusrt.codegen.papyrus.cdt;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.papyrusrt.codegen.UserEditableRegion;
+import org.eclipse.papyrusrt.codegen.papyrus.Activator;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.texteditor.ITextEditor;
+
+/**
+ * Utility class to open CDT editor.
+ * 
+ * @author ysroh
+ *
+ */
+public final class EditorUtil {
+
+	/**
+	 * Constructor.
+	 *
+	 */
+	private EditorUtil() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * Open editor for given file.
+	 * 
+	 * @param file
+	 *            file to open
+	 * @param label
+	 *            user tag
+	 * @param rc
+	 *            status
+	 */
+	public static void openEditor(final IFile file, final UserEditableRegion.Label label, final MultiStatus rc) {
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+				try {
+					IEditorPart part = IDE.openEditor(page, file);
+					int line = UserEditableRegion.LOCATOR.getLineNumber(file, label);
+					if (line > 0
+							&& !navigateWithSelectAndReveal(rc, part, file, line)) {
+						navigateWithMarker(rc, part, file, line);
+					}
+				} catch (PartInitException e) {
+					rc.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage()));
+				}
+			}
+		});
+	}
+
+	/**
+	 * Attempt to make visible the relevant portion of the file using the more efficient
+	 * selectAndReveal API. Return true if successful and false otherwise.
+	 * 
+	 * @param rc
+	 *            status
+	 * @param part
+	 *            editor part
+	 * @param file
+	 *            file
+	 * @param line
+	 *            line number
+	 * @return true if opened
+	 */
+	private static boolean navigateWithSelectAndReveal(MultiStatus rc, IEditorPart part, IFile file, int line) {
+		boolean result = false;
+		if (part instanceof ITextEditor) {
+			ITextEditor textEditor = (ITextEditor) part;
+			IDocument doc = textEditor.getDocumentProvider().getDocument(part.getEditorInput());
+			if (doc != null) {
+				try {
+					textEditor.selectAndReveal(doc.getLineOffset(line), 0);
+					result = true;
+				} catch (BadLocationException e) {
+					rc.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage()));
+				}
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Attempt to make visible the relevant portion of the file using the less efficient
+	 * gotoMarker API. Return true if successful and false otherwise.
+	 * 
+	 * @param rc
+	 *            status
+	 * @param part
+	 *            editor part
+	 * @param file
+	 *            file
+	 * @param line
+	 *            line number
+	 * @return true if opened
+	 */
+	private static boolean navigateWithMarker(MultiStatus rc, IEditorPart part, IFile file, int line) {
+		boolean result = false;
+		try {
+			IMarker marker = file.createMarker(IMarker.MARKER);
+			marker.setAttribute(IMarker.LINE_NUMBER, line);
+			IDE.gotoMarker(part, marker);
+			result = true;
+		} catch (CoreException e) {
+			rc.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage()));
+		}
+
+		return result;
+	}
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/UMLEObjectLocator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/UMLEObjectLocator.java
new file mode 100644
index 0000000..6559763
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/cdt/UMLEObjectLocator.java
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.papyrusrt.codegen.papyrus.cdt;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrusrt.codegen.CodeGenPlugin;
+import org.eclipse.papyrusrt.codegen.UserEditableRegion;
+import org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Region;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.Vertex;
+
+/**
+ * 
+ * @author ysroh
+ *
+ */
+public class UMLEObjectLocator implements org.eclipse.papyrusrt.codegen.IEObjectLocator {
+
+
+	/**
+	 * Language.
+	 */
+	public static final String LANGUAGE = "C++";
+
+	/**
+	 * Model set.
+	 */
+	private ModelSet modelSet = new ModelSet();
+
+	/**
+	 * Constructor.
+	 *
+	 */
+	public UMLEObjectLocator() {
+	}
+
+	/**
+	 * Retrieve root element of given resource uri.
+	 * 
+	 * @param uri
+	 *            resource uri
+	 * @return root package
+	 */
+	private Package getRoot(String uri) {
+
+		Package result = null;
+
+		Resource r = modelSet.getResource(URI.createURI(uri), true);
+		result = (Package) EcoreUtil.getObjectByType(r.getContents(), UMLPackage.Literals.PACKAGE);
+		return result;
+	}
+
+	@Override
+	public EObject getEObject(UserEditableRegion.Label label) {
+
+		List<String> qualifiedNames = new ArrayList<>();
+		qualifiedNames.addAll(Arrays.asList(label.getQualifiedName().split(QualifiedNames.SEPARATOR)));
+
+		Package nextPackage = getRoot(label.getUri());
+		Class capsuleOrClass = null;
+		qualifiedNames.remove(0);
+		while (!qualifiedNames.isEmpty()) {
+			String qname = qualifiedNames.remove(0);
+			Package pkg = nextPackage.getNestedPackage(qname);
+			if (pkg == null) {
+				capsuleOrClass = (Class) nextPackage.getPackagedElement(qname, false, UMLPackage.Literals.CLASS, false);
+				break;
+			}
+			nextPackage = pkg;
+		}
+
+		EObject result = null;
+
+		if (capsuleOrClass == null) {
+			CodeGenPlugin.error("Element not found : " + label.getQualifiedName());
+		} else {
+			if (label.getType().equals(UMLPackage.Literals.OPERATION.getName().toLowerCase())) {
+				Operation op = capsuleOrClass.getOwnedOperation(label.getDetails(), null, null);
+				OpaqueBehavior behaviour = (OpaqueBehavior) capsuleOrClass.getOwnedBehavior(op.getName().toLowerCase(), false, UMLPackage.Literals.OPAQUE_BEHAVIOR, true);
+				if (!behaviour.getLanguages().contains(LANGUAGE)) {
+					behaviour.getLanguages().add(LANGUAGE);
+				}
+				op.getMethods().add(behaviour);
+				result = behaviour;
+			} else {
+				// This is element under statemachine.
+				EObject smElement = getSMElement(capsuleOrClass, qualifiedNames);
+				result = getUserCodeElement(smElement, label.getType(), label.getDetails());
+
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Queries the element that holds the user code.
+	 * 
+	 * @param container
+	 *            cotainer
+	 * @param type
+	 *            element type
+	 * @param details
+	 *            element details
+	 * @return element containing user code
+	 */
+	private EObject getUserCodeElement(EObject container, String type, String details) {
+		EObject result = null;
+		if (type.equals(UMLPackage.Literals.TRANSITION.getName().toLowerCase())) {
+			Transition t = getTransition(container, details);
+			if (t != null) {
+				result = t.getEffect();
+			}
+		} else if (type.equals(UMLPackage.Literals.STATE__ENTRY.getName())) {
+			if (container instanceof State) {
+				State s = (State) container;
+				result = s.getEntry();
+			}
+		} else if (type.equals(UMLPackage.Literals.STATE__EXIT.getName())) {
+			if (container instanceof State) {
+				State s = (State) container;
+				result = s.getExit();
+			}
+		} else if (type.equals(UMLPackage.Literals.TRANSITION__GUARD.getName())) {
+			Transition t = getTransition(container, details);
+			if (t != null) {
+				result = t.getGuard();
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Find element under State machine.
+	 * 
+	 * @param capsuleOrClass
+	 *            Capsule or class containing state machine
+	 * @param qnameRelativeToSM
+	 *            qualified name
+	 * @return EObject
+	 */
+	private EObject getSMElement(Class capsuleOrClass, List<String> qnameRelativeToSM) {
+		StateMachine sm = (StateMachine) capsuleOrClass.getOwnedBehaviors().get(0);
+		Region r = sm.getRegions().get(0);
+		Region nextRegion = r;
+		EObject result = sm;
+
+		while (!qnameRelativeToSM.isEmpty()) {
+			Vertex v = nextRegion.getSubvertex(qnameRelativeToSM.remove(0));
+			if (v == null) {
+				CodeGenPlugin.error("No matching element found.");
+				break;
+			} else if (!((State) v).getRegions().isEmpty()) {
+				nextRegion = ((State) v).getRegions().get(0);
+			}
+			result = v;
+		}
+
+		if (!qnameRelativeToSM.isEmpty()) {
+			// something wrong
+			CodeGenPlugin.error("No matching element found");
+			result = null;
+		}
+
+		return result;
+	}
+
+	/**
+	 * Retrieve Transition from Capsule or Class.
+	 * 
+	 * @param container
+	 *            State machine or State that contains this transition
+	 * @param transitionDetails
+	 *            Transition details
+	 * @return Transition
+	 */
+	private Transition getTransition(EObject container, String transitionDetails) {
+		Transition result = null;
+		Region region = null;
+		if (container instanceof StateMachine) {
+			region = ((StateMachine) container).getRegions().get(0);
+		} else {
+			region = ((State) container).getRegions().get(0);
+		}
+
+		if (region != null) {
+			UserEditableRegion.TransitionDetails details = new UserEditableRegion.TransitionDetails(transitionDetails);
+
+			for (Transition t : region.getTransitions()) {
+				if (getSMQualifiedName(t.getSource()).equals(details.getSourceQname()) && getSMQualifiedName(t.getTarget()).equals(details.getTargetQname())) {
+					if (details.getTriggerDetailMap().isEmpty()) {
+						result = t;
+						break;
+					}
+					boolean found = false;
+					for (Entry<String, List<String>> entry : details.getTriggerDetailMap().entrySet()) {
+						for (Trigger triger : t.getTriggers()) {
+							if (triger.getEvent().getName().equals(entry.getKey()) && comparetriggerPorts(triger.getPorts(), entry.getValue())) {
+								found = true;
+								break;
+							}
+						}
+						if (!found) {
+							break;
+						}
+					}
+					if (found) {
+						result = t;
+						break;
+					}
+				}
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Compare actual trigger ports with expected port names.
+	 * 
+	 * @param ports
+	 *            actual ports
+	 * @param expectedPorts
+	 *            expected port names
+	 * @return boolean
+	 */
+	private boolean comparetriggerPorts(List<Port> ports, List<String> expectedPorts) {
+
+		List<String> actualPorts = new ArrayList<>();
+		for (Port p : ports) {
+			actualPorts.add(p.getName());
+		}
+		actualPorts.retainAll(expectedPorts);
+		return actualPorts.size() == expectedPorts.size();
+
+	}
+
+	/**
+	 * Calculate qualified name relative to State Machine.
+	 * 
+	 * @param eObject
+	 *            EObject
+	 * @return QualifiedName
+	 */
+	public static String getSMQualifiedName(EObject eObject) {
+		String result = UML2Util.EMPTY_STRING;
+		EObject container = eObject;
+		while (container != null && !(container instanceof StateMachine)) {
+			if (container instanceof Vertex) {
+				if (result.length() != 0) {
+					result = QualifiedNames.SEPARATOR + result;
+				}
+				result = ((Vertex) container).getName() + result;
+			}
+			container = container.eContainer();
+		}
+		return result;
+	}
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/handlers/EditSourceActionHandler.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/handlers/EditSourceActionHandler.java
new file mode 100644
index 0000000..16f811d
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/handlers/EditSourceActionHandler.java
@@ -0,0 +1,227 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+package org.eclipse.papyrusrt.codegen.papyrus.handlers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrusrt.codegen.UserEditableRegion;
+import org.eclipse.papyrusrt.codegen.UserEditableRegion.Label;
+import org.eclipse.papyrusrt.codegen.papyrus.Activator;
+import org.eclipse.papyrusrt.codegen.papyrus.UMLRTGenerator;
+import org.eclipse.papyrusrt.codegen.papyrus.cdt.EditorUtil;
+import org.eclipse.papyrusrt.codegen.papyrus.cdt.UMLEObjectLocator;
+import org.eclipse.papyrusrt.codegen.papyrus.internal.UMLRTCppCodeGen;
+import org.eclipse.papyrusrt.umlrt.core.utils.StateUtils;
+import org.eclipse.papyrusrt.xtumlrt.util.QualifiedNames;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @author ysroh
+ *
+ */
+public class EditSourceActionHandler extends AbstractHandler {
+
+
+	/**
+	 * Constructor.
+	 *
+	 */
+	public EditSourceActionHandler() {
+	}
+
+	/**
+	 * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+	 *
+	 * @param event
+	 * @return
+	 * @throws ExecutionException
+	 */
+	@Override
+	public Object execute(ExecutionEvent event) throws ExecutionException {
+
+		ISelection sel = HandlerUtil.getCurrentSelection(event);
+		if (sel instanceof IStructuredSelection) {
+
+			IStructuredSelection selection = (IStructuredSelection) sel;
+			Object obj = selection.getFirstElement();
+			final EObject eobj = EMFHelper.getEObject(obj);
+			if (eobj == null) {
+				throw new IllegalArgumentException(obj.getClass().getCanonicalName() + " is not an EObject");
+			}
+
+			EObject root = EcoreUtil.getRootContainer(eobj);
+			List<EObject> targets = new ArrayList<>();
+			targets.add(root);
+			String top = UMLRTCppCodeGen.getTopCapsuleName((Element) root);
+			UMLRTGenerator.INSTANCE.generate(targets, top, true);
+
+			MultiStatus rc = new MultiStatus(Activator.PLUGIN_ID, 0, "Edit Source Action Status", null);
+
+			if (eobj instanceof OpaqueBehavior) {
+				// User selected actual opaque behaviour to edit source
+				EObject container = eobj.eContainer();
+				IFile file = getFile((NamedElement) container);
+				if (container instanceof Transition) {
+					// This is transition action
+					Label label = getLabel(container);
+					EditorUtil.openEditor(file, label, rc);
+				} else if (container instanceof State) {
+					// This is either entry or exit action
+					Label label = getLabel(container);
+					State s = (State) container;
+					if (s.getEntry() == eobj) {
+						label.setType(UMLPackage.Literals.STATE__ENTRY.getName());
+					} else {
+						label.setType(UMLPackage.Literals.STATE__EXIT.getName());
+					}
+					EditorUtil.openEditor(file, label, rc);
+				}
+			} else {
+				Label label = getLabel(eobj);
+				IFile file = getFile((NamedElement) eobj);
+				EditorUtil.openEditor(file, label, rc);
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Compute label.
+	 * 
+	 * @param context
+	 *            EObject
+	 * @return label info
+	 */
+	public Label getLabel(EObject context) {
+		EObject container = context.eContainer();
+		Label label = new Label();
+		label.setQualifiedName(getParentQualifiedName(context));
+		if (context instanceof Transition) {
+			label.setType(UMLPackage.Literals.TRANSITION.getName().toLowerCase());
+			label.setDetails(getDetails((Transition) context));
+		} else if (context instanceof Constraint) {
+			label.setType(UMLPackage.Literals.TRANSITION__GUARD.getName().toLowerCase());
+			label.setDetails(getDetails((Transition) container));
+		} else if (context instanceof Operation) {
+			label.setType(UMLPackage.Literals.OPERATION.getName().toLowerCase());
+			label.setDetails(((Operation) context).getName());
+		} else if (context instanceof State) {
+			label.setQualifiedName(label.getQualifiedName() + QualifiedNames.SEPARATOR
+					+ ((State) context).getName());
+			// Entry or Exit?
+			State s = (State) context;
+			if (s.getEntry() != null) {
+				label.setType(UMLPackage.Literals.STATE__ENTRY.getName());
+			} else {
+				label.setType(UMLPackage.Literals.STATE__EXIT.getName());
+			}
+		} else {
+			label.setType(UMLPackage.Literals.CLASS.getName());
+		}
+		label.setUri(context.eResource().getURI().toString());
+
+		return label;
+	}
+
+	/**
+	 * Compute transition details.
+	 * 
+	 * @param transition
+	 *            Transition.
+	 * @return transition detail string
+	 */
+	public String getDetails(Transition transition) {
+		String sourceQname = UMLEObjectLocator.getSMQualifiedName(transition.getSource());
+		String targetQname = UMLEObjectLocator.getSMQualifiedName(transition.getTarget());
+		UserEditableRegion.TransitionDetails details = new UserEditableRegion.TransitionDetails(sourceQname, targetQname);
+		for (Trigger t : transition.getTriggers()) {
+			List<String> ports = new ArrayList<>();
+			for (Port p : t.getPorts()) {
+				ports.add(p.getName());
+			}
+			details.addTriggerDetail(t.getEvent().getName(), ports);
+		}
+		return details.getTagString();
+	}
+
+	/**
+	 * Compute qualified name for container.
+	 * 
+	 * @param object
+	 *            object to compute
+	 * @return qualified name
+	 */
+	public String getParentQualifiedName(EObject object) {
+		List<String> names = new ArrayList<>();
+		EObject container = object.eContainer();
+		while (container != null) {
+			if (container instanceof State && StateUtils.isRTState((State) container)) {
+				names.add(0, ((State) container).getName());
+			} else if (container instanceof Class && !(container instanceof StateMachine)) {
+				names.add(0, ((Class) container).getName());
+			} else if (container instanceof org.eclipse.uml2.uml.Package) {
+				names.add(0, ((org.eclipse.uml2.uml.Package) container).getName());
+			}
+
+			container = container.eContainer();
+		}
+		return String.join(QualifiedNames.SEPARATOR, names);
+	}
+
+	/**
+	 * Get generated source file for given element.
+	 * 
+	 * @param element
+	 *            Element.
+	 * @return generated source file
+	 */
+	public IFile getFile(NamedElement element) {
+		IProject project = UMLRTGenerator.INSTANCE.getProject(element);
+		Class clazz = null;
+		EObject container = element;
+		while (container != null) {
+			if (container instanceof Class && !(container instanceof StateMachine)) {
+				clazz = (Class) container;
+				break;
+			}
+			container = container.eContainer();
+		}
+		if (clazz != null) {
+			IFolder srcFolder = project.getFolder("src");
+			return srcFolder.getFile(clazz.getName() + ".cc");
+		}
+		return null;
+	}
+
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/propertytester/UMLRTPropertyTester.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/propertytester/UMLRTPropertyTester.java
index cafc2f6..6408775 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/propertytester/UMLRTPropertyTester.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.papyrus/src/org/eclipse/papyrusrt/codegen/papyrus/propertytester/UMLRTPropertyTester.java
@@ -12,8 +12,12 @@
 import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrusrt.umlrt.core.utils.CapsuleUtils;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Constraint;
 import org.eclipse.uml2.uml.Element;
 import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Transition;
 
 /**
  * Property tester for UMLRT codegen plugin.
@@ -25,8 +29,11 @@
 	/** Stereotype property name. */
 	private static final String STEREOTYPE_PROPERTY = "stereotype";
 
-	/** EObject type property name. */
-	private static final String EOBJECTTYPE_PROPERTY = "eobjecttype";
+	/** eClass type property name. */
+	private static final String ECLASS_PROPERTY = "eClass";
+
+	/** isSourceEditable type property name. */
+	private static final String IS_SOURCE_EDITABLE_PROPERTY = "isSourceEditable";
 
 	/**
 	 * Constructor.
@@ -46,19 +53,38 @@
 
 		EObject eobj = EMFHelper.getEObject(element);
 
-		if (eobj instanceof Element && STEREOTYPE_PROPERTY.equals(property)) {
-			Stereotype st = ((Element) eobj).getAppliedStereotype((String) expectedValue);
-			result = st != null;
-		} else {
-			if (eobj != null && EOBJECTTYPE_PROPERTY.equals(property)) {
-				for (Class clz : eobj.getClass().getInterfaces()) {
-					result = clz.getSimpleName().equals(expectedValue);
-					if (result) {
-						break;
-					}
-				}
-				if (!result) {
-					result = eobj.getClass().getSimpleName().equals(expectedValue);
+		if (eobj != null) {
+			if (eobj instanceof Element && STEREOTYPE_PROPERTY.equals(property)) {
+				Stereotype st = ((Element) eobj).getAppliedStereotype((String) expectedValue);
+				result = st != null;
+			} else if (ECLASS_PROPERTY.equals(property)) {
+				result = eobj.eClass().getName().equals(expectedValue);
+			} else if (IS_SOURCE_EDITABLE_PROPERTY.equals(property)) {
+				result = ((Boolean) expectedValue) == isSourceEditable(eobj);
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Queries if the object has editable user code.
+	 * 
+	 * @param eo
+	 *            eobject to test
+	 * @return true if source has user code.
+	 */
+	private boolean isSourceEditable(EObject eo) {
+		boolean result = false;
+		if (eo instanceof Classifier && CapsuleUtils.isCapsule((Classifier) eo)) {
+			result = true;
+		} else if (eo instanceof Transition) {
+			result = true;
+		} else if (eo instanceof Constraint) {
+			EObject container = eo.eContainer();
+			if (container instanceof Transition) {
+				Transition t = (Transition) container;
+				if (t.getGuard() == eo) {
+					result = true;
 				}
 			}
 		}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.standalone/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.classpath
index 325150d..428337e 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/src/org/eclipse/papyrusrt/codegen/statemachines/transformations/StateNestingFlattener.xtend b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/src/org/eclipse/papyrusrt/codegen/statemachines/transformations/StateNestingFlattener.xtend
index 4001cd7..3aefaac 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/src/org/eclipse/papyrusrt/codegen/statemachines/transformations/StateNestingFlattener.xtend
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.statemachines.flat/src/org/eclipse/papyrusrt/codegen/statemachines/transformations/StateNestingFlattener.xtend
@@ -614,7 +614,7 @@
             val j = StatemachFactory.eINSTANCE.createJunctionPoint
             j.name = p.name
             state.addJunctionPoint( j )
-            flattener.addNewElement( j )
+            flattener.addNewElementCorrespondence( j, p )
             j.cachedFullSMName
             j.cachedFullName
             for (Transition t: p.allDirectIncomingTransitions)
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.classpath
index 325150d..428337e 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="xtend-gen"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen.utils/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.classpath b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.classpath
index 098194c..eca7bdb 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.classpath
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.settings/org.eclipse.jdt.core.prefs b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.settings/org.eclipse.jdt.core.prefs
index 28f0d0f..9b6d675 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/.settings/org.eclipse.jdt.core.prefs
@@ -1,15 +1,15 @@
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.compliance=1.8
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.compiler.source=1.8
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/META-INF/MANIFEST.MF b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/META-INF/MANIFEST.MF
index 7337e45..5e6388f 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/META-INF/MANIFEST.MF
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/META-INF/MANIFEST.MF
@@ -1,13 +1,19 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Papyrus-RT CodeGen Plugin
-Bundle-SymbolicName: org.eclipse.papyrusrt.codegen
+Bundle-SymbolicName: org.eclipse.papyrusrt.codegen;singleton:=true
 Bundle-Version: 0.7.2.qualifier
 Bundle-Activator: org.eclipse.papyrusrt.codegen.CodeGenPlugin
 Bundle-Vendor: Zeligsoft (2009) Limited
 Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
  org.eclipse.xtext.xbase.lib;bundle-version="2.9.0",
- org.eclipse.papyrusrt.xtumlrt.util;bundle-version="0.7.2"
+ org.eclipse.papyrusrt.xtumlrt.util;bundle-version="0.7.2",
+ org.eclipse.emf.ecore;bundle-version="2.12.0",
+ org.eclipse.core.resources;bundle-version="3.11.0",
+ org.eclipse.uml2.uml;bundle-version="5.2.0",
+ org.eclipse.papyrusrt.xtumlrt.common.model;bundle-version="0.7.2",
+ org.eclipse.papyrusrt.xtumlrt.statemach.model;bundle-version="0.7.2",
+ org.eclipse.emf.transaction;bundle-version="1.9.0"
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-ActivationPolicy: lazy
 Export-Package: org.eclipse.papyrusrt.codegen
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/plugin.xml b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/plugin.xml
new file mode 100644
index 0000000..b3f931b
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/plugin.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension-point id="eobjectlocator" name="UMLRT Codegen EObject Locator" schema="schema/eobjectlocator.exsd"/>
+   <extension
+         id="umlrtgensrcbuilder"
+         name="UMLRT Generated Source Builder"
+         point="org.eclipse.core.resources.builders">
+      <builder>
+         <run
+               class="org.eclipse.papyrusrt.codegen.build.GeneratedSrcBuilder">
+         </run>
+      </builder>
+   </extension>
+
+</plugin>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/schema/eobjectlocator.exsd b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/schema/eobjectlocator.exsd
new file mode 100644
index 0000000..ba4c28c
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/schema/eobjectlocator.exsd
@@ -0,0 +1,112 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrusrt.codegen" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.eclipse.papyrusrt.codegen" id="editsource" name="UMLRT Codegen EObject Locator"/>
+      </appinfo>
+      <documentation>
+         This extension point is used to contribute to the Papyrus-RT generated source builder
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+         <documentation>
+            This extension point is used to contribute to the Papyrus-RT for generated source synchronization.
+         </documentation>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="eobjectlocator" minOccurs="1" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="eobjectlocator">
+      <annotation>
+         <documentation>
+            This element provides the mapping for 1 ZDLConcept to one or more editsource workflows.
+         </documentation>
+      </annotation>
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  An id used to identify this eobject provider in error messages.
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  A class with a default contructor that is able to locate EObject instances from a given URI.
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":com.zeligsoft.cx.codegen.rsm.IEObjectLocator"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiInfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/CodeGenPlugin.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/CodeGenPlugin.java
index 5e4f249..fd1a0e7 100644
--- a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/CodeGenPlugin.java
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/CodeGenPlugin.java
@@ -25,6 +25,9 @@
 	/** Plug-in ID. */
 	public static final String ID = "org.eclipse.papyrusrt.codegen";
 
+	/** EObject locator extension point id. */
+	public static final String EOBJECTLOCATOR_EP_ID = "eobjectlocator"; //$NON-NLS-1$
+
 	/** Reference to the plug-in instance. */
 	private static CodeGenPlugin instance;
 
@@ -40,6 +43,7 @@
 	/** Common logger for the generator. */
 	private static final Logger LOGGER = Logger.getLogger("CodeGenPlugin");
 
+
 	/**
 	 * Default Constructor.
 	 */
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/EObjectLocator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/EObjectLocator.java
new file mode 100644
index 0000000..7f4faf7
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/EObjectLocator.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.papyrusrt.codegen;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * EObject locator.
+ * 
+ * @author ysroh
+ *
+ */
+public final class EObjectLocator {
+	/**
+	 * Locator instance.
+	 */
+	private static EObjectLocator locator = new EObjectLocator();
+	/**
+	 * 
+	 */
+	private static final String EOBJECTLOCATOR_ELEMENT = "eobjectlocator";
+
+	/**
+	 * extension attribute.
+	 */
+	private static final String ID_ATTR = "id";
+	/**
+	 * extension attribute.
+	 */
+	private static final String CLASS_ATTR = "class";
+
+	/**
+	 * EObject locator registered through extension point.
+	 */
+	private final Map<String, IEObjectLocator> locators = new TreeMap<>();
+
+	/**
+	 * 
+	 * Constructor.
+	 *
+	 */
+	private EObjectLocator() {
+		load();
+	}
+
+	public static EObjectLocator getInstance() {
+		return locator;
+	}
+
+	/**
+	 * Query EObject to registered EObject locator.
+	 * 
+	 * @param label
+	 *            label info
+	 * @return EObject
+	 */
+	public EObject getEObject(UserEditableRegion.Label label) {
+		EObject result = null;
+		for (IEObjectLocator locator : this.locators.values()) {
+			EObject eobject = locator.getEObject(label);
+			if (eobject != null) {
+				result = eobject;
+				break;
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * clear locators.
+	 */
+	public void dispose() {
+		this.locators.clear();
+	}
+
+	/**
+	 * Read extension point for locators.
+	 */
+	public void load() {
+		IExtension[] extensions = Platform.getExtensionRegistry()
+				.getExtensionPoint(CodeGenPlugin.ID, CodeGenPlugin.EOBJECTLOCATOR_EP_ID)
+				.getExtensions();
+
+		for (IExtension extension : extensions) {
+			for (IConfigurationElement configElement : extension.getConfigurationElements()) {
+				if (EOBJECTLOCATOR_ELEMENT.equals(configElement.getName())) {
+					String id = configElement.getAttribute(ID_ATTR);
+					if (id == null) {
+						CodeGenPlugin.error(
+								NLS.bind("Missing attribute: ", ID_ATTR));
+						continue;
+					}
+
+					Object locatorObj = null;
+					try {
+						locatorObj = configElement.createExecutableExtension(CLASS_ATTR);
+					} catch (CoreException e) {
+						CodeGenPlugin.error(e);
+					}
+					if (locatorObj == null) {
+						CodeGenPlugin.error(
+								NLS.bind("Missing class: ", CLASS_ATTR));
+						continue;
+					}
+
+					if (!(locatorObj instanceof IEObjectLocator)) {
+						CodeGenPlugin.error(
+								NLS.bind("Invalid class: ", CLASS_ATTR),
+								null);
+						continue;
+					}
+
+					this.locators.put(id, (IEObjectLocator) locatorObj);
+				}
+			}
+		}
+	}
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/ICodeLocator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/ICodeLocator.java
new file mode 100644
index 0000000..fe19234
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/ICodeLocator.java
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.papyrusrt.codegen;
+
+import org.eclipse.core.resources.IFile;
+
+/**
+ * Interface class for code locator.
+ * 
+ * @author ysroh
+ *
+ */
+public interface ICodeLocator {
+	/**
+	 * Returns the line number of the argument file on which the argument object's code
+	 * begins. Return -1 if no code can be found for the argument object.
+	 * 
+	 * @param file
+	 *            source file
+	 * @param label
+	 *            label info
+	 * @return line number
+	 */
+	int getLineNumber(IFile file, UserEditableRegion.Label label);
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/IEObjectLocator.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/IEObjectLocator.java
new file mode 100644
index 0000000..e5ca842
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/IEObjectLocator.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.papyrusrt.codegen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * Implementations of this interface are able to find the EObject associated with a URI.
+ * The implementations are contributed by extending the associated extension point.
+ */
+public interface IEObjectLocator {
+	/**
+	 * Returns null if the associated EObject cannot be found.
+	 * 
+	 * @param label
+	 *            tag info
+	 * @return EObject
+	 */
+	EObject getEObject(UserEditableRegion.Label label);
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/UserEditableRegion.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/UserEditableRegion.java
new file mode 100644
index 0000000..35ad734
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/UserEditableRegion.java
@@ -0,0 +1,547 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+package org.eclipse.papyrusrt.codegen;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Constraint;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * User edit region utility class.
+ * 
+ * @author ysroh
+ *
+ */
+public class UserEditableRegion {
+	/**
+	 * User region tag.
+	 */
+	public static final String USER_REGION_TAG = "UMLRTGEN-USERREGION-"; //$NON-NLS-1$
+
+	/**
+	 * User region start tag.
+	 */
+
+	public static final String USER_EDIT_BEGIN_TAG = "BEGIN"; //$NON-NLS-1$
+	/**
+	 * User region end tag.
+	 */
+
+	public static final String USER_EDIT_END_TAG = "END"; //$NON-NLS-1$
+
+	/**
+	 * Comment end string.
+	 */
+	public static final String COMMENT_START_STRING = "/* ";
+
+	/**
+	 * Comment end string.
+	 */
+	public static final String COMMENT_END_STRING = " */";
+
+	/**
+	 * User edit marker.
+	 */
+	public static final String USER_EDIT_MARKER = USER_REGION_TAG + USER_EDIT_BEGIN_TAG;
+
+	/**
+	 * Locator instance.
+	 */
+	public static final Locator LOCATOR = new Locator();
+
+	/**
+	 * Empty string.
+	 */
+	private static final String EMPTY = new String();
+
+	/**
+	 * 
+	 */
+	private final String userRegionTag;
+
+	/**
+	 * line number.
+	 */
+	private final int line;
+
+	/**
+	 * user entered text.
+	 */
+	private final StringBuilder userText = new StringBuilder();
+
+	/**
+	 * 
+	 * Constructor.
+	 *
+	 * @param tag
+	 *            user tag
+	 * @param line
+	 *            line number
+	 */
+	public UserEditableRegion(String tag, int line) {
+		this.userRegionTag = tag;
+		this.line = line;
+	}
+
+	public String getUserRegionTag() {
+		return userRegionTag;
+	}
+
+	public int getLine() {
+		return line;
+	}
+
+	public StringBuilder getUserText() {
+		return userText;
+	}
+
+
+	/**
+	 * User begin tag.
+	 * 
+	 * @param label
+	 *            label information
+	 * @return user begin tag
+	 */
+	public static String userEditBegin(Label label) {
+		return getIdentifyingString(label.uri, label.qualifiedName, label.type, label.details);
+	}
+
+	/**
+	 * Compose identifying string for user tag.
+	 * 
+	 * @param uriString
+	 *            resource URI
+	 * @param qname
+	 *            qualified name of parent container
+	 * @param type
+	 *            type of object
+	 * @param details
+	 *            object details such as string to identify transition
+	 * @return unique user section tag
+	 */
+
+	public static String getIdentifyingString(String uriString, String qname, String type, String details) {
+
+		// all params need to be supplied
+		if (uriString == null || uriString.isEmpty()
+				|| qname == null || qname.isEmpty()
+				|| type == null || type.isEmpty()) {
+			throw new IllegalArgumentException("Valid strings required for all identifying attributes"); //$NON-NLS-1$
+		}
+		StringBuilder sb = new StringBuilder();
+		sb.append(USER_REGION_TAG);
+		sb.append(USER_EDIT_BEGIN_TAG);
+		sb.append(' ');
+		sb.append(uriString == null ? EMPTY : uriString);
+		sb.append(' ');
+		sb.append(qname == null ? EMPTY : qname);
+		sb.append(' ');
+		sb.append(type == null ? EMPTY : type);
+		sb.append(' ');
+		sb.append(details == null ? EMPTY : details);
+		return sb.toString();
+	}
+
+
+
+	/**
+	 * Parse user tag.
+	 * 
+	 * @param idString
+	 *            tag to be parsed
+	 * @return parsed user tag
+	 */
+	private static Label parseLabel(String idString) {
+		Label label = new Label();
+		StringTokenizer tokenizer = new StringTokenizer(idString);
+		if (!tokenizer.hasMoreTokens()) {
+			return null;
+		}
+		String elementUri = tokenizer.nextToken();
+
+		if (!tokenizer.hasMoreElements()) {
+			return null;
+		}
+		label.qualifiedName = tokenizer.nextToken();
+
+		if (!tokenizer.hasMoreElements()) {
+			return null;
+		}
+		label.type = tokenizer.nextToken();
+
+		if (!tokenizer.hasMoreElements()) {
+			return null;
+		}
+		label.details = tokenizer.nextToken();
+
+		label.uri = elementUri;
+
+		return label;
+	}
+
+	/**
+	 * Query EObject.
+	 * 
+	 * @param label
+	 *            tag information
+	 * @return EObject
+	 */
+	public static EObject getEObject(Label label) {
+
+		return EObjectLocator.getInstance().getEObject(label);
+
+	}
+
+	/**
+	 * Overlapping regions are not allowed so a simple end tag is possible.
+	 * 
+	 * @return end tag
+	 */
+	public static String userEditEnd() {
+		return USER_REGION_TAG + USER_EDIT_END_TAG; // $NON-NLS-1$ //$NON-NLS-2$
+	}
+
+
+	/**
+	 * Stores the receiver's text into the model element indicated in the identifying label.
+	 * 
+	 * @return return eObject
+	 */
+	public EObject commit() {
+		final Label l = parseLabel(this.userRegionTag);
+		final EObject eo = getEObject(l);
+
+		String space = " ";
+
+		if (eo == null) {
+			CodeGenPlugin.warning("EObject not found: " + l.getQualifiedName() + space + l.getType() + space + l.getDetails());
+		} else {
+			doCommit(eo);
+		}
+		return eo;
+	}
+
+	/**
+	 * Actual commit process.
+	 * 
+	 * @param eo
+	 *            EObject to update
+	 */
+	private void doCommit(EObject eo) {
+		if (eo instanceof OpaqueBehavior) {
+			OpaqueBehavior ob = (OpaqueBehavior) eo;
+			ob.getBodies().clear();
+			ob.getBodies().add(this.userText.toString());
+		} else if (eo instanceof Constraint) {
+			Constraint guard = (Constraint) eo;
+			ValueSpecification value = guard.getSpecification();
+			if (value instanceof OpaqueExpression) {
+				((OpaqueExpression) value).getBodies().clear();
+				((OpaqueExpression) value).getBodies().add(this.userText.toString());
+			}
+		}
+	}
+
+	/**
+	 * Utility function to determine if the string has user region.
+	 * 
+	 * @param buffer
+	 *            string
+	 * @return true if contains user tag
+	 */
+	public static boolean containsUserEditableRegions(CharSequence buffer) {
+		return buffer.toString().contains(USER_EDIT_MARKER);
+	}
+
+	/**
+	 * Utility function to determine if the input stream has user region.
+	 * 
+	 * @param in
+	 *            input stream
+	 * @return true if contains user tag
+	 */
+	public static boolean containsUserEditableRegions(InputStream in) {
+		int markerPrefix = USER_EDIT_MARKER.length() - 1;
+		int activeBuffLen = 16 * 1024;
+
+		byte[] buff = new byte[markerPrefix + activeBuffLen];
+		Arrays.fill(buff, 0, markerPrefix, (byte) 0);
+		int bytes;
+		try {
+			while ((bytes = in.read(buff, markerPrefix, activeBuffLen)) > 0) {
+				if (containsUserEditableRegions(new String(buff, 0, bytes + markerPrefix))) {
+					return true;
+				}
+				int srcBegin = buff.length - markerPrefix;
+				System.arraycopy(buff, srcBegin, buff, 0, markerPrefix);
+			}
+		} catch (IOException e) {
+
+		} finally {
+			if (in != null) {
+				try {
+					in.close();
+				} catch (IOException e) {
+
+				}
+			}
+		}
+
+		return false;
+	}
+
+	/**
+	 * Utility class to get the line number from the source file.
+	 * 
+	 * @author ysroh
+	 *
+	 */
+	public static class Locator implements ICodeLocator {
+		/**
+		 * Constructor.
+		 *
+		 */
+		public Locator() {
+		}
+
+		@Override
+		public int getLineNumber(IFile file, Label label) {
+			LineNumberReader reader = null;
+			try {
+				reader = new LineNumberReader(new InputStreamReader(file.getContents()));
+			} catch (CoreException e) {
+				return -1;
+			}
+
+			String id = getIdentifyingString(label.getUri(), label.getQualifiedName(), label.getType(), label.getDetails());
+			String line;
+			try {
+				// LineNumberReader starts at 0 but the tag consumes 1 line so the current
+				// value will wind up one past the opening tag.
+				while ((line = reader.readLine()) != null) {
+					if (line.contains(id)) {
+						return reader.getLineNumber();
+					}
+				}
+			} catch (IOException e) {
+
+			}
+
+			return -1;
+		}
+	}
+
+	/**
+	 * Utility class that hold details information about Transition.
+	 * 
+	 * @author ysroh
+	 *
+	 */
+	public static class TransitionDetails {
+
+		/**
+		 * Detail separator.
+		 */
+		public static final String DETAIL_SEPARATOR = ",";
+
+		/**
+		 * Trigger separator.
+		 */
+		public static final String TRIGGER_SEPARATOR = "/";
+
+		/**
+		 * Trigger signal and ports separator.
+		 */
+		public static final String TRIGGER_DETAIL_SEPARATOR = ":";
+		/**
+		 * Source vertex of transition.
+		 */
+		private String sourceQname;
+
+		/**
+		 * Target vertex of transition.
+		 */
+		private String targetQname;
+
+		/**
+		 * Trigger details.
+		 */
+		private Map<String, List<String>> triggerDetails = new HashMap<>();
+
+		/**
+		 * 
+		 * Constructor.
+		 *
+		 * @param details
+		 *            string that need to be parsed.
+		 */
+		public TransitionDetails(String details) {
+			String[] d1 = details.split(DETAIL_SEPARATOR);
+			sourceQname = d1[0];
+			targetQname = d1[1];
+			if (d1.length > 2) {
+				String[] d2 = d1[2].split(TRIGGER_SEPARATOR);
+				for (String triggerDetail : d2) {
+					String[] d3 = triggerDetail.split(TRIGGER_DETAIL_SEPARATOR);
+					String key = d3[0];
+					List<String> ports = new ArrayList<>();
+					for (int i = 1; i < d3.length; i++) {
+						ports.add(d3[i]);
+					}
+					triggerDetails.put(key, ports);
+				}
+			}
+		}
+
+		/**
+		 * 
+		 * Constructor.
+		 *
+		 * @param sourceQname
+		 *            source vertex
+		 * @param targetQname
+		 *            target vertex
+		 */
+		public TransitionDetails(String sourceQname, String targetQname) {
+			this.sourceQname = sourceQname;
+			this.targetQname = targetQname;
+		}
+
+		public String getSourceQname() {
+			return sourceQname;
+		}
+
+		public String getTargetQname() {
+			return targetQname;
+		}
+
+		public Map<String, List<String>> getTriggerDetailMap() {
+			return triggerDetails;
+		}
+
+		/**
+		 * Add trigger details.
+		 * 
+		 * @param signal
+		 *            trigger signal
+		 * @param ports
+		 *            trigger ports
+		 */
+		public void addTriggerDetail(String signal, List<String> ports) {
+			triggerDetails.put(signal, ports);
+		}
+
+		/**
+		 * 
+		 * @return String that can be used as part of user region detail tag.
+		 */
+		public String getTagString() {
+			StringBuilder result = new StringBuilder();
+			result.append(sourceQname).append(DETAIL_SEPARATOR).append(targetQname).append(DETAIL_SEPARATOR);
+
+			for (Entry<String, List<String>> entry : triggerDetails.entrySet()) {
+				result.append(entry.getKey());
+				for (String p : entry.getValue()) {
+					result.append(TRIGGER_DETAIL_SEPARATOR).append(p);
+				}
+				result.append(TRIGGER_SEPARATOR);
+			}
+			String resultString = result.toString();
+			if (resultString.endsWith(TRIGGER_SEPARATOR) || resultString.endsWith(DETAIL_SEPARATOR)) {
+				return resultString.substring(0, resultString.length() - 1);
+			}
+			return resultString;
+		}
+	}
+
+	/**
+	 * Utility class that holds information about user tag composition.
+	 * 
+	 * @author ysroh
+	 *
+	 */
+	public static class Label {
+
+		/**
+		 * URI.
+		 */
+		private String uri;
+		/**
+		 * Qualified name of object or its container.
+		 */
+		private String qualifiedName;
+
+		/**
+		 * Object type.
+		 */
+		private String type;
+
+		/**
+		 * Object details.
+		 */
+		private String details;
+
+		/**
+		 * Constructor.
+		 *
+		 */
+		public Label() {
+		}
+
+		public String getUri() {
+			return uri;
+		}
+
+		public void setUri(String uri) {
+			this.uri = uri;
+		}
+
+		public String getQualifiedName() {
+			return qualifiedName;
+		}
+
+		public void setQualifiedName(String parentQualifiedName) {
+			this.qualifiedName = parentQualifiedName;
+		}
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+		public String getDetails() {
+			return details;
+		}
+
+		public void setDetails(String details) {
+			this.details = details;
+		}
+
+
+	}
+}
diff --git a/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/build/BuildNotifier.java b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/build/BuildNotifier.java
new file mode 100644
index 0000000..579d353
--- /dev/null
+++ b/plugins/umlrt/codegen/org.eclipse.papyrusrt.codegen/src/org/eclipse/papyrusrt/codegen/build/BuildNotifier.java
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2014-2016 Zeligsoft (2009) Limited and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *********************************************