Bug 502506: Textual model codegen fails if transition has no action 

Change-Id: Ia5a57a9650982c5f8f3314b6986fc8caa80a448a
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=502506
Signed-off-by: Ernesto Posse <eposse@gmail.com>
diff --git a/models/samples/ComputerSystem/expected_src/CMakeLists.txt b/models/samples/ComputerSystem/expected_src/CMakeLists.txt
index 668bf65..973ecb0 100644
--- a/models/samples/ComputerSystem/expected_src/CMakeLists.txt
+++ b/models/samples/ComputerSystem/expected_src/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Generated 2016-09-06 16:23:45
+# Generated 2016-09-29 13:04:32
 
 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 93e4306..96a0674 100644
--- a/models/samples/ComputerSystem/expected_src/Computer.cc
+++ b/models/samples/ComputerSystem/expected_src/Computer.cc
@@ -274,6 +274,38 @@
     #undef rtdata
 }
 
+void Capsule_Computer::exitaction_____InitUSBBus__WaitForPrinter( const UMLRTMessage * msg )
+{
+    #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
+    #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus::WaitForPrinter exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_resourceID
+}
+
+void Capsule_Computer::exitaction_____InitUSBBus__WaitForStorage( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::InitUSBBus::WaitForStorage exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_Computer::exitaction_____InitUSBBus__boundary( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    #undef rtdata
+}
+
+void Capsule_Computer::exitaction_____WaitForResourceManager( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::Computer::WaitForResourceManager exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_Computer::transitionaction_____InitUSBBus__onPrintDriverTimeout( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -399,6 +431,7 @@
 
 void Capsule_Computer::actionchain_____EX_InitUSB_Continuation( const UMLRTMessage * msg )
 {
+    exitaction_____InitUSBBus__boundary( msg );
     entryaction_____Running( msg );
 }
 
@@ -424,24 +457,28 @@
 
 void Capsule_Computer::actionchain_____InitUSBBus__onPrintDriverTimeout( const UMLRTMessage * msg )
 {
+    exitaction_____InitUSBBus__WaitForPrinter( msg );
     transitionaction_____InitUSBBus__onPrintDriverTimeout( msg );
     entryaction_____InitUSBBus__WaitForStorage( msg );
 }
 
 void Capsule_Computer::actionchain_____InitUSBBus__onPrintResourceID( const UMLRTMessage * msg )
 {
+    exitaction_____InitUSBBus__WaitForPrinter( msg );
     transitionaction_____InitUSBBus__onPrintResourceID( msg );
     entryaction_____InitUSBBus__WaitForStorage( msg );
 }
 
 void Capsule_Computer::actionchain_____InitUSBBus__onStorageResourceID( const UMLRTMessage * msg )
 {
+    exitaction_____InitUSBBus__WaitForStorage( msg );
     transitionaction_____InitUSBBus__onStorageResourceID( msg );
     save_history( InitUSBBus, InitUSBBus__WaitForStorage );
 }
 
 void Capsule_Computer::actionchain_____InitUSBBus__onStorageTimeout( const UMLRTMessage * msg )
 {
+    exitaction_____InitUSBBus__WaitForStorage( msg );
     transitionaction_____InitUSBBus__onStorageTimeout( msg );
     save_history( InitUSBBus, InitUSBBus__WaitForStorage );
 }
@@ -454,6 +491,7 @@
 
 void Capsule_Computer::actionchain_____onResMgrRunning( const UMLRTMessage * msg )
 {
+    exitaction_____WaitForResourceManager( msg );
     transitionaction_____onResMgrRunning( msg );
     entryaction_____InitUSBBus__boundary( msg );
 }
diff --git a/models/samples/ComputerSystem/expected_src/Computer.hh b/models/samples/ComputerSystem/expected_src/Computer.hh
index 50b7fff..bac49b4 100644
--- a/models/samples/ComputerSystem/expected_src/Computer.hh
+++ b/models/samples/ComputerSystem/expected_src/Computer.hh
@@ -103,6 +103,10 @@
     void entryaction_____InitUSBBus__boundary( const UMLRTMessage * msg );
     void entryaction_____Running( const UMLRTMessage * msg );
     void entryaction_____WaitForResourceManager( const UMLRTMessage * msg );
+    void exitaction_____InitUSBBus__WaitForPrinter( const UMLRTMessage * msg );
+    void exitaction_____InitUSBBus__WaitForStorage( const UMLRTMessage * msg );
+    void exitaction_____InitUSBBus__boundary( const UMLRTMessage * msg );
+    void exitaction_____WaitForResourceManager( const UMLRTMessage * msg );
     void transitionaction_____InitUSBBus__onPrintDriverTimeout( const UMLRTMessage * msg );
     void transitionaction_____InitUSBBus__onPrintResourceID( const UMLRTMessage * msg );
     void transitionaction_____InitUSBBus__onStorageResourceID( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/ComputerSystem.cc b/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
index 2ce13fc..b606402 100644
--- a/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
+++ b/models/samples/ComputerSystem/expected_src/ComputerSystem.cc
@@ -128,6 +128,22 @@
     #undef rtdata
 }
 
+void Capsule_ComputerSystem::exitaction_____WaitingForComputerInit( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::WaitingForComputerInit exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_ComputerSystem::exitaction_____WaitingForDeviceInit( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::ComputerSystem::WaitingForDeviceInit exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_ComputerSystem::transitionaction_____Failed( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -372,11 +388,13 @@
 
 void Capsule_ComputerSystem::actionchain_____incarnateDevices( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForComputerInit( msg );
     transitionaction_____incarnateDevices( msg );
 }
 
 void Capsule_ComputerSystem::actionchain_____incarnateUser( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForDeviceInit( msg );
     transitionaction_____incarnateUser( msg );
 }
 
diff --git a/models/samples/ComputerSystem/expected_src/ComputerSystem.hh b/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
index 2b34155..9681a24 100644
--- a/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
+++ b/models/samples/ComputerSystem/expected_src/ComputerSystem.hh
@@ -39,6 +39,8 @@
     void entryaction_____Running( const UMLRTMessage * msg );
     void entryaction_____WaitingForComputerInit( const UMLRTMessage * msg );
     void entryaction_____WaitingForDeviceInit( const UMLRTMessage * msg );
+    void exitaction_____WaitingForComputerInit( const UMLRTMessage * msg );
+    void exitaction_____WaitingForDeviceInit( const UMLRTMessage * msg );
     void transitionaction_____Failed( const UMLRTMessage * msg );
     void transitionaction_____Success( const UMLRTMessage * msg );
     void transitionaction_____compTimerFail( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc b/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
index 2560094..a7e4679 100644
--- a/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
+++ b/models/samples/ComputerSystem/expected_src/ExtMassStorage.cc
@@ -86,6 +86,14 @@
 
 
 
+void Capsule_ExtMassStorage::entryaction_____Connected( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage::Connected entry  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_ExtMassStorage::entryaction_____Disconnected( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -95,6 +103,22 @@
     #undef rtdata
 }
 
+void Capsule_ExtMassStorage::exitaction_____Connected( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage::Connected exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_ExtMassStorage::exitaction_____Disconnected( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::ExtMassStorage::Disconnected exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_ExtMassStorage::transitionaction_____Connect_Failed( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -245,10 +269,12 @@
 void Capsule_ExtMassStorage::actionchain_____Connected( const UMLRTMessage * msg )
 {
     transitionaction_____Connected( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_ExtMassStorage::actionchain_____Eject( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____Eject( msg );
     entryaction_____Disconnected( msg );
 }
@@ -260,17 +286,23 @@
 
 void Capsule_ExtMassStorage::actionchain_____onConnect( const UMLRTMessage * msg )
 {
+    exitaction_____Disconnected( msg );
     transitionaction_____onConnect( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_ExtMassStorage::actionchain_____onData( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____onData( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_ExtMassStorage::actionchain_____onEOD( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____onEOD( msg );
+    entryaction_____Connected( msg );
 }
 
 Capsule_ExtMassStorage::State Capsule_ExtMassStorage::choice_____connected_( const UMLRTMessage * msg )
diff --git a/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh b/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
index 615167a..c8ea221 100644
--- a/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
+++ b/models/samples/ComputerSystem/expected_src/ExtMassStorage.hh
@@ -56,7 +56,10 @@
     };
     const char * stateNames[3];
     State currentState;
+    void entryaction_____Connected( const UMLRTMessage * msg );
     void entryaction_____Disconnected( const UMLRTMessage * msg );
+    void exitaction_____Connected( const UMLRTMessage * msg );
+    void exitaction_____Disconnected( const UMLRTMessage * msg );
     void transitionaction_____Connect_Failed( const UMLRTMessage * msg );
     void transitionaction_____Connected( const UMLRTMessage * msg );
     void transitionaction_____Eject( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/LocalPrinter.cc b/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
index 2644275..349c127 100644
--- a/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
+++ b/models/samples/ComputerSystem/expected_src/LocalPrinter.cc
@@ -85,6 +85,14 @@
 
 
 
+void Capsule_LocalPrinter::entryaction_____Connected( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter::Connected entry  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_LocalPrinter::entryaction_____Disconnected( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -99,6 +107,24 @@
     #undef rtdata
 }
 
+void Capsule_LocalPrinter::exitaction_____Connected( const UMLRTMessage * msg )
+{
+    #define umlrtparam_data ( *(const void * *)msg->getParam( 0 ) )
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter::Connected exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_data
+}
+
+void Capsule_LocalPrinter::exitaction_____Disconnected( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Hardware::ExternalDevices::LocalPrinter::Disconnected exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_LocalPrinter::transitionaction_____MessageSent( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -231,6 +257,7 @@
 void Capsule_LocalPrinter::actionchain_____MessageSent( const UMLRTMessage * msg )
 {
     transitionaction_____MessageSent( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_LocalPrinter::actionchain_____MsgSendFail( const UMLRTMessage * msg )
@@ -246,21 +273,28 @@
 
 void Capsule_LocalPrinter::actionchain_____onConnect( const UMLRTMessage * msg )
 {
+    exitaction_____Disconnected( msg );
     transitionaction_____onConnect( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_LocalPrinter::actionchain_____onData( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____onData( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_LocalPrinter::actionchain_____onEOD( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____onEOD( msg );
+    entryaction_____Connected( msg );
 }
 
 void Capsule_LocalPrinter::actionchain_____onEject( const UMLRTMessage * msg )
 {
+    exitaction_____Connected( msg );
     transitionaction_____onEject( msg );
     entryaction_____Disconnected( msg );
 }
diff --git a/models/samples/ComputerSystem/expected_src/LocalPrinter.hh b/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
index 1d38e5b..4c1c4fe 100644
--- a/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
+++ b/models/samples/ComputerSystem/expected_src/LocalPrinter.hh
@@ -55,7 +55,10 @@
     };
     const char * stateNames[3];
     State currentState;
+    void entryaction_____Connected( const UMLRTMessage * msg );
     void entryaction_____Disconnected( const UMLRTMessage * msg );
+    void exitaction_____Connected( const UMLRTMessage * msg );
+    void exitaction_____Disconnected( const UMLRTMessage * msg );
     void transitionaction_____MessageSent( const UMLRTMessage * msg );
     void transitionaction_____MsgSendFail( const UMLRTMessage * msg );
     void transitionaction_____initialize( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/ResourceManager.cc b/models/samples/ComputerSystem/expected_src/ResourceManager.cc
index c1c2992..e98b958 100644
--- a/models/samples/ComputerSystem/expected_src/ResourceManager.cc
+++ b/models/samples/ComputerSystem/expected_src/ResourceManager.cc
@@ -151,6 +151,14 @@
     #undef rtdata
 }
 
+void Capsule_ResourceManager::exitaction_____WaitInitTimeout( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Computer::ResourceManager::WaitInitTimeout exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_ResourceManager::exitaction_____WaitingForRequest( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -443,6 +451,7 @@
 
 void Capsule_ResourceManager::actionchain_____onTimeout( const UMLRTMessage * msg )
 {
+    exitaction_____WaitInitTimeout( msg );
     transitionaction_____onTimeout( msg );
     entryaction_____WaitingForRequest( msg );
 }
diff --git a/models/samples/ComputerSystem/expected_src/ResourceManager.hh b/models/samples/ComputerSystem/expected_src/ResourceManager.hh
index 935d484..a7d6304 100644
--- a/models/samples/ComputerSystem/expected_src/ResourceManager.hh
+++ b/models/samples/ComputerSystem/expected_src/ResourceManager.hh
@@ -86,6 +86,7 @@
     void entryaction_____InitFail( const UMLRTMessage * msg );
     void entryaction_____WaitInitTimeout( const UMLRTMessage * msg );
     void entryaction_____WaitingForRequest( const UMLRTMessage * msg );
+    void exitaction_____WaitInitTimeout( const UMLRTMessage * msg );
     void exitaction_____WaitingForRequest( const UMLRTMessage * msg );
     void transitionaction_____NOK( const UMLRTMessage * msg );
     void transitionaction_____OK( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/User.cc b/models/samples/ComputerSystem/expected_src/User.cc
index e4f84e3..b3579bc 100644
--- a/models/samples/ComputerSystem/expected_src/User.cc
+++ b/models/samples/ComputerSystem/expected_src/User.cc
@@ -163,6 +163,30 @@
     #undef rtdata
 }
 
+void Capsule_User::exitaction_____Alive( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Alive exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_User::exitaction_____Waiting4DocPrint( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Waiting4DocPrint exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_User::exitaction_____Waiting4DocSave( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::System::User::Waiting4DocSave exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_User::transitionaction_____TransitionAction6( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -381,6 +405,7 @@
 
 void Capsule_User::actionchain_____TransitionAction10( const UMLRTMessage * msg )
 {
+    exitaction_____Waiting4DocPrint( msg );
     entryaction_____TestDone( msg );
 }
 
@@ -438,16 +463,19 @@
 
 void Capsule_User::actionchain_____onTimeout1( const UMLRTMessage * msg )
 {
+    exitaction_____Alive( msg );
     transitionaction_____onTimeout1( msg );
 }
 
 void Capsule_User::actionchain_____onTimeout2( const UMLRTMessage * msg )
 {
+    exitaction_____Waiting4DocSave( msg );
     transitionaction_____onTimeout2( msg );
 }
 
 void Capsule_User::actionchain_____onTimeout3( const UMLRTMessage * msg )
 {
+    exitaction_____Waiting4DocPrint( msg );
     entryaction_____FAILED( msg );
 }
 
diff --git a/models/samples/ComputerSystem/expected_src/User.hh b/models/samples/ComputerSystem/expected_src/User.hh
index 6fe2bf5..2d0352a 100644
--- a/models/samples/ComputerSystem/expected_src/User.hh
+++ b/models/samples/ComputerSystem/expected_src/User.hh
@@ -65,6 +65,9 @@
     void entryaction_____TestDone( const UMLRTMessage * msg );
     void entryaction_____Waiting4DocPrint( const UMLRTMessage * msg );
     void entryaction_____Waiting4DocSave( const UMLRTMessage * msg );
+    void exitaction_____Alive( const UMLRTMessage * msg );
+    void exitaction_____Waiting4DocPrint( const UMLRTMessage * msg );
+    void exitaction_____Waiting4DocSave( const UMLRTMessage * msg );
     void transitionaction_____TransitionAction6( const UMLRTMessage * msg );
     void transitionaction_____TransitionAction7( const UMLRTMessage * msg );
     void transitionaction_____TransitionAction8( const UMLRTMessage * msg );
diff --git a/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc b/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
index af82b42..f9d2c2e 100644
--- a/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
+++ b/models/samples/ComputerSystem/expected_src/WordProcessorApp.cc
@@ -152,6 +152,14 @@
     return history[compositeState] == subState;
 }
 
+void Capsule_WordProcessorApp::entryaction_____Printing__Printing( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing::Printing entry  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_WordProcessorApp::entryaction_____Printing__boundary( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -180,6 +188,14 @@
     #undef rtdata
 }
 
+void Capsule_WordProcessorApp::entryaction_____Saving__Saving( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving::Saving entry  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_WordProcessorApp::entryaction_____Saving__WaitForStorage( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -222,6 +238,68 @@
     #undef rtdata
 }
 
+void Capsule_WordProcessorApp::exitaction_____Printing__Printing( const UMLRTMessage * msg )
+{
+    #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
+    #define rtdata ( (int *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing::Printing exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_percent
+}
+
+void Capsule_WordProcessorApp::exitaction_____Printing__boundary( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    #undef rtdata
+}
+
+void Capsule_WordProcessorApp::exitaction_____Printing__waitForPrinter( const UMLRTMessage * msg )
+{
+    #define umlrtparam_resourceID ( *(const UMLRTCapsuleId * )msg->getParam( 0 ) )
+    #define rtdata ( (const UMLRTCapsuleId * )msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Printing::waitForPrinter exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_resourceID
+}
+
+void Capsule_WordProcessorApp::exitaction_____Saving__Saving( const UMLRTMessage * msg )
+{
+    #define umlrtparam_percent ( *(int *)msg->getParam( 0 ) )
+    #define rtdata ( (int *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving::Saving exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_percent
+}
+
+void Capsule_WordProcessorApp::exitaction_____Saving__WaitForStorage( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::Saving::WaitForStorage exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
+void Capsule_WordProcessorApp::exitaction_____Saving__boundary( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    #undef rtdata
+}
+
+void Capsule_WordProcessorApp::exitaction_____WaitingForCommand( const UMLRTMessage * msg )
+{
+    #define umlrtparam_fileName ( *(const char * *)msg->getParam( 0 ) )
+    #define umlrtparam_data ( *(const void * *)msg->getParam( 1 ) )
+    #define rtdata ( (char *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/ComputerSystem/ComputerSystem.uml ComputerSystem::Software::WordProcessorApp::WaitingForCommand exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+    #undef umlrtparam_data
+    #undef umlrtparam_fileName
+}
+
 void Capsule_WordProcessorApp::transitionaction_____Initial( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -778,6 +856,11 @@
     transitionaction_____Printing__TransitionAction8( msg );
 }
 
+void Capsule_WordProcessorApp::actionchain_____Printing__TransitionAction9( const UMLRTMessage * msg )
+{
+    entryaction_____Printing__Printing( msg );
+}
+
 void Capsule_WordProcessorApp::actionchain_____Printing__getPrinter( const UMLRTMessage * msg )
 {
     transitionaction_____Printing__getPrinter( msg );
@@ -799,6 +882,11 @@
     entryaction_____Printing__waitForPrinter( msg );
 }
 
+void Capsule_WordProcessorApp::actionchain_____Printing__new_transition_2( const UMLRTMessage * msg )
+{
+    entryaction_____Printing__Printing( msg );
+}
+
 void Capsule_WordProcessorApp::actionchain_____Printing__new_transition_3_to_boundary( const UMLRTMessage * msg )
 {
     entryaction_____Printing__boundary( msg );
@@ -806,18 +894,21 @@
 
 void Capsule_WordProcessorApp::actionchain_____Printing__onPrintResource( const UMLRTMessage * msg )
 {
+    exitaction_____Printing__waitForPrinter( msg );
     transitionaction_____Printing__onPrintResource( msg );
     save_history( Printing, Printing__waitForPrinter );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Printing__onPrintStatus( const UMLRTMessage * msg )
 {
+    exitaction_____Printing__Printing( msg );
     transitionaction_____Printing__onPrintStatus( msg );
     save_history( Printing, Printing__Printing );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Printing__onResNotAvail( const UMLRTMessage * msg )
 {
+    exitaction_____Printing__waitForPrinter( msg );
     transitionaction_____Printing__onResNotAvail( msg );
     save_history( Printing, Printing__waitForPrinter );
 }
@@ -830,6 +921,7 @@
 void Capsule_WordProcessorApp::actionchain_____Printing__printPrintProgress( const UMLRTMessage * msg )
 {
     transitionaction_____Printing__printPrintProgress( msg );
+    entryaction_____Printing__Printing( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Saving__getStorage( const UMLRTMessage * msg )
@@ -853,11 +945,21 @@
     transitionaction_____Saving__isNOK( msg );
 }
 
+void Capsule_WordProcessorApp::actionchain_____Saving__isOK( const UMLRTMessage * msg )
+{
+    entryaction_____Saving__Saving( msg );
+}
+
 void Capsule_WordProcessorApp::actionchain_____Saving__new_transition_4( const UMLRTMessage * msg )
 {
     entryaction_____Saving__WaitForStorage( msg );
 }
 
+void Capsule_WordProcessorApp::actionchain_____Saving__new_transition_5( const UMLRTMessage * msg )
+{
+    entryaction_____Saving__Saving( msg );
+}
+
 void Capsule_WordProcessorApp::actionchain_____Saving__new_transition_6_to_boundary( const UMLRTMessage * msg )
 {
     entryaction_____Saving__boundary( msg );
@@ -865,18 +967,21 @@
 
 void Capsule_WordProcessorApp::actionchain_____Saving__onResNotAvail( const UMLRTMessage * msg )
 {
+    exitaction_____Saving__WaitForStorage( msg );
     transitionaction_____Saving__onResNotAvail( msg );
     save_history( Saving, Saving__WaitForStorage );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Saving__onSaveStatus( const UMLRTMessage * msg )
 {
+    exitaction_____Saving__Saving( msg );
     transitionaction_____Saving__onSaveStatus( msg );
     save_history( Saving, Saving__Saving );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Saving__onStorageResource( const UMLRTMessage * msg )
 {
+    exitaction_____Saving__WaitForStorage( msg );
     transitionaction_____Saving__onStorageResource( msg );
     save_history( Saving, Saving__WaitForStorage );
 }
@@ -884,6 +989,7 @@
 void Capsule_WordProcessorApp::actionchain_____Saving__printSaveProgress( const UMLRTMessage * msg )
 {
     transitionaction_____Saving__printSaveProgress( msg );
+    entryaction_____Saving__Saving( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____Saving__saveCompleted( const UMLRTMessage * msg )
@@ -893,46 +999,54 @@
 
 void Capsule_WordProcessorApp::actionchain_____StorageNotAvailable( const UMLRTMessage * msg )
 {
+    exitaction_____Saving__boundary( msg );
     entryaction_____WaitingForCommand( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____onAddToDoc( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForCommand( msg );
     transitionaction_____onAddToDoc( msg );
     entryaction_____WaitingForCommand( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____onCreateDoc( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForCommand( msg );
     transitionaction_____onCreateDoc( msg );
     entryaction_____WaitingForCommand( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____onPrintDocument( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForCommand( msg );
     transitionaction_____onPrintDocument( msg );
     entryaction_____Printing__boundary( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____onSaveDocument( const UMLRTMessage * msg )
 {
+    exitaction_____WaitingForCommand( msg );
     transitionaction_____onSaveDocument( msg );
     entryaction_____Saving__boundary( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____printComplete_cont( const UMLRTMessage * msg )
 {
+    exitaction_____Printing__boundary( msg );
     transitionaction_____printComplete_cont( msg );
     entryaction_____WaitingForCommand( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____printerUnavailable( const UMLRTMessage * msg )
 {
+    exitaction_____Printing__boundary( msg );
     entryaction_____WaitingForCommand( msg );
 }
 
 void Capsule_WordProcessorApp::actionchain_____saveComplete_cont( const UMLRTMessage * msg )
 {
+    exitaction_____Saving__boundary( msg );
     transitionaction_____saveComplete_cont( msg );
     entryaction_____WaitingForCommand( msg );
 }
@@ -996,7 +1110,10 @@
         return Printing__waitForPrinter;
     }
     else if( check_history( Printing, Printing__Printing ) )
+    {
+        actionchain_____Printing__new_transition_2( msg );
         return Printing__Printing;
+    }
     else if( check_history( Printing, SPECIAL_INTERNAL_STATE_UNVISITED ) )
     {
         actionchain_____Printing__new_transition_3_to_boundary( msg );
@@ -1028,7 +1145,10 @@
         return junction_____Printing__ExitPoint1( msg );
     }
     else if( action_____Printing__TransitionAction9__statusOK( msg ) )
+    {
+        actionchain_____Printing__TransitionAction9( msg );
         return Printing__Printing;
+    }
     return currentState;
 }
 
@@ -1055,7 +1175,10 @@
         return Saving__WaitForStorage;
     }
     else if( check_history( Saving, Saving__Saving ) )
+    {
+        actionchain_____Saving__new_transition_5( msg );
         return Saving__Saving;
+    }
     else if( check_history( Saving, SPECIAL_INTERNAL_STATE_UNVISITED ) )
     {
         actionchain_____Saving__new_transition_6_to_boundary( msg );
@@ -1082,7 +1205,10 @@
 Capsule_WordProcessorApp::State Capsule_WordProcessorApp::choice_____Saving__saveOK( const UMLRTMessage * msg )
 {
     if( action_____Saving__isOK__isOK( msg ) )
+    {
+        actionchain_____Saving__isOK( msg );
         return Saving__Saving;
+    }
     else if( action_____Saving__isNOK__statusNOK( msg ) )
     {
         actionchain_____Saving__isNOK( msg );
diff --git a/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh b/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
index 73f593c..1475a5c 100644
--- a/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
+++ b/models/samples/ComputerSystem/expected_src/WordProcessorApp.hh
@@ -90,11 +90,20 @@
     State history[2];
     void save_history( State compositeState, State subState );
     bool check_history( State compositeState, State subState );
+    void entryaction_____Printing__Printing( const UMLRTMessage * msg );
     void entryaction_____Printing__boundary( const UMLRTMessage * msg );
     void entryaction_____Printing__waitForPrinter( const UMLRTMessage * msg );
+    void entryaction_____Saving__Saving( const UMLRTMessage * msg );
     void entryaction_____Saving__WaitForStorage( const UMLRTMessage * msg );
     void entryaction_____Saving__boundary( const UMLRTMessage * msg );
     void entryaction_____WaitingForCommand( const UMLRTMessage * msg );
+    void exitaction_____Printing__Printing( const UMLRTMessage * msg );
+    void exitaction_____Printing__boundary( const UMLRTMessage * msg );
+    void exitaction_____Printing__waitForPrinter( const UMLRTMessage * msg );
+    void exitaction_____Saving__Saving( const UMLRTMessage * msg );
+    void exitaction_____Saving__WaitForStorage( const UMLRTMessage * msg );
+    void exitaction_____Saving__boundary( const UMLRTMessage * msg );
+    void exitaction_____WaitingForCommand( const UMLRTMessage * msg );
     void transitionaction_____Initial( const UMLRTMessage * msg );
     void transitionaction_____Printing__TransitionAction8( const UMLRTMessage * msg );
     void transitionaction_____Printing__getPrinter( const UMLRTMessage * msg );
@@ -134,10 +143,12 @@
     bool action_____Saving__saveCompleted__progress_GTE_100( const UMLRTMessage * msg );
     void actionchain_____Initial( const UMLRTMessage * msg );
     void actionchain_____Printing__TransitionAction8( const UMLRTMessage * msg );
+    void actionchain_____Printing__TransitionAction9( const UMLRTMessage * msg );
     void actionchain_____Printing__getPrinter( const UMLRTMessage * msg );
     void actionchain_____Printing__importNOK( const UMLRTMessage * msg );
     void actionchain_____Printing__importOK( const UMLRTMessage * msg );
     void actionchain_____Printing__new_transition_1( const UMLRTMessage * msg );
+    void actionchain_____Printing__new_transition_2( const UMLRTMessage * msg );
     void actionchain_____Printing__new_transition_3_to_boundary( const UMLRTMessage * msg );
     void actionchain_____Printing__onPrintResource( const UMLRTMessage * msg );
     void actionchain_____Printing__onPrintStatus( const UMLRTMessage * msg );
@@ -148,7 +159,9 @@
     void actionchain_____Saving__importNOK( const UMLRTMessage * msg );
     void actionchain_____Saving__importOK( const UMLRTMessage * msg );
     void actionchain_____Saving__isNOK( const UMLRTMessage * msg );
+    void actionchain_____Saving__isOK( const UMLRTMessage * msg );
     void actionchain_____Saving__new_transition_4( const UMLRTMessage * msg );
+    void actionchain_____Saving__new_transition_5( const UMLRTMessage * msg );
     void actionchain_____Saving__new_transition_6_to_boundary( const UMLRTMessage * msg );
     void actionchain_____Saving__onResNotAvail( const UMLRTMessage * msg );
     void actionchain_____Saving__onSaveStatus( const UMLRTMessage * msg );
diff --git a/models/tests/executable/PingPong/expected_src/CMakeLists.txt b/models/tests/executable/PingPong/expected_src/CMakeLists.txt
index 93fac21..4744fbe 100644
--- a/models/tests/executable/PingPong/expected_src/CMakeLists.txt
+++ b/models/tests/executable/PingPong/expected_src/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Generated 2016-08-31 13:18:28
+# Generated 2016-09-29 13:07:04
 
 cmake_minimum_required(VERSION 2.8.7)
 set(TARGET TopMain)
diff --git a/models/tests/executable/PingPong/expected_src/Pinger.cc b/models/tests/executable/PingPong/expected_src/Pinger.cc
index 316ded1..9a60773 100644
--- a/models/tests/executable/PingPong/expected_src/Pinger.cc
+++ b/models/tests/executable/PingPong/expected_src/Pinger.cc
@@ -95,6 +95,14 @@
     #undef rtdata
 }
 
+void Capsule_Pinger::exitaction_____Playing( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Pinger::Playing exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_Pinger::transitionaction_____onPong( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -111,6 +119,7 @@
 
 void Capsule_Pinger::actionchain_____onPong( const UMLRTMessage * msg )
 {
+    exitaction_____Playing( msg );
     transitionaction_____onPong( msg );
     entryaction_____Playing( msg );
 }
diff --git a/models/tests/executable/PingPong/expected_src/Pinger.hh b/models/tests/executable/PingPong/expected_src/Pinger.hh
index d0fa7a6..ac122f5 100644
--- a/models/tests/executable/PingPong/expected_src/Pinger.hh
+++ b/models/tests/executable/PingPong/expected_src/Pinger.hh
@@ -45,6 +45,7 @@
     const char * stateNames[2];
     State currentState;
     void entryaction_____Playing( const UMLRTMessage * msg );
+    void exitaction_____Playing( const UMLRTMessage * msg );
     void transitionaction_____onPong( const UMLRTMessage * msg );
     void actionchain_____Initial( const UMLRTMessage * msg );
     void actionchain_____onPong( const UMLRTMessage * msg );
diff --git a/models/tests/executable/PingPong/expected_src/Ponger.cc b/models/tests/executable/PingPong/expected_src/Ponger.cc
index e6a8530..8285107 100644
--- a/models/tests/executable/PingPong/expected_src/Ponger.cc
+++ b/models/tests/executable/PingPong/expected_src/Ponger.cc
@@ -94,6 +94,14 @@
     #undef rtdata
 }
 
+void Capsule_Ponger::exitaction_____Playing( const UMLRTMessage * msg )
+{
+    #define rtdata ( (void *)msg->getParam( 0 ) )
+    /* UMLRTGEN-USERREGION-BEGIN platform:/resource/PingPong/PingPong.uml PingPong::Ponger::Playing exit  */
+    /* UMLRTGEN-USERREGION-END */
+    #undef rtdata
+}
+
 void Capsule_Ponger::transitionaction_____onPing( const UMLRTMessage * msg )
 {
     #define rtdata ( (void *)msg->getParam( 0 ) )
@@ -111,6 +119,7 @@
 
 void Capsule_Ponger::actionchain_____onPing( const UMLRTMessage * msg )
 {
+    exitaction_____Playing( msg );
     transitionaction_____onPing( msg );
     entryaction_____Playing( msg );
 }
diff --git a/models/tests/executable/PingPong/expected_src/Ponger.hh b/models/tests/executable/PingPong/expected_src/Ponger.hh
index a964c2b..aa78ede 100644
--- a/models/tests/executable/PingPong/expected_src/Ponger.hh
+++ b/models/tests/executable/PingPong/expected_src/Ponger.hh
@@ -45,6 +45,7 @@
     const char * stateNames[2];
     State currentState;
     void entryaction_____Playing( const UMLRTMessage * msg );
+    void exitaction_____Playing( const UMLRTMessage * msg );
     void transitionaction_____onPing( const UMLRTMessage * msg );
     void actionchain_____Initial( const UMLRTMessage * msg );
     void actionchain_____onPing( const UMLRTMessage * msg );
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 695b78d..20493b9 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
@@ -76,11 +76,15 @@
 	public void generateUserCode(AbstractFunction func, Parameter msg, ParameterSet params, UserCode userCode, String userRegionIdentifier) {
 		List<Macro> paramMacros = params.generateDefinitions(func, msg);
 
-		func.add(new Comment(false, userRegionIdentifier));
+		if (userRegionIdentifier != null && !userRegionIdentifier.isEmpty()) {
+			func.add(new Comment(false, userRegionIdentifier));
+		}
 
 		func.add(userCode);
 
-		func.add(new Comment(false, UserEditableRegion.userEditEnd()));
+		if (userRegionIdentifier != null && !userRegionIdentifier.isEmpty()) {
+			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) {
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
index 82f32eb..df94984 100644
--- 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
@@ -22,6 +22,7 @@
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.common.util.UML2Util;
 
 /**
  * User edit region utility class.
@@ -145,9 +146,11 @@
 
 	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()
+		// If the URI is empty, the element is not in the original model and therefore there should be no
+		// identifying String and the function does not have a user-editable region.
+		if (UML2Util.isEmpty(uriString)) {
+			return "";
+		} else if (qname == null || qname.isEmpty()
 				|| type == null || type.isEmpty()) {
 			throw new IllegalArgumentException("Valid strings required for all identifying attributes"); //$NON-NLS-1$
 		}
diff --git a/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/META-INF/MANIFEST.MF b/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/META-INF/MANIFEST.MF
index ae960a7..9b2c7a0 100644
--- a/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/META-INF/MANIFEST.MF
+++ b/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/META-INF/MANIFEST.MF
@@ -5,10 +5,11 @@
 Bundle-Version: 0.7.2.qualifier
 Bundle-Vendor: Zeligsoft (2009) Ltd.
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Require-Bundle: org.eclipse.papyrusrt.xtumlrt.common.model;bundle-version="0.7.2",
+Require-Bundle: org.eclipse.papyrusrt.xtumlrt.external;bundle-version="0.7.2",
+ org.eclipse.papyrusrt.xtumlrt.common.model;bundle-version="0.7.2",
+ org.eclipse.papyrusrt.xtumlrt.statemach.ext.model;bundle-version="0.7.2",
  org.eclipse.papyrusrt.xtumlrt.umlrt.model;bundle-version="0.7.2",
- org.eclipse.xtend.lib;bundle-version="2.9.1",
  org.eclipse.papyrusrt.xtumlrt.util;bundle-version="0.7.2",
- org.eclipse.papyrusrt.xtumlrt.external;bundle-version="0.7.2"
+ org.eclipse.xtend.lib;bundle-version="2.9.1"
 Export-Package: org.eclipse.papyrusrt.xtumlrt.trans,
  org.eclipse.papyrusrt.xtumlrt.trans.preproc
diff --git a/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/src/org/eclipse/papyrusrt/xtumlrt/trans/preproc/StateMachineDefaultsPreprocessor.xtend b/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/src/org/eclipse/papyrusrt/xtumlrt/trans/preproc/StateMachineDefaultsPreprocessor.xtend
index 905d469..9965b01 100644
--- a/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/src/org/eclipse/papyrusrt/xtumlrt/trans/preproc/StateMachineDefaultsPreprocessor.xtend
+++ b/plugins/xtumlrt/trans/org.eclipse.papyrusrt.xtumlrt.trans/src/org/eclipse/papyrusrt/xtumlrt/trans/preproc/StateMachineDefaultsPreprocessor.xtend
@@ -24,6 +24,7 @@
 import org.eclipse.papyrusrt.xtumlrt.statemach.JunctionPoint
 import org.eclipse.papyrusrt.xtumlrt.statemach.EntryPoint
 import org.eclipse.papyrusrt.xtumlrt.statemach.ExitPoint
+import org.eclipse.papyrusrt.xtumlrt.statemachext.StatemachextFactory
 
 class StateMachineDefaultsPreprocessor implements Transformation<StateMachine, StateMachine>
 {
@@ -36,7 +37,7 @@
     var entryPointCounter = 0
     var exitPointCounter = 0
 
-    @Accessors boolean createEmptyActions = false
+    @Accessors boolean createEmptyActions = true
     @Accessors boolean createDefaultGuards = false
     
     override transform( StateMachine input, TransformationContext context )
@@ -67,14 +68,14 @@
         {
             if (state.entryAction === null)
             {
-                val newAction = CommonFactory.eINSTANCE.createActionCode
+                val newAction = StatemachextFactory.eINSTANCE.createEntryAction
                 newAction.name = GlobalConstants.ENTRY_ACTION_BASE_NAME + entryActionCounter++
                 newAction.source = ""
                 state.entryAction = newAction
             }
             if (state.exitAction === null)
             {
-                val newAction = CommonFactory.eINSTANCE.createActionCode
+                val newAction = StatemachextFactory.eINSTANCE.createExitAction
                 newAction.name = GlobalConstants.EXIT_ACTION_BASE_NAME + exitActionCounter++
                 newAction.source = ""
                 state.exitAction = newAction