summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-12-06 21:59:37 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-12-06 21:59:37 (GMT)
commitfc10986cdd35a7a5ce483682ca43f3c496e907c1 (patch)
treed3d2277f4033eabf3228c624bf006bb51d447a52 /src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
parent53197953ce382a536bfef870efc4c3f1ccf0f180 (diff)
downloaduscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.zip
uscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.tar.gz
uscxml-fc10986cdd35a7a5ce483682ca43f3c496e907c1.tar.bz2
Use existing ActionLanguage to create new instances in invoked interpreters
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp')
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
index 885f70d..26fc024 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
@@ -158,6 +158,17 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent)
_invokedInterpreter.getImpl()->_invokeId = invokeEvent.invokeid;
_invokedInterpreter.getImpl()->_invokeReq = invokeEvent;
+ // create new instances from the parent's ActionLanguage
+#if 1
+ InterpreterImpl* invoked = _invokedInterpreter.getImpl().get();
+ invoked->_execContent = _interpreter->_execContent.getImpl()->create(invoked);
+ invoked->_delayQueue = _interpreter->_delayQueue.getImplDelayed()->create(invoked);
+ invoked->_internalQueue = _interpreter->_internalQueue.getImplBase()->create();
+ invoked->_externalQueue = _interpreter->_externalQueue.getImplBase()->create();
+ invoked->_microStepper = _interpreter->_microStepper.getImpl()->create(invoked);
+
+ // TODO: setup invokers dom, check datamodel attribute and create new instance from parent if matching?
+#endif
// copy monitors
// std::set<InterpreterMonitor*>::const_iterator monIter = _interpreter->_monitors.begin();
// while(monIter != _interpreter->_monitors.end()) {
@@ -168,7 +179,10 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent)
// }
- /// test240 assumes that invoke request params will carry over to the datamodel
+ /**
+ * test240 assumes that invoke request params will carry over to the datamodel
+ * This is solved by passing the invoke request above
+ */
// _invokedInterpreter.getImpl()->setInvokeRequest(req);
_isActive = true;
@@ -193,4 +207,4 @@ void USCXMLInvoker::ParentQueueImpl::enqueue(const Event& event) {
_invoker->eventToSCXML(copy, USCXML_INVOKER_SCXML_TYPE, _invoker->_invokeId);
}
-} \ No newline at end of file
+}