commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SCXML-164) In Parallel, it is not work when State transitions to History.
Date Sun, 16 Feb 2014 01:01:24 GMT

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

Ate Douma updated SCXML-164:
----------------------------

    Fix Version/s: 2.0

> 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
>             Fix For: 2.0
>
>
> 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.1.5#6160)

Mime
View raw message