[ 
https://issues.apache.org/jira/browse/SCXML-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ate Douma closed SCXML-164.
---------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.0)

After looking at this example in more detail it turns out it uses a model 
configuration which no longer is valid nor supported with the latest SCXML 
specification and neither Commons SCXML 2+.

So further investigating this doesn't make much sense anymore.

> In Parallel, it is not work when State transitions to History.
> --------------------------------------------------------------
>
>                 Key: SCXML-164
>                 URL: https://issues.apache.org/jira/browse/SCXML-164
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.9
>         Environment: MAC OS X version 10.6.8
>            Reporter: Arnon
>
> The problem was occurred when using Parallel and History together.
> 2011-12-28 15:08:03,775 INFO : Illegal state machine configuration!
> org.apache.commons.scxml.model.ModelException: Illegal state machine
> configuration!
>     at
> org.apache.commons.scxml.semantics.SCXMLSemanticsImpl.followTransitions(SCXMLSemanticsImpl.java:703)
>     at
> org.apache.commons.scxml.SCXMLExecutor.triggerEvents(SCXMLExecutor.java:127)
>     at
> org.apache.commons.scxml.env.AbstractStateMachine.fireEvent(AbstractStateMachine.java:201)
> This exception was fired when transition from "S1" to "History" by
> triggering "Sig1" event (History was already memorized). After the 
> investigation, if we want to transition to History in any States in Parallel, 
> it seems that SCXML requires triggering the same event(that is "Sig1" in this 
> case) for all States in Parallel node(It works fine if we create Transition 
> to self with event "Sig1" on State "S10"), which I think it is not correct.
> The equivalent SCXML is following:
> <?xml version="1.0" encoding="UTF-8"?>
> <scxml xmlns="http://www.w3.org/2005/07/scxml"; version="null"
> initial="Main">
>  <!-- http://commons.apache.org/scxml -->
>  <parallel id="Main">
>   <state id="region_Region1">
>    <initial>
>     <transition target="S1">
>     </transition>
>    </initial>
>    <state id="S7">
>     <initial>
>      <transition target="s4">
>      </transition>
>     </initial>
>     <history id="History" type="shallow">
>      <transition>
>       <target>       <state id="s4">
>         <transition event="Sig3" target="S3">
>         </transition>
>        </state>
>       </target>     </transition>
>     </history>
>     <transition event="Sig2" target="S1">
>     </transition>
>     <state id="S3">
>     </state>
>     <state id="s4">
>      <transition event="Sig3" target="S3">
>      </transition>
>     </state>
>    </state>
>    <state id="S1">
>     <transition event="Sig1" target="History">
>     </transition>
>     <transition event="Sig0" target="S7">
>     </transition>
>    </state>
>   </state>
>   <state id="region_Region2">
>    <initial>
>     <transition target="S10">
>     </transition>
>    </initial>
>    <state id="S10">
>    </state>
>   </state>
>  </parallel>
> </scxml>
> From the source, active states was not valid in Parallel
>         if (!SCXMLHelper.isLegalConfig(targetSet, errorReporter)) {
>             throw new ModelException("Illegal state machine
> configuration!");
>         }
> in SCXMLHelper.isLegalConfig(targetSet, errorReporter):
>         if (tt instanceof Parallel) {
>             Parallel p = (Parallel) tt;
>             if (count.size() < p.getChildren().size()) {
>                 errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
>                     "Not all AND states active for parallel "
>                     + p.getId(), entry);
>                 legalConfig = false;
>             }
>         }



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to