added test 580

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

added test 580

Jim Barnett
I've added test580, which checks to see that the history state doesn't
end up in the state configuration.  What other tests do you think that
we need?
--
Jim Barnett
Genesys

Reply | Threaded
Open this post in threaded view
|

Re: added test 580

David Junger
Le 8 apr 2014 à 20:34, Jim Barnett <[hidden email]> a écrit :

> I've added test580, which checks to see that the history state doesn't end up in the state configuration.

The link for test 580 ends with /579/test580.txml which of course fails. Otherwise, the test passes but I'm not sure it's effective.
If I follow the former behavior of JSSC that created the bug that started this, then it would enter sh1, then take the transition to s01 without exiting s0 since s0 is the LCCA. It would no longer be in sh1 when it enters s01.
You should put the transition with In('sh1') in a parallel state so it can react while sh1 is still active in the above scenario. Like this:

<scxml>
        <parallel>
                <state id="s0">
                        …
                </state>
                <state id="observer">
                        <transition target="fail" cond="In('sh1')"/>
                </state>
        </parallel>
        <final id="pass">…</final>
        <final id="fail">…</final>
</sxml>

                        David
Reply | Threaded
Open this post in threaded view
|

Re: added test 580

Jim Barnett
I've updated 580 to put the test of the configuration in a parallel state.

- Jim
On 4/8/2014 3:29 PM, David Junger wrote:

> Le 8 apr 2014 à 20:34, Jim Barnett <[hidden email]> a écrit :
>
>> I've added test580, which checks to see that the history state doesn't end up in the state configuration.
> The link for test 580 ends with /579/test580.txml which of course fails. Otherwise, the test passes but I'm not sure it's effective.
> If I follow the former behavior of JSSC that created the bug that started this, then it would enter sh1, then take the transition to s01 without exiting s0 since s0 is the LCCA. It would no longer be in sh1 when it enters s01.
> You should put the transition with In('sh1') in a parallel state so it can react while sh1 is still active in the above scenario. Like this:
>
> <scxml>
> <parallel>
> <state id="s0">
> …
> </state>
> <state id="observer">
> <transition target="fail" cond="In('sh1')"/>
> </state>
> </parallel>
> <final id="pass">…</final>
> <final id="fail">…</final>
> </sxml>
>
> David

--
Jim Barnett
Genesys