diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-05 11:06:09 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-05 11:06:09 (GMT) |
commit | a5a139f46438148901ea6627b73d1bf6ae39b346 (patch) | |
tree | e043df6e22113184477a5ffb507f8ef14b7485e6 /src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | |
parent | af6609592298c5e047e37e5ae2b47e6a8edbb677 (diff) | |
download | uscxml-a5a139f46438148901ea6627b73d1bf6ae39b346.zip uscxml-a5a139f46438148901ea6627b73d1bf6ae39b346.tar.gz uscxml-a5a139f46438148901ea6627b73d1bf6ae39b346.tar.bz2 |
Support for initial attribute with nested scxml invokers
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp')
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index 9506867..5a447c4 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -19,6 +19,7 @@ #include "USCXMLInvoker.h" #include <glog/logging.h> +#include "uscxml/DOMUtils.h" #ifdef BUILD_AS_PLUGINS #include <Pluma/Connector.hpp> @@ -88,6 +89,10 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { LOG(ERROR) << "Cannot invoke nested SCXML interpreter, neither src attribute nor content nor DOM is given"; } if (_invokedInterpreter) { + if (req.elem && HAS_ATTR(req.elem, "initial")) { + _invokedInterpreter.setInitalConfiguration(InterpreterImpl::tokenize(ATTR(req.elem, "initial"))); + } + DataModel dataModel(_invokedInterpreter.getImpl()->getDataModel()); _invokedInterpreter.getImpl()->setParentQueue(&_parentQueue); |