summaryrefslogtreecommitdiffstats
path: root/src/uscxml/interpreter/InterpreterRC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/interpreter/InterpreterRC.cpp')
-rw-r--r--src/uscxml/interpreter/InterpreterRC.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/uscxml/interpreter/InterpreterRC.cpp b/src/uscxml/interpreter/InterpreterRC.cpp
index 0237618..b933993 100644
--- a/src/uscxml/interpreter/InterpreterRC.cpp
+++ b/src/uscxml/interpreter/InterpreterRC.cpp
@@ -295,14 +295,22 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab
}
if (isFinal(s)) {
- internalDoneSend(s);
- if (parentIsScxmlState(s)) {
+ Element<std::string> parent = (Element<std::string>)s.getParentNode();
+
+ Arabica::DOM::Element<std::string> doneData;
+ Arabica::XPath::NodeSet<std::string> doneDatas = filterChildElements(_nsInfo.xmlNSPrefix + "donedata", s);
+ if (doneDatas.size() > 0) {
+ // only process first donedata element
+ doneData = Element<std::string>(doneDatas[0]);
+ }
+ internalDoneSend(parent, doneData);
+
+ if (parentIsScxmlState(s)) {
_topLevelFinalReached = true;
} else {
- Element<std::string> parent = (Element<std::string>)s.getParentNode();
Element<std::string> grandParent = (Element<std::string>)parent.getParentNode();
- internalDoneSend(parent);
+// internalDoneSend(parent, Arabica::DOM::Element<std::string>());
if (isParallel(grandParent)) {
Arabica::XPath::NodeSet<std::string> childs = getChildStates(grandParent);
@@ -314,7 +322,7 @@ void InterpreterRC::enterStates(const Arabica::XPath::NodeSet<std::string>& enab
}
}
if (inFinalState) {
- internalDoneSend(grandParent);
+ internalDoneSend(grandParent, Arabica::DOM::Element<std::string>());
}
}
}