Replies: 3 comments 2 replies
-
I noticed the helper function |
Beta Was this translation helpful? Give feedback.
-
However, I still wonder about the roles of a common event and an SCXML event in Is an SCXML event more powerful than a common event? I want to listen to people's ideas and suggestions, and try to post a PR for adding the |
Beta Was this translation helpful? Give feedback.
-
I also think this is a good change . |
Beta Was this translation helpful? Give feedback.
-
I wang to empower a commen event more like an SCXML event.
There is no global context to manage the namespace of machines. So we cannot send an event to another machine easily.
But we can manage the global namespace ourselves and dynamically create machines with our context.
Then ref to other machines could be reached in runtime and call
send
method of other machines in our actions or whatever.Although we could call
send
directly with payload, there is no information about the event's origin (The inspector cannot generate a sequence step by calling the machine'ssend
method directly even in an action).The point is there is only one way to implement this currently if I want the event to have an origin machine (so the inspector could generate a sequence diagram well): constructing an SCXML event to the
send
method.Write an SCXML event is very inconvenient.
Ex, if I want to construct an SCXML event to represent an event whose type is
foo
:Maybe we can add the
origin
parameter tosend
method ofInterpreter
. Like:BTW, I am not sure if it's a good practice to call other machines'
send
method in actions.Insight from #1773 (comment)
Beta Was this translation helpful? Give feedback.
All reactions