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

Ate Douma closed SCXML-37.
--------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 2.0)

This no longer is a 'problem' in the sense that the specification no longer 
even defines/allows the state (or parallel) src attribute.

As such, this Commons SCXML feature no longer is 'standard' and this neither 
can be a violation of the specification.
Maybe we can/should revisit the usefulness of allowing both external source and 
children sometime later, but formally there is no (longer) reason to disallow 
it.

> state with src attribute must not have children
> -----------------------------------------------
>
>                 Key: SCXML-37
>                 URL: https://issues.apache.org/jira/browse/SCXML-37
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.6
>         Environment: Win XP, JDK 1.5  Eclipse 3.2, JUnit 4, details on request
>            Reporter: Wolfgang Frech
>            Priority: Minor
>
> The Digester accepts an SCXML model with a state that has both a src 
> attribute (and its contents defined in an external file), and an additional 
> onentry child.
> According to the WD-SCXML section 3.2.1, "If [the src attribute] is present, 
> no children are allowed."
> Test case to demonstrate the actual behavior follows
> JUnit test method
> ----
>       @Test
>       public void externalStateWithChildren() throws FileNotFoundException,
>                       IOException, SAXException, ModelException {
>               final URL definition = getClass().getClassLoader().getResource(
>                               "externalStateWithChild-main.scxml");
>               SCXML scxml = SCXMLDigester.digest(definition, new 
> SimpleErrorHandler());
>               // expected/correct: digesting should throw exception
>               // according to WD-SCXML 3.2.1 "If [the src attribute] is 
> present, no
>               // children are allowed."
>               // actual/incorrect
>               assertNotNull(scxml);
>       }
> ----
> main scxml
> ----
> <?xml version="1.0"?>
> <scxml
>   xmlns="http://www.w3.org/2005/07/scxml";
>   version="1.0"
>   initialstate="external">
>   <state
>     id="external"
>     src="externalStateWithChild-external.scxml">
>     <onentry>
>       <log
>         expr="'This onentry child should not be accepted according to 
> WD-SCXML 3.2.1 Description'" />
>     </onentry>
>   </state>
> ----
> external scxml
> ----
> ?xml version="1.0"?>
> <scxml
>   xmlns="http://www.w3.org/2005/07/scxml";
>   version="1.0"
>   initialstate="start">
>   <state id="start" /> 
> </scxml>



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to