diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-08-25 10:41:58 (GMT) |
commit | 26183abd9acd44a0382e55cc985795ee7c526aed (patch) | |
tree | a9d9289397b65892dbad037d02460cf2d04597fb /src/uscxml/plugins/invoker/scxml | |
parent | bd45c688b3d3aad5d62b85457ce943eaadf989ae (diff) | |
download | uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.zip uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.gz uscxml-26183abd9acd44a0382e55cc985795ee7c526aed.tar.bz2 |
Updated W3C tests and bug-fixes
Diffstat (limited to 'src/uscxml/plugins/invoker/scxml')
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index c697993..85c4b9c 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -35,7 +35,7 @@ Data USCXMLInvoker::getDataModelVariables() { } void USCXMLInvoker::send(const SendRequest& req) { - _invokedInterpreter.getImpl()->_externalQueue.push(req); + _invokedInterpreter.receive(req); } void USCXMLInvoker::cancel(const std::string sendId) { @@ -46,7 +46,12 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { if (req.src.length() > 0) { _invokedInterpreter = Interpreter::fromURI(req.src); } else if (req.dom) { - _invokedInterpreter = Interpreter::fromDOM(req.dom); + Arabica::DOM::DOMImplementation<std::string> domFactory = Arabica::SimpleDOM::DOMImplementation<std::string>::getDOMImplementation(); + Arabica::DOM::Document<std::string> dom = domFactory.createDocument(req.dom.getNamespaceURI(), "", 0); + // we need to import the parent - to support xpath test150 + Arabica::DOM::Node<std::string> newNode = dom.importNode(req.dom, true); + dom.appendChild(newNode); + _invokedInterpreter = Interpreter::fromDOM(dom); } else if (req.content.size() > 0) { _invokedInterpreter = Interpreter::fromXML(req.content); } else { @@ -73,7 +78,8 @@ void USCXMLInvoker::invoke(const InvokeRequest& req) { /// test240 assumes that invoke request params will carry over to the datamodel _invokedInterpreter.getImpl()->setInvokeRequest(req); - _invokedInterpreter.getImpl()->start(); + _invokedInterpreter.start(); +// tthread::this_thread::sleep_for(tthread::chrono::seconds(1)); } else { /// test 530 _parentInterpreter->receive(Event("done.invoke." + _invokeId, Event::PLATFORM)); |