[Interest] Again trouble with SCXML donedata
Ulf Hermann
ulf.hermann at qt.io
Tue Jan 3 12:23:01 CET 2017
Hello,
> [...]
>
> EventConnection {
>
> stateMachine: p.stateMachine
>
> events: ["done.state.Leave"]
>
> onOccurred: {
>
> console.log("done: " + event.name + " [" + event.data + "]")
>
> }
>
> }
>
> [...]
>
done.state.* events are internal. You can expose them using this snippet of scxml:
<transition event="done.state.*" cond="_event.type === 'internal'">
<send eventexpr="_event.name">
<param name="value" expr="_event.data.value"/>
</send>
</transition>
It requires the ecmascript data model and knowledge of the possible parameters, though. Also, <donedata> is sent with the done.state event of the parent state, not the done.state event for the <final> itself. That is, you want to listen for done.state.<Leave's parent> here, not done.state.Leave.
(I'm just realizing that the ftpclient example that comes with 5.8 is actually invalid scxml. If it wasn't, it would be a great example for how to forward events. So, don't look at it until it's fixed.)
regards,
Ulf
More information about the Interest
mailing list