Re: History transition executable content - when is it executed?

Le 25 mar 2014 à 07:42, Ate Douma <ate@douma.nu> a écrit :

> I agree this should be properly fixed in the algorithm, but I dislike kludging some extra attribute on a state object for the duration and scope of one micro step only. If possible I'd keep the SCXML element model definitions independent of current execution state and context.
> 
> A maybe cleaner way to do is to introduce and use a temporary table<State.id,Transition> data structure and use that to keep track and look up the History transition to be executed when entering a state.
> […]

Who said the pseudocode was Java? Guys, you know you can implement the spec without transposing the pseudocode word for word, right?
I'm not defending one way to write this or the other, I'm just saying, do whatever is easier to understand and shorter to read.
Most importantly, describe the intended timing precisely in the prose.

> Note also I put the History transition handling after its parent initial.transition handling explicitly, as the parent.initial might actually be the one which targeted the History. Therefore their execution order is significant.

initial targetting history… right, I never thought of that. So there is actually a way to have to run both executable contents. I agree with the order of execution, of course.

			David

Received on Tuesday, 25 March 2014 07:37:26 UTC