serial versus parallel sequence of invoke elements in a state #28
Replies: 5 comments 4 replies
-
If I understood you correctly, you need to execute submachines in sequence. In this case you need to use auto generated submachine event invoke_in_seq.mp4parent machine <scxml datamodel="ecmascript" name="ScxmlParent" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<state id="child1">
<invoke autoforward="true" id="ID_1" src="machine_child.scxml"/>
<transition event="done.invoke.ID_1" target="child2"/>
</state>
<state id="child2">
<invoke autoforward="true" id="ID_2" src="machine_child.scxml"/>
<transition event="done.invoke.ID_2" target="FinalShape1"/>
</state>
<final id="FinalShape1"/>
</scxml> child machine <scxml datamodel="ecmascript" name="ScxmlChild" version="1.0" xmlns="http://www.w3.org/2005/07/scxml">
<state id="childStart">
<onentry>
<raise event="event"/>
</onentry>
<transition event="event" target="childFinish"/>
</state>
<final id="childFinish"/>
</scxml> |
Beta Was this translation helpful? Give feedback.
-
No, I would like to avoid putting every invoke in a separate state. I would prefer to have all invoke elements in a single atomic state. question: what is the semantic of Are these 3 invoke elements executed in parallel or in serial based on the standard? I would like to avoid any solution that puts these 3 invokes in separate states!!! |
Beta Was this translation helpful? Give feedback.
-
None of these solutions are good. As I said I do NOT a solution that puts every invoke element in a separate state. Your example above puts all invoke element in separate states which I dont want. There is the paper "Introduction to SCXML" by Jim Barnett. On page 93 it shows an example with 2 invokes in a single state. What is the semantic of this? Are there 2 separate sessions started - one for every invoke? |
Beta Was this translation helpful? Give feedback.
-
what actually means stable state. I read the language specification but cannot really figure out what that means. Let's assume that SM voice does a lot of processing for 1 hour or so by invoking external web services or whatever. does this mean that SM GUI has to wait for that until it will be invoked? It is important for me that I can invoke some compute task inside a state. This can be a web service, serverless functions or whatever. most likely a program that runs outside of SCXML. But it does a lot of data processing. Then the question is when is this state with this processing task stable? Before it starts this task or afterwards? |
Beta Was this translation helpful? Give feedback.
-
Is it correct that a sequence of
elements
in a specific state is executed by the underlying runtime system in parallel?
so for instance
<invoke type="vxml" ...>
<invoke type="html" ...>
would make the underlying runtime system to executed them in parallel. Is this correct?
If this is true, then what is an elegant way to specify a sequence of elements as part of a specific state in serial, thus they are actually executed serially?
I would like to have a solution that does not put every in a separate state and use transition to pass over them serially.
Beta Was this translation helpful? Give feedback.
All reactions