diff --git a/build/.gitkeep b/build/.gitkeep
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/scenarios/StatechartExecutionExample/StatechartExecutionExample.scx b/scenarios/StatechartExecutionExample/StatechartExecutionExample.scx
index b0a3cf88166b025794e7678e0fd31958f5dc2ac6..29963225558cea0f44e594ec1042a25097b028f9 100644
--- a/scenarios/StatechartExecutionExample/StatechartExecutionExample.scx
+++ b/scenarios/StatechartExecutionExample/StatechartExecutionExample.scx
@@ -2,9 +2,9 @@
 <scenario name="StatechartExecutionExample" creation="2019-12-12.10:48:36" globalConfigName="./config/global.cfg" package="RobotAPI" deploymentType="local" nodeName="NodeMain">
 	<application name="ConditionHandler" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/>
 	<application name="SystemObserver" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/>
-	<application name="SimpleStatechartExecutorApp" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/>
 	<application name="XMLRemoteStateOfferer" instance="StatechartExecutionGroup" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/>
 	<application name="RemoteGuiProviderApp" instance="" package="ArmarXGui" nodeName="" enabled="true" iceAutoRestart="false"/>
 	<application name="StatechartExecutorExampleApp" instance="" package="RobotAPI" nodeName="" enabled="true" iceAutoRestart="false"/>
+	<application name="StatechartExecutorApp" instance="" package="ArmarXCore" nodeName="" enabled="true" iceAutoRestart="false"/>
 </scenario>
 
diff --git a/scenarios/StatechartExecutionExample/config/StatechartExecutorApp.cfg b/scenarios/StatechartExecutionExample/config/StatechartExecutorApp.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..bd0d6a6c74027707fad6ebd29a062c21a4e01a70
--- /dev/null
+++ b/scenarios/StatechartExecutionExample/config/StatechartExecutorApp.cfg
@@ -0,0 +1,196 @@
+# ==================================================================
+# StatechartExecutorApp properties
+# ==================================================================
+
+# ArmarX.AdditionalPackages:  List of additional ArmarX packages which should be in the list of default packages. If you have custom packages, which should be found by the gui or other apps, specify them here. Comma separated List.
+#  Attributes:
+#  - Default:            Default value not mapped.
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.AdditionalPackages = Default value not mapped.
+
+
+# ArmarX.ApplicationName:  Application name
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.ApplicationName = ""
+
+
+# ArmarX.CachePath:  Path for cache files. If relative path AND env. variable ARMARX_USER_CONFIG_DIR is set, the cache path will be made relative to ARMARX_USER_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${HOME}/.armarx)
+#  Attributes:
+#  - Default:            mongo/.cache
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.CachePath = mongo/.cache
+
+
+# ArmarX.Config:  Comma-separated list of configuration files 
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.Config = ""
+
+
+# ArmarX.DataPath:  Semicolon-separated search list for data files
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DataPath = ""
+
+
+# ArmarX.DefaultPackages:  List of ArmarX packages which are accessible by default. Comma separated List. If you want to add your own packages and use all default ArmarX packages, use the property 'AdditionalPackages'.
+#  Attributes:
+#  - Default:            Default value not mapped.
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DefaultPackages = Default value not mapped.
+
+
+# ArmarX.DependenciesConfig:  Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited.
+#  Attributes:
+#  - Default:            ./config/dependencies.cfg
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DependenciesConfig = ./config/dependencies.cfg
+
+
+# ArmarX.DisableLogging:  Turn logging off in whole application
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.DisableLogging = false
+
+
+# ArmarX.EnableProfiling:  Enable profiling of CPU load produced by this application
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.EnableProfiling = false
+
+
+# ArmarX.LoadLibraries:  Libraries to load at start up of the application. Must be enabled by the Application with enableLibLoading(). Format: PackageName:LibraryName;... or /absolute/path/to/library;...
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.LoadLibraries = ""
+
+
+# ArmarX.LoggingGroup:  The logging group is transmitted with every ArmarX log message over Ice in order to group the message in the GUI.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.LoggingGroup = ""
+
+
+# ArmarX.RedirectStdout:  Redirect std::cout and std::cerr to ArmarXLog
+#  Attributes:
+#  - Default:            true
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.RedirectStdout = true
+
+
+# ArmarX.RemoteHandlesDeletionTimeout:  The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles)
+#  Attributes:
+#  - Default:            3000
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.RemoteHandlesDeletionTimeout = 3000
+
+
+# ArmarX.SecondsStartupDelay:  The startup will be delayed by this number of seconds (useful for debugging)
+#  Attributes:
+#  - Default:            0
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.SecondsStartupDelay = 0
+
+
+# ArmarX.StartDebuggerOnCrash:  If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger.
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.StartDebuggerOnCrash = false
+
+
+# ArmarX.StatechartExecutor.EnableProfiling:  enable profiler which is used for logging performance events
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.StatechartExecutor.EnableProfiling = false
+
+
+# ArmarX.StatechartExecutor.MinimumLoggingLevel:  Local logging level only for this component
+#  Attributes:
+#  - Default:            Undefined
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning}
+# ArmarX.StatechartExecutor.MinimumLoggingLevel = Undefined
+
+
+# ArmarX.StatechartExecutor.ObjectName:  Name of IceGrid well-known object
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.StatechartExecutor.ObjectName = ""
+
+
+# ArmarX.StatechartExecutor.PackagesForVariantLibraries:  Comma-seperated list of packages that are used for loading nessecary libraries for used variants
+#  Attributes:
+#  - Default:            ArmarXCore, ArmarXGui, RobotAPI
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.StatechartExecutor.PackagesForVariantLibraries = ArmarXCore, ArmarXGui, RobotAPI
+
+
+# ArmarX.ThreadPoolSize:  Size of the ArmarX ThreadPool that is always running.
+#  Attributes:
+#  - Default:            1
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.ThreadPoolSize = 1
+
+
+# ArmarX.TopicSuffix:  Suffix appended to all topic names for outgoing topics. This is mainly used to direct all topics to another name for TopicReplaying purposes.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.TopicSuffix = ""
+
+
+# ArmarX.UseTimeServer:  Enable using a global Timeserver (e.g. from ArmarXSimulator)
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.UseTimeServer = false
+
+
+# ArmarX.Verbosity:  Global logging level for whole application
+#  Attributes:
+#  - Default:            Info
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning}
+# ArmarX.Verbosity = Info
+
+
diff --git a/scenarios/StatechartExecutionExample/config/StatechartExecutorExampleApp.cfg b/scenarios/StatechartExecutionExample/config/StatechartExecutorExampleApp.cfg
index d939b0aee078721b7653117a5b37aa0ea8917b2b..a1cf04dd485a05beb64a529210391a6a5d20151a 100644
--- a/scenarios/StatechartExecutionExample/config/StatechartExecutorExampleApp.cfg
+++ b/scenarios/StatechartExecutionExample/config/StatechartExecutorExampleApp.cfg
@@ -141,7 +141,7 @@
 #  - Case sensitivity:   yes
 #  - Required:           no
 #  - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning}
-# ArmarX.StatechartExecutorExample.MinimumLoggingLevel = Undefined
+ArmarX.StatechartExecutorExample.MinimumLoggingLevel = Debug
 
 
 # ArmarX.StatechartExecutorExample.ObjectName:  Name of IceGrid well-known object
diff --git a/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartExecutionGroup.cfg b/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartExecutionGroup.cfg
index 6d16fcc6d827c51f6fdc9b100fbb25006e31358d..601131ac419912622b10429f67bca047625a301c 100644
--- a/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartExecutionGroup.cfg
+++ b/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartExecutionGroup.cfg
@@ -199,7 +199,7 @@ ArmarX.XMLStateComponent.ObjectName = StatechartExecutionGroupXMLStateComponent
 #  - Default:            ""
 #  - Case sensitivity:   yes
 #  - Required:           no
-ArmarX.XMLStateComponent.StatesToEnter = StatechartExecution
+# ArmarX.XMLStateComponent.StatesToEnter = ""
 
 
 # ArmarX.XMLStateComponent.XMLRemoteStateOffererName:  Name of the RemoteStateOfferer to start. The default name is [StatechartGroupName]RemoteStateOfferer.
diff --git a/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartProfilesTestGroup.cfg b/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartProfilesTestGroup.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..72aae6f42825f04c6f955fbf33326852a723be6b
--- /dev/null
+++ b/scenarios/StatechartExecutionExample/config/XMLRemoteStateOfferer.StatechartProfilesTestGroup.cfg
@@ -0,0 +1,227 @@
+# ==================================================================
+# XMLRemoteStateOfferer properties
+# ==================================================================
+
+# ArmarX.AdditionalPackages:  List of additional ArmarX packages which should be in the list of default packages. If you have custom packages, which should be found by the gui or other apps, specify them here. Comma separated List.
+#  Attributes:
+#  - Default:            Default value not mapped.
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.AdditionalPackages = Default value not mapped.
+
+
+# ArmarX.ApplicationName:  Application name
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.ApplicationName = ""
+
+
+# ArmarX.CachePath:  Path for cache files. If relative path AND env. variable ARMARX_USER_CONFIG_DIR is set, the cache path will be made relative to ARMARX_USER_CONFIG_DIR. Otherwise if relative it will be relative to the default ArmarX config dir (${HOME}/.armarx)
+#  Attributes:
+#  - Default:            mongo/.cache
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.CachePath = mongo/.cache
+
+
+# ArmarX.Config:  Comma-separated list of configuration files 
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.Config = ""
+
+
+# ArmarX.DataPath:  Semicolon-separated search list for data files
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DataPath = ""
+
+
+# ArmarX.DefaultPackages:  List of ArmarX packages which are accessible by default. Comma separated List. If you want to add your own packages and use all default ArmarX packages, use the property 'AdditionalPackages'.
+#  Attributes:
+#  - Default:            Default value not mapped.
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DefaultPackages = Default value not mapped.
+
+
+# ArmarX.DependenciesConfig:  Path to the (usually generated) config file containing all data paths of all dependent projects. This property usually does not need to be edited.
+#  Attributes:
+#  - Default:            ./config/dependencies.cfg
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.DependenciesConfig = ./config/dependencies.cfg
+
+
+# ArmarX.DisableLogging:  Turn logging off in whole application
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.DisableLogging = false
+
+
+# ArmarX.EnableProfiling:  Enable profiling of CPU load produced by this application
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.EnableProfiling = false
+
+
+# ArmarX.LoadLibraries:  Libraries to load at start up of the application. Must be enabled by the Application with enableLibLoading(). Format: PackageName:LibraryName;... or /absolute/path/to/library;...
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.LoadLibraries = ""
+
+
+# ArmarX.LoggingGroup:  The logging group is transmitted with every ArmarX log message over Ice in order to group the message in the GUI.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.LoggingGroup = ""
+
+
+# ArmarX.RedirectStdout:  Redirect std::cout and std::cerr to ArmarXLog
+#  Attributes:
+#  - Default:            true
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.RedirectStdout = true
+
+
+# ArmarX.RemoteHandlesDeletionTimeout:  The timeout (in ms) before a remote handle deletes the managed object after the use count reached 0. This time can be used by a client to increment the count again (may be required when transmitting remote handles)
+#  Attributes:
+#  - Default:            3000
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.RemoteHandlesDeletionTimeout = 3000
+
+
+# ArmarX.SecondsStartupDelay:  The startup will be delayed by this number of seconds (useful for debugging)
+#  Attributes:
+#  - Default:            0
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.SecondsStartupDelay = 0
+
+
+# ArmarX.StartDebuggerOnCrash:  If this application crashes (segmentation fault) qtcreator will attach to this process and start the debugger.
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.StartDebuggerOnCrash = false
+
+
+# ArmarX.ThreadPoolSize:  Size of the ArmarX ThreadPool that is always running.
+#  Attributes:
+#  - Default:            1
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.ThreadPoolSize = 1
+
+
+# ArmarX.TopicSuffix:  Suffix appended to all topic names for outgoing topics. This is mainly used to direct all topics to another name for TopicReplaying purposes.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.TopicSuffix = ""
+
+
+# ArmarX.UseTimeServer:  Enable using a global Timeserver (e.g. from ArmarXSimulator)
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.UseTimeServer = false
+
+
+# ArmarX.Verbosity:  Global logging level for whole application
+#  Attributes:
+#  - Default:            Info
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning}
+# ArmarX.Verbosity = Info
+
+
+# ArmarX.XMLStateComponent.EnableProfiling:  enable profiler which is used for logging performance events
+#  Attributes:
+#  - Default:            false
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {0, 1, false, no, true, yes}
+# ArmarX.XMLStateComponent.EnableProfiling = false
+
+
+# ArmarX.XMLStateComponent.MinimumLoggingLevel:  Local logging level only for this component
+#  Attributes:
+#  - Default:            Undefined
+#  - Case sensitivity:   yes
+#  - Required:           no
+#  - Possible values: {Debug, Error, Fatal, Important, Info, Undefined, Verbose, Warning}
+# ArmarX.XMLStateComponent.MinimumLoggingLevel = Undefined
+
+
+# ArmarX.XMLStateComponent.ObjectName:  Name of IceGrid well-known object
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+ArmarX.XMLStateComponent.ObjectName = StatechartProfilesTestGroupXMLStateComponent
+
+
+# ArmarX.XMLStateComponent.StateReportingTopic:  Topic on which state changes are published. Leave empty to disable reporting.
+#  Attributes:
+#  - Default:            StateReportingTopic
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.XMLStateComponent.StateReportingTopic = StateReportingTopic
+
+
+# ArmarX.XMLStateComponent.StatesToEnter:  List of states that are directly entered and executed. Seperated by comma. These must not need any input parameters!
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.XMLStateComponent.StatesToEnter = ""
+
+
+# ArmarX.XMLStateComponent.XMLRemoteStateOffererName:  Name of the RemoteStateOfferer to start. The default name is [StatechartGroupName]RemoteStateOfferer.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+ArmarX.XMLStateComponent.XMLRemoteStateOffererName = StatechartProfilesTestGroupRemoteStateOfferer
+
+
+# ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile:  Path to statechart group definition file (*.scgxml) - relative to projects' source dir
+#  Attributes:
+#  - Case sensitivity:   yes
+#  - Required:           yes
+# ArmarX.XMLStateComponent.XMLStatechartGroupDefinitionFile = ::_NOT_SET_::
+
+
+# ArmarX.XMLStateComponent.XMLStatechartProfile:  Profile to use for state execution. Should be the same for all Statechart Groups in one scenario. This profile name is also added as a prefix to the Ice identifier of the RemoteStateOfferer of this statechart group.
+#  Attributes:
+#  - Default:            ""
+#  - Case sensitivity:   yes
+#  - Required:           no
+# ArmarX.XMLStateComponent.XMLStatechartProfile = ""
+
+
diff --git a/source/RobotAPI/components/StatechartExecutorExample/CMakeLists.txt b/source/RobotAPI/components/StatechartExecutorExample/CMakeLists.txt
index 91c78fe69f015221bc6b40b8c44005a9a650851e..a557d941fde6d13627ab5d3eaf7957d6424e6998 100644
--- a/source/RobotAPI/components/StatechartExecutorExample/CMakeLists.txt
+++ b/source/RobotAPI/components/StatechartExecutorExample/CMakeLists.txt
@@ -5,6 +5,8 @@ set(COMPONENT_LIBS
     ArmarXCore
     ArmarXCoreInterfaces
     RemoteGui
+    RobotAPICore
+    ArmarXCoreStatechart
 )
 
 set(SOURCES
diff --git a/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.cpp b/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.cpp
index e6da40490424b47721620d59d7c318fed79a379c..860dda2c8a15b34eeda085f6d23579d2f76741f7 100644
--- a/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.cpp
+++ b/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.cpp
@@ -29,10 +29,23 @@
 #include <ArmarXCore/observers/variant/SingleTypeVariantList.h>
 #include <ArmarXCore/observers/variant/StringValueMap.h>
 
-#include <ArmarXCore/observers/variant/MixedValueMap.h>
+#include <ArmarXCore/statechart/StateParameter.h>
+
+
+#include <RobotAPI/libraries/core/Pose.h>
+
+#include <ArmarXCore/interface/statechart/RemoteStateOffererIce.h>
+#include <ArmarXCore/statechart/StateBase.h>
+#include <ArmarXCore/statechart/StateUtilFunctions.h>
+#include <ArmarXCore/statechart/StateUtil.h>
+#include <ArmarXCore/statechart/State.h>
+
+#include <ArmarXCore/statechart/Statechart.h>
 
 namespace armarx
 {
+    DEFINEEVENT(EvAbort)
+
     StatechartExecutorExamplePropertyDefinitions::StatechartExecutorExamplePropertyDefinitions(std::string prefix) :
         armarx::ComponentPropertyDefinitions(prefix)
     {
@@ -48,14 +61,14 @@ namespace armarx
 
     void StatechartExecutorExample::onInitComponent()
     {
-        usingProxy("SimpleStatechartExecutor");
+        usingProxy("StatechartExecutor");
         usingProxy("RemoteGuiProvider");
     }
 
 
     void StatechartExecutorExample::onConnectComponent()
     {
-        assignProxy(_statechartExecutor, "SimpleStatechartExecutor");
+        assignProxy(_statechartExecutor, "StatechartExecutor");
 
         assignProxy(_remoteGuiPrx, "RemoteGuiProvider");
         _tabName = "StatechartExecutorExample";
@@ -132,55 +145,82 @@ namespace armarx
             if (_remoteGuiTab.getButton("Stop").clicked())
             {
                 _statechartExecutor->stopImmediatly();
+
+                auto output = _statechartExecutor->getSetOutputParameters();
+                for (const auto& p : output)
+                {
+                    SingleVariantPtr var = SingleVariantPtr::dynamicCast(p.second);
+                    ARMARX_INFO << p.first << ": " << var->get()->getOutputValueOnly();
+                }
             }
 
             if (_remoteGuiTab.getButton("Test_normal").clicked())
             {
                 std::string proxyName = "StatechartExecutionGroupRemoteStateOfferer";
                 std::string stateName = "TestStateForStatechartExecution";
-                _statechartExecutor->execute(proxyName, stateName, MixedValueMapPtr());
+
+
+                StateParameterMap inputMap;
+                PosePtr p = new Pose();
+                //                StateParameterPtr param = StateParameter::create();
+                //                param->value = new SingleVariant(p);
+                //                param->set = true;
+                //                inputMap["bla2"] = param;
+
+                StateParameterPtr param2 = StateParameter::create();
+                param2->value = new SingleVariant(1);
+                param2->set = true;
+                inputMap["intTest"] = param2;
+
+                std::vector<PosePtr> v;
+                v.push_back(p);
+                StateParameterPtr param3 = StateParameter::create();
+                param3->value = SingleTypeVariantList::FromStdVector(v);
+                param3->set = true;
+                inputMap["intListTest"] = param3;
+
+                std::map<std::string, PosePtr> m;
+                m["a"] = p;
+                m["b"] = p;
+                StateParameterPtr param4 = StateParameter::create();
+                param4->value = StringValueMap::FromStdMap<PosePtr>(m);
+                param4->set = true;
+                inputMap["poseMapTest"] = param4;
+
+                _statechartExecutor->ensureVariantLibrariesAreLoaded(inputMap);
+                _statechartExecutor->startStatechart(proxyName, stateName, inputMap);
+
+                //                StatechartExecutionResult result = _statechartExecutor->waitUntilStatechartExecutionIsFinished();
+                //                ARMARX_INFO << VAROUT(result);
+                //                StringVariantContainerBaseMap output = _statechartExecutor->getSetOutputParameters();
+
+
+                //                int outInt = SingleVariantPtr::dynamicCast(output["OutputInt"])->get()->get<int>();
+                //                ARMARX_INFO << VAROUT(outInt);
+
+                //                PosePtr pose = SingleVariantPtr::dynamicCast(output["OutputPose"])->get()->get<Pose>();
+                //                ARMARX_INFO << VAROUT(pose);
             }
 
             if (_remoteGuiTab.getButton("Test_args").clicked())
             {
-                std::string proxyName = "StatechartExecutionGroupRemoteStateOfferer";
-                std::string stateName = "TestStateForStatechartExecution";
-                MixedValueMapPtr args = new MixedValueMap();
-
-                // Adding Variants with VariantContainer
-                args->insert("StartInt", new SingleVariant(5));
-                args->insert("TestString", new SingleVariant("hello"));
-                SingleTypeVariantListPtr p = new SingleTypeVariantList();
-                p->addVariant(5.0f);
-                p->addVariant(2.6f);
-                args->insert("TestList", p);
-                StringValueMapPtr map = new StringValueMap();
-                map->addVariant("1", 1);
-                map->addVariant("2", 2);
-                args->insert("TestMap", map);
-
-                // Adding entries without VariantContainer (directly, with initializerLists or with std-containers)
-                args->insert("a", "wert");
-                args->insert("b", 5.0f);
-                args->insert("listFromInitializerList", {1.f, 2.f, 3.f});
-                args->insert("mapFromStdMap", std::map<std::string, int>({{"a", 1}, {"b", 2}}));
-                args->insert<float>("mapFromInitializerList", {{"a", 1}, {"b", 2}, {"c", 3}});
-
-                _statechartExecutor->execute(proxyName, stateName, args);
+
             }
 
             if (_remoteGuiTab.getButton("Test_wrongProxy").clicked())
             {
-                std::string proxyName = "StatechartExecutionGroupRemoteStateOfferer_wrong";
-                std::string stateName = "StatechartExecution";
-                _statechartExecutor->execute(proxyName, stateName, MixedValueMapPtr());
+                StringVariantContainerBaseMap output = _statechartExecutor->getSetOutputParameters();
+                if (!output.empty())
+                {
+                    int outInt = SingleVariantPtr::dynamicCast(output["OutputInt"])->get()->get<int>();
+                    ARMARX_INFO << VAROUT(outInt);
+                }
+
             }
 
             if (_remoteGuiTab.getButtonClicked("Run"))
             {
-                std::string proxyName = _remoteGuiTab.getValue<std::string>("ProxyEdit").get();
-                std::string stateName = _remoteGuiTab.getValue<std::string>("StateEdit").get();
-                _statechartExecutor->execute(proxyName, stateName, MixedValueMapPtr());
+
             }
 
             _remoteGuiTab.sendUpdates();
diff --git a/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.h b/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.h
index 410a642de5551f7298bd2b5c014482b25ab16343..eab44513a478015db64cd761766209015aec3f28 100644
--- a/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.h
+++ b/source/RobotAPI/components/StatechartExecutorExample/StatechartExecutorExample.h
@@ -29,7 +29,7 @@
 #include <ArmarXGui/interface/RemoteGuiInterface.h>
 #include <ArmarXGui/libraries/RemoteGui/WidgetProxy.h>
 
-#include <ArmarXCore/interface/components/SimpleStatechartExecutorInterface.h>
+#include <ArmarXCore/interface/components/StatechartExecutorInterface.h>
 
 
 namespace armarx
@@ -87,7 +87,7 @@ namespace armarx
 
     private:
 
-        SimpleStatechartExecutorInterfacePrx _statechartExecutor;
+        StatechartExecutorInterfacePrx _statechartExecutor;
 
         void setupRemoteGuiWidget();
         RemoteGuiInterfacePrx _remoteGuiPrx;
@@ -96,6 +96,5 @@ namespace armarx
         void runRemoteGui();
         RunningTask<StatechartExecutorExample>::pointer_type _remoteGuiTask;
 
-
     };
 }
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/CMakeLists.txt b/source/RobotAPI/statecharts/StatechartExecutionGroup/CMakeLists.txt
index 175bd87910b6eb474f90f69839658de263826f88..377684d2bcd9bad3ca30cbd8dbf4b00f08514018 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/CMakeLists.txt
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/CMakeLists.txt
@@ -3,6 +3,7 @@ armarx_component_set_name("StatechartExecutionGroup")
 set(COMPONENT_LIBS
     ArmarXCoreInterfaces
     ArmarXCoreObservers
+    RobotAPICore
     )
 
 # Sources
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.cpp
deleted file mode 100644
index 1c0cbfc875d9854967688179627908a93ee24415..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#include "StatechartExecution.h"
-
-//#include <ArmarXCore/core/time/TimeUtil.h>
-#include <ArmarXCore/observers/variant/DatafieldRef.h>
-
-using namespace armarx;
-using namespace StatechartExecutionGroup;
-
-// DO NOT EDIT NEXT LINE
-StatechartExecution::SubClassRegistry StatechartExecution::Registry(StatechartExecution::GetName(), &StatechartExecution::CreateInstance);
-
-
-
-void StatechartExecution::onEnter()
-{
-    // put your user code for the enter-point here
-    // execution time should be short (<100ms)
-    local.setStatechartExecutorChannel(getContext()->getChannelRef(in.getStatechartExecutorComponentName(), "StatechartControl"));
-}
-
-void StatechartExecution::onExit()
-{
-    // put your user code for the exit point here
-    // execution time should be short (<100ms)
-}
-
-
-// DO NOT EDIT NEXT FUNCTION
-XMLStateFactoryBasePtr StatechartExecution::CreateInstance(XMLStateConstructorParams stateData)
-{
-    return XMLStateFactoryBasePtr(new StatechartExecution(stateData));
-}
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.h b/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.h
deleted file mode 100644
index a9e3ec9b5d398d5a7ce53d7db0b199df0acffa27..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-#pragma once
-
-#include <RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.generated.h>
-
-namespace armarx::StatechartExecutionGroup
-{
-    class StatechartExecution :
-        public StatechartExecutionGeneratedBase < StatechartExecution >
-    {
-    public:
-        StatechartExecution(const XMLStateConstructorParams& stateData):
-            XMLStateTemplate < StatechartExecution > (stateData), StatechartExecutionGeneratedBase < StatechartExecution > (stateData)
-        {
-        }
-
-        // inherited from StateBase
-        void onEnter() override;
-        // void run() override;
-        // void onBreak() override;
-        void onExit() override;
-
-        // static functions for AbstractFactory Method
-        static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData);
-        static SubClassRegistry Registry;
-
-        // DO NOT INSERT ANY CLASS MEMBERS,
-        // use stateparameters instead,
-        // if classmember are neccessary nonetheless, reset them in onEnter
-    };
-}
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.xml
deleted file mode 100644
index a0d4cc9b8355ef2052dc5b00b25b80eac069fc56..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecution.xml
+++ /dev/null
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<State version="1.2" name="StatechartExecution" uuid="6D5E986D-2B5F-41EB-A711-301E76EF51C2" width="804.167" height="385.392" type="Normal State">
-	<InputParameters>
-		<Parameter name="StatechartExecutorComponentName" type="::armarx::StringVariantData" docType="string" optional="no">
-			<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"SimpleStatechartExecutor"}}' docValue="SimpleStatechartExecutor"/>
-		</Parameter>
-	</InputParameters>
-	<OutputParameters/>
-	<LocalParameters>
-		<Parameter name="StatechartExecutorChannel" type="::armarx::ChannelRefBase" docType="ChannelRef" optional="no"/>
-	</LocalParameters>
-	<Substates>
-		<LocalState name="Executor" refuuid="40FB4766-7026-4C14-969E-737DCCCE97D8" left="30" top="178.833" boundingSquareSize="100.002"/>
-		<EndState name="Failure" event="Failure" left="674.165" top="140" boundingSquareSize="100.002"/>
-		<LocalState name="PrepareNext" refuuid="40DE1904-AA45-4E36-9ACB-C80FFB34EF68" left="674.165" top="269.5" boundingSquareSize="100.002"/>
-		<LocalState name="WaitForNext" refuuid="1F118DB4-3B55-4E01-8FF1-140DEAEF51C2" left="273.75" top="266.163" boundingSquareSize="100.002"/>
-	</Substates>
-	<Events>
-		<Event name="Failure">
-			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
-		</Event>
-		<Event name="EvAbort"/>
-	</Events>
-	<StartState substateName="WaitForNext">
-		<ParameterMappings>
-			<ParameterMapping sourceType="Parent" from="StatechartExecutorChannel" to="StatechartExecutorChannel"/>
-		</ParameterMappings>
-		<SupportPoints>
-			<SupportPoint posX="92.0875" posY="304.167"/>
-			<SupportPoint posX="123.175" posY="304.167"/>
-			<SupportPoint posX="207.5" posY="304.167"/>
-			<SupportPoint posX="265.35" posY="304.167"/>
-		</SupportPoints>
-	</StartState>
-	<Transitions>
-		<Transition from="Executor" to="Failure" eventName="Failure">
-			<ParameterMappings/>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="130.208" posY="200.858"/>
-				<SupportPoint posX="135.183" posY="199.625"/>
-				<SupportPoint posX="140.175" posY="198.475"/>
-				<SupportPoint posX="145" posY="197.5"/>
-				<SupportPoint posX="183.408" posY="189.75"/>
-				<SupportPoint posX="193.417" posY="189.442"/>
-				<SupportPoint posX="232.5" posY="186.667"/>
-				<SupportPoint posX="388.575" posY="175.583"/>
-				<SupportPoint posX="573.183" posY="175.667"/>
-				<SupportPoint posX="665.467" posY="176.617"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="Executor" to="WaitForNext" eventName="Success">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Output" from="StatechartResult" to="LastResult"/>
-				<ParameterMapping sourceType="Parent" from="StatechartExecutorChannel" to="StatechartExecutorChannel"/>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints/>
-		</Transition>
-		<Transition from="WaitForNext" to="Failure" eventName="Failure">
-			<ParameterMappings/>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="374.058" posY="288.252"/>
-				<SupportPoint posX="448.408" posY="264.733"/>
-				<SupportPoint posX="587.292" posY="220.8"/>
-				<SupportPoint posX="665.95" posY="195.917"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="Executor" to="WaitForNext" eventName="EvAbort">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Value" from="" to="LastResult">
-					<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Aborted"}}'/>
-				</ParameterMapping>
-				<ParameterMapping sourceType="Parent" from="StatechartExecutorChannel" to="StatechartExecutorChannel"/>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="130.242" posY="250.175"/>
-				<SupportPoint posX="135.125" posY="252.85"/>
-				<SupportPoint posX="140.092" posY="255.35"/>
-				<SupportPoint posX="145" posY="257.5"/>
-				<SupportPoint posX="183.492" posY="274.352"/>
-				<SupportPoint posX="229.392" posY="286.177"/>
-				<SupportPoint posX="265.042" posY="293.707"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="PrepareNext" to="WaitForNext" eventName="Failure">
-			<ParameterMappings/>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="674.133" posY="308.912"/>
-				<SupportPoint posX="669.075" posY="309.016"/>
-				<SupportPoint posX="664.017" posY="309.104"/>
-				<SupportPoint posX="659.167" posY="309.167"/>
-				<SupportPoint posX="557.325" posY="310.472"/>
-				<SupportPoint posX="531.825" posY="311.562"/>
-				<SupportPoint posX="430" posY="309.167"/>
-				<SupportPoint posX="414.575" posY="308.804"/>
-				<SupportPoint posX="397.908" posY="308.146"/>
-				<SupportPoint posX="382.45" posY="307.423"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="PrepareNext" to="Executor" eventName="EvStatechartPrepared">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Output" from="Args" to="Args"/>
-				<ParameterMapping sourceType="Output" from="StopDatafield" to="ImmediateStopDatafield"/>
-				<ParameterMapping sourceType="Output" from="ProxyName" to="ProxyName"/>
-				<ParameterMapping sourceType="Output" from="StateName" to="StateName"/>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="701.658" posY="269.642"/>
-				<SupportPoint posX="690.808" posY="255.025"/>
-				<SupportPoint posX="676.383" posY="239.875"/>
-				<SupportPoint posX="659.167" posY="231.667"/>
-				<SupportPoint posX="635.992" posY="220.617"/>
-				<SupportPoint posX="281.275" posY="217.125"/>
-				<SupportPoint posX="138.692" posY="216.158"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="WaitForNext" to="PrepareNext" eventName="EvNextStatechartAvailable">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Output" from="StatechartExecutorChannel" to="StatechartExecutorChannel"/>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="373.967" posY="324.832"/>
-				<SupportPoint posX="391.392" posY="330.997"/>
-				<SupportPoint posX="411.267" posY="336.927"/>
-				<SupportPoint posX="430" posY="340"/>
-				<SupportPoint posX="530.508" posY="356.492"/>
-				<SupportPoint posX="560.042" posY="363.401"/>
-				<SupportPoint posX="659.167" posY="340"/>
-				<SupportPoint posX="661.392" posY="339.475"/>
-				<SupportPoint posX="663.625" posY="338.861"/>
-				<SupportPoint posX="665.867" posY="338.173"/>
-			</SupportPoints>
-		</Transition>
-	</Transitions>
-</State>
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecutionGroup.scgxml b/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecutionGroup.scgxml
index 87800301483ef0f53894638e1d17e463906684a7..64425159174e9ba5a1e870915ed036066673a99e 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecutionGroup.scgxml
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/StatechartExecutionGroup.scgxml
@@ -1,17 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <StatechartGroup name="StatechartExecutionGroup" package="RobotAPI" generateContext="true">
-	<Proxies>
-		<Proxy value="ArmarXCoreInterfaces.simpleStatechartExecutor"/>
-	</Proxies>
-	<Folder basename="Substates">
-		<State filename="DynamicStatechart.xml"/>
-		<State filename="Executor.xml"/>
-		<State filename="PrepareNext.xml"/>
-		<State filename="WaitForNext.xml"/>
-	</Folder>
+	<Proxies/>
 	<Folder basename="Testing">
 		<State filename="TestStateForStatechartExecution.xml" visibility="public"/>
+		<State filename="TestSubstate1.xml"/>
 	</Folder>
-	<State filename="StatechartExecution.xml" visibility="public"/>
 </StatechartGroup>
 
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/DynamicStatechart.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/DynamicStatechart.xml
deleted file mode 100644
index e0f3edf75658c834e463c47721dc0b1c398a2138..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/DynamicStatechart.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<State version="1.2" name="DynamicStatechart" uuid="D138CD7C-D067-41FD-B826-4B7591204309" width="800" height="600" type="Dynamic Remote State">
-	<InputParameters>
-		<Parameter name="Args" type="::armarx::MixedValueMapBase" docType="MixedValueMap" optional="no"/>
-		<Parameter name="proxyName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-		<Parameter name="stateName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-	</InputParameters>
-	<OutputParameters/>
-	<LocalParameters/>
-	<Substates/>
-	<Events>
-		<Event name="LoadingFailed">
-			<Description>The connecting to the desired remote state failed</Description>
-		</Event>
-		<Event name="Success"/>
-		<Event name="Failure"/>
-	</Events>
-	<Transitions/>
-</State>
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.cpp
deleted file mode 100644
index 0278b7ceb492ce555849328bb095fe35f4a383fb..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#include "Executor.h"
-
-#include <ArmarXCore/observers/variant/DatafieldRef.h>
-
-using namespace armarx;
-using namespace StatechartExecutionGroup;
-
-// DO NOT EDIT NEXT LINE
-Executor::SubClassRegistry Executor::Registry(Executor::GetName(), &Executor::CreateInstance);
-
-
-
-void Executor::onEnter()
-{
-    Literal stopUpdated(in.getImmediateStopDatafield()->getDataFieldIdentifier(), "updated");
-    installCondition<EvAbort>(stopUpdated);
-}
-
-void Executor::onBreak()
-{
-    out.setStatechartResult("Aborted");
-}
-
-void Executor::onExit()
-{
-    if (!out.isStatechartResultSet())
-    {
-        out.setStatechartResult("Aborted");
-    }
-}
-
-
-// DO NOT EDIT NEXT FUNCTION
-XMLStateFactoryBasePtr Executor::CreateInstance(XMLStateConstructorParams stateData)
-{
-    return XMLStateFactoryBasePtr(new Executor(stateData));
-}
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.xml
deleted file mode 100644
index 0f48011b02e9f5954040cf9c42f71ef4daa71747..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<State version="1.2" name="Executor" uuid="40FB4766-7026-4C14-969E-737DCCCE97D8" width="468.333" height="345.833" type="Normal State">
-	<InputParameters>
-		<Parameter name="Args" type="::armarx::MixedValueMapBase" docType="MixedValueMap" optional="no"/>
-		<Parameter name="ImmediateStopDatafield" type="::armarx::DatafieldRefBase" docType="DatafieldRef" optional="no"/>
-		<Parameter name="ProxyName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-		<Parameter name="StateName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-	</InputParameters>
-	<OutputParameters>
-		<Parameter name="StatechartResult" type="::armarx::StringVariantData" docType="string" optional="no"/>
-	</OutputParameters>
-	<LocalParameters/>
-	<Substates>
-		<DynamicRemoteState name="DynamicStatechart" refuuid="D138CD7C-D067-41FD-B826-4B7591204309" left="85" top="191.167" boundingSquareSize="100.002"/>
-		<EndState name="Failure" event="Failure" left="338.331" top="140" boundingSquareSize="100.002"/>
-		<EndState name="Success" event="Success" left="338.331" top="240.832" boundingSquareSize="100.002"/>
-	</Substates>
-	<Events>
-		<Event name="Failure">
-			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
-		</Event>
-		<Event name="Success"/>
-		<Event name="EvAbort"/>
-	</Events>
-	<StartState substateName="DynamicStatechart">
-		<ParameterMappings>
-			<ParameterMapping sourceType="Parent" from="Args" to="Args"/>
-			<ParameterMapping sourceType="Parent" from="ProxyName" to="proxyName"/>
-			<ParameterMapping sourceType="Parent" from="StateName" to="stateName"/>
-		</ParameterMappings>
-		<SupportPoints>
-			<SupportPoint posX="54.2308" posY="229.167"/>
-			<SupportPoint posX="60.2808" posY="229.167"/>
-			<SupportPoint posX="68.0858" posY="229.167"/>
-			<SupportPoint posX="76.4533" posY="229.167"/>
-		</SupportPoints>
-	</StartState>
-	<Transitions>
-		<Transition from="DynamicStatechart" to="Failure" eventName="LoadingFailed">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Value" from="" to="StatechartResult">
-					<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Failure"}}'/>
-				</ParameterMapping>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="185.15" posY="211.55"/>
-				<SupportPoint posX="190.133" posY="210.067"/>
-				<SupportPoint posX="195.15" posY="208.683"/>
-				<SupportPoint posX="200" posY="207.5"/>
-				<SupportPoint posX="243.058" posY="196.967"/>
-				<SupportPoint posX="292.583" posY="189.25"/>
-				<SupportPoint posX="330.042" posY="184.275"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="DynamicStatechart" to="Success" eventName="Success">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Value" from="" to="StatechartResult">
-					<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Success"}}'/>
-				</ParameterMapping>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="185.017" posY="234.033"/>
-				<SupportPoint posX="223.233" posY="238.337"/>
-				<SupportPoint posX="277.042" posY="245.662"/>
-				<SupportPoint posX="323.333" posY="256.667"/>
-				<SupportPoint posX="325.533" posY="257.19"/>
-				<SupportPoint posX="327.767" posY="257.756"/>
-				<SupportPoint posX="330.017" posY="258.354"/>
-			</SupportPoints>
-		</Transition>
-		<Transition from="DynamicStatechart" to="Success" eventName="Failure">
-			<ParameterMappings>
-				<ParameterMapping sourceType="Value" from="" to="StatechartResult">
-					<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Failure"}}'/>
-				</ParameterMapping>
-			</ParameterMappings>
-			<ParameterMappingsToParentsLocal/>
-			<ParameterMappingsToParentsOutput/>
-			<SupportPoints>
-				<SupportPoint posX="169.025" posY="266.732"/>
-				<SupportPoint posX="178.233" posY="274.521"/>
-				<SupportPoint posX="188.783" posY="281.631"/>
-				<SupportPoint posX="200" posY="285.833"/>
-				<SupportPoint posX="241.45" posY="301.364"/>
-				<SupportPoint posX="291.675" posY="298.388"/>
-				<SupportPoint posX="329.833" posY="292.127"/>
-			</SupportPoints>
-		</Transition>
-	</Transitions>
-</State>
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.cpp
deleted file mode 100644
index b90690c7a408f94940f3ba483ffcb243c91a2c45..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#include "PrepareNext.h"
-
-//#include <ArmarXCore/core/time/TimeUtil.h>
-#include <ArmarXCore/observers/variant/DatafieldRef.h>
-
-using namespace armarx;
-using namespace StatechartExecutionGroup;
-
-// DO NOT EDIT NEXT LINE
-PrepareNext::SubClassRegistry PrepareNext::Registry(PrepareNext::GetName(), &PrepareNext::CreateInstance);
-
-
-
-void PrepareNext::onEnter()
-{
-    ChannelRefPtr channel = in.getStatechartExecutorChannel();
-    channel = getContext()->getChannelRef(channel->getObserverName(), channel->getChannelName());
-
-    if (!channel->hasDatafield("ProxyName") || !channel->hasDatafield("StateName") || !channel->hasDatafield("Args"))
-    {
-        emitFailure();
-        return;
-    }
-
-    std::string proxyName = channel->getDataField("ProxyName")->get<std::string>();
-    std::string stateName = channel->getDataField("StateName")->get<std::string>();
-    MixedValueMapPtr args = MixedValueMapPtr::dynamicCast(channel->getDataField("Args")->get<MixedValueMapBasePtr>());
-    ARMARX_INFO << "Proxy: " << proxyName << " State: " << stateName << " Args: " << args->output();
-
-    out.setProxyName(proxyName);
-    out.setStateName(stateName);
-    out.setArgs(args);
-    out.setStopDatafield(getContext()->getDatafieldRef(*channel->getDataFieldIdentifier("__stop")));
-
-    emitEvStatechartPrepared();
-
-}
-
-void PrepareNext::onExit()
-{
-    // put your user code for the exit point here
-    // execution time should be short (<100ms)
-}
-
-
-// DO NOT EDIT NEXT FUNCTION
-XMLStateFactoryBasePtr PrepareNext::CreateInstance(XMLStateConstructorParams stateData)
-{
-    return XMLStateFactoryBasePtr(new PrepareNext(stateData));
-}
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.h b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.h
deleted file mode 100644
index 922c8c159ecdde55fe107356e220178955da4ad4..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-#pragma once
-
-#include <RobotAPI/statecharts/StatechartExecutionGroup/PrepareNext.generated.h>
-
-namespace armarx::StatechartExecutionGroup
-{
-    class PrepareNext :
-        public PrepareNextGeneratedBase < PrepareNext >
-    {
-    public:
-        PrepareNext(const XMLStateConstructorParams& stateData):
-            XMLStateTemplate < PrepareNext > (stateData), PrepareNextGeneratedBase < PrepareNext > (stateData)
-        {
-        }
-
-        // inherited from StateBase
-        void onEnter() override;
-        // void run() override;
-        // void onBreak() override;
-        void onExit() override;
-
-        // static functions for AbstractFactory Method
-        static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData);
-        static SubClassRegistry Registry;
-
-        // DO NOT INSERT ANY CLASS MEMBERS,
-        // use stateparameters instead,
-        // if classmember are neccessary nonetheless, reset them in onEnter
-    };
-}
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.xml
deleted file mode 100644
index 3e02b1c34cc2683c2c7b1359bc1d8cca75565905..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/PrepareNext.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<State version="1.2" name="PrepareNext" uuid="40DE1904-AA45-4E36-9ACB-C80FFB34EF68" width="800" height="600" type="Normal State">
-	<InputParameters>
-		<Parameter name="StatechartExecutorChannel" type="::armarx::ChannelRefBase" docType="ChannelRef" optional="no"/>
-	</InputParameters>
-	<OutputParameters>
-		<Parameter name="Args" type="::armarx::MixedValueMapBase" docType="MixedValueMap" optional="no"/>
-		<Parameter name="ProxyName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-		<Parameter name="StateName" type="::armarx::StringVariantData" docType="string" optional="no"/>
-		<Parameter name="StopDatafield" type="::armarx::DatafieldRefBase" docType="DatafieldRef" optional="no"/>
-	</OutputParameters>
-	<LocalParameters/>
-	<Substates/>
-	<Events>
-		<Event name="Failure">
-			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
-		</Event>
-		<Event name="EvStatechartPrepared"/>
-	</Events>
-	<Transitions/>
-</State>
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.cpp
deleted file mode 100644
index 92161dd7d66c60e3e96cbbccd69f7380d62aa974..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-
-#include "WaitForNext.h"
-
-//#include <ArmarXCore/core/time/TimeUtil.h>
-#include <ArmarXCore/observers/variant/DatafieldRef.h>
-#include <ArmarXCore/components/SimpleStatechartExecutor/SimpleStatechartExecutor.h>
-
-using namespace armarx;
-using namespace StatechartExecutionGroup;
-
-// DO NOT EDIT NEXT LINE
-WaitForNext::SubClassRegistry WaitForNext::Registry(WaitForNext::GetName(), &WaitForNext::CreateInstance);
-
-
-
-void WaitForNext::onEnter()
-{
-    ChannelRefPtr channel = in.getStatechartExecutorChannel();
-    out.setStatechartExecutorChannel(channel);
-    Literal updated(channel->getDataFieldIdentifier("StateName"), "updated");
-    installCondition<EvNextStatechartAvailable>(updated);
-
-    if (in.isLastResultSet())
-    {
-        getSimpleStatechartExecutor()->notifyStatechartExecutionFinished(SimpleStatechartExecutor::statechartResultFromString(in.getLastResult()));
-    }
-
-    ARMARX_INFO << "Exiting WaitForNextTask::onEnter()";
-}
-
-//void WaitForNext::run()
-//{
-//    // put your user code for the execution-phase here
-//    // runs in seperate thread, thus can do complex operations
-//    // should check constantly whether isRunningTaskStopped() returns true
-//
-//    // get a private kinematic instance for this state of the robot (tick "Robot State Component" proxy checkbox in statechart group)
-//    VirtualRobot::RobotPtr robot = getLocalRobot();
-//
-//// uncomment this if you need a continous run function. Make sure to use sleep or use blocking wait to reduce cpu load.
-//    while (!isRunningTaskStopped()) // stop run function if returning true
-//    {
-//        // do your calculations
-//        // synchronize robot clone to most recent state
-//        RemoteRobot::synchronizeLocalClone(robot, getRobotStateComponent());
-//    }
-//}
-
-//void WaitForNext::onBreak()
-//{
-//    // put your user code for the breaking point here
-//    // execution time should be short (<100ms)
-//}
-
-void WaitForNext::onExit()
-{
-    // put your user code for the exit point here
-    // execution time should be short (<100ms)
-}
-
-
-// DO NOT EDIT NEXT FUNCTION
-XMLStateFactoryBasePtr WaitForNext::CreateInstance(XMLStateConstructorParams stateData)
-{
-    return XMLStateFactoryBasePtr(new WaitForNext(stateData));
-}
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.h b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.h
deleted file mode 100644
index de648b883f7abb604c20917ce2e2aa7a6895c579..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of ArmarX.
- *
- * ArmarX is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * ArmarX is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * @package    ArmarXCore::StatechartExecutionGroup
- * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
- * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
- *             GNU General Public License
- */
-#pragma once
-
-#include <RobotAPI/statecharts/StatechartExecutionGroup/WaitForNext.generated.h>
-
-namespace armarx
-{
-    DEFINEEVENT(EvNextStatechartAvailable)
-}
-namespace armarx::StatechartExecutionGroup
-{
-    class WaitForNext :
-        public WaitForNextGeneratedBase < WaitForNext >
-    {
-    public:
-        WaitForNext(const XMLStateConstructorParams& stateData):
-            XMLStateTemplate < WaitForNext > (stateData), WaitForNextGeneratedBase < WaitForNext > (stateData)
-        {
-        }
-
-        // inherited from StateBase
-        void onEnter() override;
-        // void run() override;
-        // void onBreak() override;
-        void onExit() override;
-
-        // static functions for AbstractFactory Method
-        static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData);
-        static SubClassRegistry Registry;
-
-        // DO NOT INSERT ANY CLASS MEMBERS,
-        // use stateparameters instead,
-        // if classmember are neccessary nonetheless, reset them in onEnter
-    };
-}
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.xml
deleted file mode 100644
index 88e6721980afacc1ed1f025176193d36a701b9ae..0000000000000000000000000000000000000000
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/WaitForNext.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<State version="1.2" name="WaitForNext" uuid="1F118DB4-3B55-4E01-8FF1-140DEAEF51C2" width="800" height="600" type="Normal State">
-	<InputParameters>
-		<Parameter name="LastResult" type="::armarx::StringVariantData" docType="string" optional="yes"/>
-		<Parameter name="StatechartExecutorChannel" type="::armarx::ChannelRefBase" docType="ChannelRef" optional="no"/>
-	</InputParameters>
-	<OutputParameters>
-		<Parameter name="StatechartExecutorChannel" type="::armarx::ChannelRefBase" docType="ChannelRef" optional="no"/>
-	</OutputParameters>
-	<LocalParameters/>
-	<Substates/>
-	<Events>
-		<Event name="Failure">
-			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
-		</Event>
-		<Event name="EvNextStatechartAvailable"/>
-	</Events>
-	<Transitions/>
-</State>
-
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.cpp
index dc276b2f552e31ff65d77a2e6a8280de7363767b..f02539854caa3a86dfbbc168181ec332ed92a077 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.cpp
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.cpp
@@ -25,6 +25,7 @@
 //#include <ArmarXCore/core/time/TimeUtil.h>
 //#include <ArmarXCore/observers/variant/DatafieldRef.h>
 
+#include <RobotAPI/libraries/core/Pose.h>
 
 using namespace armarx;
 using namespace StatechartExecutionGroup;
@@ -38,59 +39,66 @@ void TestStateForStatechartExecution::onEnter()
 {
     // put your user code for the enter-point here
     // execution time should be short (<100ms)
+    i = 0;
+    std::cout << "Hallo onEnter()" << std::endl;
 }
 
 void TestStateForStatechartExecution::run()
 {
-    int i = 0;
-    if (in.isArgsSet())
+    if (in.isblaSet())
     {
-        // Parse Args
-        MixedValueMapPtr args = in.getArgs();
-
-        try
-        {
-            i = args->get<int>("StartInt");
-            ARMARX_INFO << VAROUT(i);
-            ARMARX_INFO << VAROUT(args->get<std::string>("TestString"));
-            ARMARX_INFO << VAROUT(args->get<SingleTypeVariantList>("TestList")->toStdVector<float>());
-            ARMARX_INFO << VAROUT(args->get<SingleTypeVariantListPtr>("TestList")->toStdVector<float>());
-
-            ARMARX_INFO << VAROUT(args->get<StringValueMap>("TestMap")->toStdMap<int>());
-
-            ARMARX_INFO << VAROUT(args->get<float>("b"));
-            ARMARX_INFO << VAROUT(args->get<float>("StartInt"));
-
-            ARMARX_INFO << VAROUT(args->get<float>("TestList"));
-        }
-        catch (LocalException& e)
-        {
-            ARMARX_ERROR << e.what();
-        }
-        catch (InvalidTypeException& e)
-        {
-            ARMARX_ERROR << e.what();
-        }
+        ARMARX_INFO << VAROUT(in.getbla());
+    }
+    if (in.isintTestSet())
+    {
+        ARMARX_INFO << VAROUT(in.getintTest());
+    }
+    if (in.isbla2Set())
+    {
+        ARMARX_INFO << VAROUT(*in.getbla2());
+    }
 
+    if (in.isintListTestSet())
+    {
+        ARMARX_INFO << VAROUT(*in.getintListTest()[0]);
+    }
+
+    Pose p;
+    if (in.isposeMapTestSet())
+    {
+        ARMARX_INFO << VAROUT(*in.getposeMapTest()["a"]);
+        p = *in.getposeMapTest()["a"];
     }
-    while (!isRunningTaskStopped() && i < 15) // stop run function if returning true
+
+    while (!isRunningTaskStopped() && i < 5) // stop run function if returning true
     {
         ARMARX_INFO << i++;
+
+        std::cout << i << std::endl;
+
         sleep(1);
+        out.setOutputInt(i);
     }
+
+    out.setOutputPose(p);
+
+
     emitSuccess();
 }
 
-//void TestStateForStatechartExecution::onBreak()
-//{
-//    // put your user code for the breaking point here
-//    // execution time should be short (<100ms)
-//}
+void TestStateForStatechartExecution::onBreak()
+{
+    // put your user code for the breaking point here
+    // execution time should be short (<100ms)
+    ARMARX_INFO << "MainState broke";
+}
 
 void TestStateForStatechartExecution::onExit()
 {
     // put your user code for the exit point here
     // execution time should be short (<100ms)
+    //    out.setOutputInt(500);
+    ARMARX_INFO << "MainState exited";
 }
 
 
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.h b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.h
index 7bee11d15a13ae7bdc42e29aa5e1a79133c8767b..40e8f173ebd82ff8ddb32f400a2c7f5e87eae254 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.h
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.h
@@ -37,7 +37,7 @@ namespace armarx::StatechartExecutionGroup
         // inherited from StateBase
         void onEnter() override;
         void run() override;
-        // void onBreak() override;
+        void onBreak() override;
         void onExit() override;
 
         // static functions for AbstractFactory Method
@@ -47,5 +47,6 @@ namespace armarx::StatechartExecutionGroup
         // DO NOT INSERT ANY CLASS MEMBERS,
         // use stateparameters instead,
         // if classmember are neccessary nonetheless, reset them in onEnter
+        int i = 0;
     };
 }
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.xml
index 514ea1a18dbe5021b2c28db862fb8e9c7f0be79c..1149ce86bec5de9a85fa9fb2bd604e08cd269097 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.xml
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestStateForStatechartExecution.xml
@@ -1,18 +1,76 @@
 <?xml version="1.0" encoding="utf-8"?>
 <State version="1.2" name="TestStateForStatechartExecution" uuid="FD2DF490-85DE-400A-B090-3F89C6C699CD" width="800" height="600" type="Normal State">
 	<InputParameters>
-		<Parameter name="Args" type="::armarx::MixedValueMapBase" docType="MixedValueMap" optional="yes"/>
-		<Parameter name="bla" type="::armarx::BoolVariantData" docType="bool" optional="yes"/>
+		<Parameter name="bla" type="::armarx::PoseBase" docType="Pose" optional="yes">
+			<DefaultValue value='{
+   "type" : "::armarx::SingleVariantBase",
+   "variant" : {
+      "typeName" : "::armarx::PoseBase",
+      "value" : {
+         "qw" : 0,
+         "qx" : 0,
+         "qy" : 0,
+         "qz" : 0,
+         "x" : 0,
+         "y" : 0,
+         "z" : 0
+      }
+   }
+}
+' docValue="1 0 0 0\n0 1 0 0\n0 0 1 0\n0 0 0 1"/>
+		</Parameter>
+		<Parameter name="bla2" type="::armarx::PoseBase" docType="Pose" optional="yes"/>
+		<Parameter name="intListTest" type="::armarx::SingleTypeVariantListBase(::armarx::PoseBase)" docType="List(Pose)" optional="yes"/>
+		<Parameter name="intTest" type="::armarx::IntVariantData" docType="int" optional="yes">
+			<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::IntVariantData","value":2}}' docValue="2"/>
+		</Parameter>
+		<Parameter name="poseMapTest" type="::armarx::StringValueMapBase(::armarx::PoseBase)" docType="Map(Pose)" optional="yes">
+			<DefaultValue value='{"map":{"mykey":{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::PoseBase","value":{"qw":0,"qx":0,"qy":0,"qz":0,"x":0,"y":0,"z":0}}}},"type":"::armarx::StringValueMapBase"}' docValue="mykey: 1 0 0 0\n0 1 0 0\n0 0 1 0\n0 0 0 1\n"/>
+		</Parameter>
 	</InputParameters>
-	<OutputParameters/>
+	<OutputParameters>
+		<Parameter name="OutputInt" type="::armarx::IntVariantData" docType="int" optional="no"/>
+		<Parameter name="OutputPose" type="::armarx::PoseBase" docType="Pose" optional="yes"/>
+	</OutputParameters>
 	<LocalParameters/>
-	<Substates/>
+	<Substates>
+		<EndState name="Failure" event="Failure" left="601.272" top="296.341" boundingSquareSize="100"/>
+		<EndState name="Success" event="Success" left="346.305" top="403.402" boundingSquareSize="100"/>
+		<LocalState name="TestSubstate1" refuuid="6D579FF1-3A07-4443-AE9E-39FED914F40D" left="265.625" top="214.734" boundingSquareSize="100"/>
+	</Substates>
 	<Events>
 		<Event name="Failure">
 			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
 		</Event>
 		<Event name="Success"/>
 	</Events>
-	<Transitions/>
+	<StartState substateName="TestSubstate1">
+		<ParameterMappings>
+			<ParameterMapping sourceType="Parent" from="intTest" to="InputInt"/>
+		</ParameterMappings>
+		<SupportPoints/>
+	</StartState>
+	<Transitions>
+		<Transition from="TestSubstate1" to="Failure" eventName="Failure">
+			<ParameterMappings>
+				<ParameterMapping sourceType="Output" from="OutputInt" to="OutputInt"/>
+			</ParameterMappings>
+			<ParameterMappingsToParentsLocal/>
+			<ParameterMappingsToParentsOutput/>
+			<SupportPoints>
+				<SupportPoint posX="482.632" posY="296.394"/>
+			</SupportPoints>
+		</Transition>
+		<Transition from="TestSubstate1" to="Success" eventName="Success">
+			<ParameterMappings>
+				<ParameterMapping sourceType="Output" from="OutputInt" to="OutputInt"/>
+			</ParameterMappings>
+			<ParameterMappingsToParentsLocal/>
+			<ParameterMappingsToParentsOutput/>
+			<SupportPoints>
+				<SupportPoint posX="355.965" posY="346.568"/>
+			</SupportPoints>
+		</Transition>
+	</Transitions>
 </State>
 
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.cpp b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a754fab0ddf52caf3b0aeefec173fda3489ed79a
--- /dev/null
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.cpp
@@ -0,0 +1,77 @@
+/*
+ * This file is part of ArmarX.
+ *
+ * ArmarX is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * ArmarX is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @package    RobotAPI::StatechartExecutionGroup
+ * @author     Stefan Reither ( stefan dot reither at kit dot edu )
+ * @date       2020
+ * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
+ *             GNU General Public License
+ */
+
+#include "TestSubstate1.h"
+
+//#include <ArmarXCore/core/time/TimeUtil.h>
+//#include <ArmarXCore/observers/variant/DatafieldRef.h>
+
+namespace armarx::StatechartExecutionGroup
+{
+    // DO NOT EDIT NEXT LINE
+    TestSubstate1::SubClassRegistry TestSubstate1::Registry(TestSubstate1::GetName(), &TestSubstate1::CreateInstance);
+
+    void TestSubstate1::onEnter()
+    {
+        // put your user code for the enter-point here
+        // execution time should be short (<100ms)
+        ARMARX_INFO << "Substate onEnter";
+    }
+
+    //    void TestSubstate1::run()
+    //    {
+
+    //        int i = in.getInputInt();
+    //        ARMARX_INFO << "Substate int: " << i;
+    //        // uncomment this if you need a continous run function. Make sure to use sleep or use blocking wait to reduce cpu load.
+    //        while (!isRunningTaskStopped() && i < 10) // stop run function if returning true
+    //        {
+    //            ARMARX_INFO << "SubstateIntLoop; value: " << i;
+    //            i++;
+    //            out.setOutputInt(i);
+    //            sleep(1);
+    //        }
+
+    //        emitSuccess();
+    //    }
+
+    void TestSubstate1::onBreak()
+    {
+        // put your user code for the breaking point here
+        // execution time should be short (<100ms)
+        ARMARX_INFO << "Substate broke";
+    }
+
+    void TestSubstate1::onExit()
+    {
+        // put your user code for the exit point here
+        // execution time should be short (<100ms)
+        ARMARX_INFO << "Substate exited";
+    }
+
+
+    // DO NOT EDIT NEXT FUNCTION
+    XMLStateFactoryBasePtr TestSubstate1::CreateInstance(XMLStateConstructorParams stateData)
+    {
+        return XMLStateFactoryBasePtr(new TestSubstate1(stateData));
+    }
+}
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.h b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.h
similarity index 74%
rename from source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.h
rename to source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.h
index 5735c14d99f632e775db6420b192ee90ffdb87c7..f9c58b68cfda790567dec7d08dfcc34c4f1e9f36 100644
--- a/source/RobotAPI/statecharts/StatechartExecutionGroup/Substates/Executor.h
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.h
@@ -13,34 +13,30 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
- * @package    ArmarXCore::StatechartExecutionGroup
+ * @package    RobotAPI::StatechartExecutionGroup
  * @author     Stefan Reither ( stefan dot reither at kit dot edu )
- * @date       2019
+ * @date       2020
  * @copyright  http://www.gnu.org/licenses/gpl-2.0.txt
  *             GNU General Public License
  */
 #pragma once
 
-#include <RobotAPI/statecharts/StatechartExecutionGroup/Executor.generated.h>
+#include <RobotAPI/statecharts/StatechartExecutionGroup/TestSubstate1.generated.h>
 
-namespace armarx
-{
-    DEFINEEVENT(EvAbort)
-}
 namespace armarx::StatechartExecutionGroup
 {
-    class Executor :
-        public ExecutorGeneratedBase < Executor >
+    class TestSubstate1 :
+        public TestSubstate1GeneratedBase < TestSubstate1 >
     {
     public:
-        Executor(const XMLStateConstructorParams& stateData):
-            XMLStateTemplate < Executor > (stateData), ExecutorGeneratedBase < Executor > (stateData)
+        TestSubstate1(const XMLStateConstructorParams& stateData):
+            XMLStateTemplate < TestSubstate1 > (stateData), TestSubstate1GeneratedBase < TestSubstate1 > (stateData)
         {
         }
 
         // inherited from StateBase
         void onEnter() override;
-        // void run() override;
+        //        void run() override;
         void onBreak() override;
         void onExit() override;
 
@@ -53,3 +49,6 @@ namespace armarx::StatechartExecutionGroup
         // if classmember are neccessary nonetheless, reset them in onEnter
     };
 }
+
+
+
diff --git a/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.xml b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7162135768b1ae2b0ff7d6a3eea9ac9d4f26212e
--- /dev/null
+++ b/source/RobotAPI/statecharts/StatechartExecutionGroup/Testing/TestSubstate1.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<State version="1.2" name="TestSubstate1" uuid="6D579FF1-3A07-4443-AE9E-39FED914F40D" width="800" height="600" type="Normal State">
+	<InputParameters>
+		<Parameter name="InputInt" type="::armarx::IntVariantData" docType="int" optional="no"/>
+	</InputParameters>
+	<OutputParameters>
+		<Parameter name="OutputInt" type="::armarx::IntVariantData" docType="int" optional="no"/>
+	</OutputParameters>
+	<LocalParameters/>
+	<Substates/>
+	<Events>
+		<Event name="Failure">
+			<Description>Event for statechart-internal failures or optionally user-code failures</Description>
+		</Event>
+		<Event name="Success"/>
+	</Events>
+	<Transitions/>
+</State>
+