commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1580369 [4/5] - in /commons/proper/scxml/trunk/src: main/java/org/apache/commons/scxml2/ main/java/org/apache/commons/scxml2/env/ main/java/org/apache/commons/scxml2/env/groovy/ main/java/org/apache/commons/scxml2/env/jexl/ main/java/org/a...
Date Sat, 22 Mar 2014 23:34:23 GMT
Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLExecutorTest.java Sat Mar 22 23:34:20 2014
@@ -24,8 +24,8 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.env.groovy.GroovyContext;
 import org.apache.commons.scxml2.env.groovy.GroovyEvaluator;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.TransitionTarget;
 import org.junit.After;
 import org.junit.Assert;
@@ -192,7 +192,7 @@ public class SCXMLExecutorTest {
     public void testSCXMLExecutorPrefix01Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(prefix01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
@@ -204,7 +204,7 @@ public class SCXMLExecutorTest {
     public void testSCXMLExecutorTransitions01Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(transitions01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("twenty_one", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "twenty_one.done");
@@ -218,7 +218,7 @@ public class SCXMLExecutorTest {
     public void testSCXMLExecutorTransitions02Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(transitions02);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.stay");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.stay");
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("ten", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testExecutorSerializability(exec);
@@ -234,7 +234,7 @@ public class SCXMLExecutorTest {
     public void testSCXMLExecutorTransitions03Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(transitions03);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
         Assert.assertEquals(3, currentStates.size());
         Set<String> expected = new HashSet<String>();
         expected.add("twenty_one_2");
@@ -254,7 +254,7 @@ public class SCXMLExecutorTest {
         Assert.assertNotNull(scxml);
         exec = SCXMLTestHelper.getExecutor(scxml);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
         Assert.assertEquals(3, currentStates.size());
         Set<String> expected = new HashSet<String>();
         expected.add("twenty_one_1");
@@ -297,7 +297,7 @@ public class SCXMLExecutorTest {
     public void testSend01Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(send01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
@@ -309,7 +309,7 @@ public class SCXMLExecutorTest {
     public void testSend02TypeSCXMLSample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(send02);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("ninety", currentStates.iterator().next().getId());
         Assert.assertTrue(exec.getCurrentStatus().isFinal());
@@ -360,13 +360,13 @@ public class SCXMLExecutorTest {
     }
 
     private void checkMicrowave01Sample() throws Exception {
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("cooking", currentStates.iterator().next().getId());
     }
 
     private void checkMicrowave02Sample() throws Exception {
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
         Assert.assertEquals(2, currentStates.size());
         String id = (currentStates.iterator().next()).getId();
         Assert.assertTrue(id.equals("closed") || id.equals("cooking"));

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLHelperTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLHelperTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLHelperTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLHelperTest.java Sat Mar 22 23:34:20 2014
@@ -21,6 +21,7 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.env.MockErrorReporter;
 import org.apache.commons.scxml2.env.SimpleErrorReporter;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.Parallel;
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.TransitionTarget;
@@ -87,22 +88,22 @@ public class SCXMLHelperTest {
     public void testGetAncestorClosureEmptySet() {
         Set<TransitionTarget> states = new HashSet<TransitionTarget>();
         
-        Set<TransitionTarget> returnValue = SCXMLHelper.getAncestorClosure(states, new HashSet<TransitionTarget>());
+        Set<EnterableState> returnValue = SCXMLHelper.getAncestorClosure(states, new HashSet<TransitionTarget>());
         
         Assert.assertEquals(0, returnValue.size());
     }
     
     @Test
     public void testGetAncestorClosureUpperBoundNotNullAndContains() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
-        TransitionTarget state = new State();
+        Set<EnterableState> states = new HashSet<EnterableState>();
+        EnterableState state = new State();
         state.setId("1");
         states.add(state);
         
-        Set<TransitionTarget> upperBounds = new HashSet<TransitionTarget>();
+        Set<EnterableState> upperBounds = new HashSet<EnterableState>();
         upperBounds.add(state);
         
-        Set<TransitionTarget> returnValue = SCXMLHelper.getAncestorClosure(states, upperBounds);
+        Set<EnterableState> returnValue = SCXMLHelper.getAncestorClosure(states, upperBounds);
         
         Assert.assertEquals(1, returnValue.size());
         Assert.assertEquals("1", ((TransitionTarget)returnValue.toArray()[0]).getId());
@@ -110,30 +111,31 @@ public class SCXMLHelperTest {
     
     @Test
     public void testGetAncestorClosureContainsParent() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
-        TransitionTarget state = new State();
+        Set<EnterableState> states = new HashSet<EnterableState>();
+        EnterableState parent = new State();
+        parent.setId("0");
+        EnterableState state = new State();
         state.setId("1");
-        state.setParent(state);
+        state.setParent(parent);
         states.add(state);
         
-        Set<TransitionTarget> upperBounds = new HashSet<TransitionTarget>();
+        Set<EnterableState> upperBounds = new HashSet<EnterableState>();
         
-        Set<TransitionTarget> returnValue = SCXMLHelper.getAncestorClosure(states, upperBounds);
+        Set<EnterableState> returnValue = SCXMLHelper.getAncestorClosure(states, upperBounds);
         
-        Assert.assertEquals(1, returnValue.size());
-        Assert.assertEquals("1", ((TransitionTarget)returnValue.toArray()[0]).getId());
+        Assert.assertEquals(2, returnValue.size());
     }
     
     @Test
     public void testIsLegalConfigNoStates() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
+        Set<EnterableState> states = new HashSet<EnterableState>();
         
         Assert.assertTrue(SCXMLHelper.isLegalConfig(states, new SimpleErrorReporter()));
     }
     
     @Test
     public void testIsLegalConfigInvalidParallel() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
+        Set<EnterableState> states = new HashSet<EnterableState>();
         Parallel parallel = new Parallel();
 
         Parallel parent = new Parallel();
@@ -160,7 +162,7 @@ public class SCXMLHelperTest {
     
     @Test
     public void testIsLegalConfigMultipleTopLevel() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
+        Set<EnterableState> states = new HashSet<EnterableState>();
 
         State state1 = new State();
         state1.setId("1");
@@ -179,7 +181,7 @@ public class SCXMLHelperTest {
     
     @Test
     public void testIsLegalConfigMultipleStatesActive() {
-        Set<TransitionTarget> states = new HashSet<TransitionTarget>();
+        Set<EnterableState> states = new HashSet<EnterableState>();
 
         State state1 = new State();
         state1.setId("1");

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/SCXMLTestHelper.java Sat Mar 22 23:34:20 2014
@@ -37,6 +37,7 @@ import org.apache.commons.scxml2.env.jex
 import org.apache.commons.scxml2.io.SCXMLReader;
 import org.apache.commons.scxml2.io.SCXMLReader.Configuration;
 import org.apache.commons.scxml2.model.CustomAction;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.ModelException;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.TransitionTarget;
@@ -171,22 +172,22 @@ public class SCXMLTestHelper {
     }
 
     public static Context lookupContext(SCXMLExecutor exec,
-            TransitionTarget tt) {
-        return exec.getSCInstance().lookupContext(tt);
+            EnterableState es) {
+        return exec.getSCInstance().lookupContext(es);
     }
 
     public static Context lookupContext(SCXMLExecutor exec,
             String id) {
         TransitionTarget tt = lookupTransitionTarget(exec, id);
-        if (tt == null) {
+        if (tt == null || !(tt instanceof EnterableState)) {
             return null;
         }
-        return exec.getSCInstance().lookupContext(tt);
+        return exec.getSCInstance().lookupContext((EnterableState)tt);
     }
 
     public static void assertState(SCXMLExecutor exec,
             String expectedStateId) throws Exception {
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals("Expected 1 simple (leaf) state with id '"
             + expectedStateId + "' but found " + currentStates.size() + " states instead.",
             1, currentStates.size());
@@ -194,23 +195,23 @@ public class SCXMLTestHelper {
             next().getId());
     }
 
-    public static Set<TransitionTarget> fireEvent(SCXMLExecutor exec, String name) throws Exception {
+    public static Set<EnterableState> fireEvent(SCXMLExecutor exec, String name) throws Exception {
         return fireEvent(exec, name, null);
     }
 
-    public static Set<TransitionTarget> fireEvent(SCXMLExecutor exec, String name, Object payload) throws Exception {
+    public static Set<EnterableState> fireEvent(SCXMLExecutor exec, String name, Object payload) throws Exception {
         TriggerEvent[] evts = {new TriggerEvent(name,
                 TriggerEvent.SIGNAL_EVENT, payload)};
         exec.triggerEvents(evts);
         return exec.getCurrentStatus().getStates();
     }
 
-    public static Set<TransitionTarget> fireEvent(SCXMLExecutor exec, TriggerEvent te) throws Exception {
+    public static Set<EnterableState> fireEvent(SCXMLExecutor exec, TriggerEvent te) throws Exception {
         exec.triggerEvent(te);
         return exec.getCurrentStatus().getStates();
     }
 
-    public static Set<TransitionTarget> fireEvents(SCXMLExecutor exec, TriggerEvent[] evts) throws Exception {
+    public static Set<EnterableState> fireEvents(SCXMLExecutor exec, TriggerEvent[] evts) throws Exception {
         exec.triggerEvents(evts);
         return exec.getCurrentStatus().getStates();
     }
@@ -239,7 +240,7 @@ public class SCXMLTestHelper {
 
     public static void assertPostTriggerState(SCXMLExecutor exec,
             TriggerEvent triggerEvent, String expectedStateId) throws Exception {
-        Set<TransitionTarget> currentStates = fireEvent(exec, triggerEvent);
+        Set<EnterableState> currentStates = fireEvent(exec, triggerEvent);
         Assert.assertEquals("Expected 1 simple (leaf) state with id '"
             + expectedStateId + "' on firing event " + triggerEvent
             + " but found " + currentStates.size() + " states instead.",
@@ -254,7 +255,7 @@ public class SCXMLTestHelper {
             Assert.fail("Must specify an array of one or more "
                 + "expected state IDs");
         }
-        Set<TransitionTarget> currentStates = fireEvent(exec, triggerEvent);
+        Set<EnterableState> currentStates = fireEvent(exec, triggerEvent);
         int n = expectedStateIds.length;
         Assert.assertEquals("Expected " + n + " simple (leaf) state(s) "
             + " on firing event " + triggerEvent + " but found "
@@ -337,9 +338,7 @@ public class SCXMLTestHelper {
      * @return The <code>id</code> of the active state.
      */
     public static String getCurrentState(SCXMLExecutor exec) {
-        Set<TransitionTarget> current = exec.getCurrentStatus().getStates();
-        TransitionTarget active = current.iterator().next();
-        return active.getId();
+        return exec.getCurrentStatus().getStates().iterator().next().getId();
     }
 
     /**
@@ -362,9 +361,9 @@ public class SCXMLTestHelper {
             throw new IllegalArgumentException("No target with id '" + id
                 + "' present in state machine.");
         }
-        Set<TransitionTarget> current = exec.getCurrentStatus().getStates();
+        Set<EnterableState> current = exec.getCurrentStatus().getStates();
         current.clear();
-        current.add(active);
+        current.add((EnterableState)active);
     }
 
     public static String removeCarriageReturns(final String original) {

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/StatusTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/StatusTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/StatusTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/StatusTest.java Sat Mar 22 23:34:20 2014
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.scxml2;
 
+import org.apache.commons.scxml2.model.Final;
 import org.apache.commons.scxml2.model.State;
 import org.junit.Assert;
 import org.junit.Before;
@@ -33,8 +34,7 @@ public class StatusTest {
     @Test
     public void testIsFinalStateFalse() {
         State state = new State();
-        state.setFinal(false);
-        
+
         status.getStates().add(state);
         
         Assert.assertFalse(status.isFinal());
@@ -42,8 +42,7 @@ public class StatusTest {
     
     @Test
     public void testIsFinalStateHasParent() {
-        State state = new State();
-        state.setFinal(true);
+        Final state = new Final();
         state.setParent(new State());
         
         status.getStates().add(state);
@@ -53,8 +52,7 @@ public class StatusTest {
     
     @Test
     public void testIsFinalStateHasEvent() {
-        State state = new State();
-        state.setFinal(true);
+        Final state = new Final();
         
         status.getStates().add(state);
         status.getEvents().add(new TriggerEvent("name", TriggerEvent.CALL_EVENT));
@@ -64,8 +62,7 @@ public class StatusTest {
     
     @Test
     public void testIsFinalState() {
-        State state = new State();
-        state.setFinal(true);
+        Final state = new Final();
         
         status.getStates().add(state);
         

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/TieBreakerTest.java Sat Mar 22 23:34:20 2014
@@ -19,6 +19,7 @@ package org.apache.commons.scxml2;
 import java.net.URL;
 import java.util.Set;
 
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.TransitionTarget;
 import org.junit.After;
 import org.junit.Assert;
@@ -78,7 +79,7 @@ public class TieBreakerTest {
     public void testTieBreaker01() throws Exception {
         exec = SCXMLTestHelper.getExecutor(tiebreaker01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("ten", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
@@ -90,7 +91,7 @@ public class TieBreakerTest {
     public void testTieBreaker02() throws Exception {
         exec = SCXMLTestHelper.getExecutor(tiebreaker02);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("eleven", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
@@ -102,7 +103,7 @@ public class TieBreakerTest {
     public void testTieBreaker03() throws Exception {
         exec = SCXMLTestHelper.getExecutor(tiebreaker03);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("eleven", currentStates.iterator().next().getId());
         currentStates = SCXMLTestHelper.fireEvent(exec, "ten.done");
@@ -114,7 +115,7 @@ public class TieBreakerTest {
     public void testTieBreaker04() throws Exception {
         exec = SCXMLTestHelper.getExecutor(tiebreaker04);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "event_2");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "event_2");
         Assert.assertEquals(1, currentStates.size());
         currentStates = SCXMLTestHelper.fireEvent(exec, "event_1");
         Assert.assertEquals(1, currentStates.size());
@@ -124,7 +125,7 @@ public class TieBreakerTest {
     public void testTieBreaker05() throws Exception {
         exec = SCXMLTestHelper.getExecutor(tiebreaker05);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(3, currentStates.size());
         for (TransitionTarget tt : currentStates) {
             String id = tt.getId();
@@ -144,7 +145,7 @@ public class TieBreakerTest {
     public void testTieBreaker06() throws Exception {
         exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(tiebreaker06));
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
     }
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WildcardTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WildcardTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WildcardTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WildcardTest.java Sat Mar 22 23:34:20 2014
@@ -19,7 +19,7 @@ package org.apache.commons.scxml2;
 import java.net.URL;
 import java.util.Set;
 
-import org.apache.commons.scxml2.model.TransitionTarget;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -60,7 +60,7 @@ public class WildcardTest {
     public void testWildcard01Sample() throws Exception {
     	exec = SCXMLTestHelper.getExecutor(wildcard01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testExecutorSerializability(exec);
@@ -73,7 +73,7 @@ public class WildcardTest {
     public void testWildcard02Sample() throws Exception {
         exec = SCXMLTestHelper.getExecutor(SCXMLTestHelper.parse(wildcard02));
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("state2", currentStates.iterator().next().getId());
     }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WizardsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WizardsTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WizardsTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/WizardsTest.java Sat Mar 22 23:34:20 2014
@@ -25,8 +25,9 @@ import java.util.Set;
 import org.apache.commons.scxml2.env.Tracer;
 import org.apache.commons.scxml2.env.jexl.JexlContext;
 import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.TransitionTarget;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -67,7 +68,7 @@ public class WizardsTest {
     public void testWizard01Sample() throws Exception {
     	exec = SCXMLTestHelper.getExecutor(wizard01);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testExecutorSerializability(exec);
@@ -95,7 +96,7 @@ public class WizardsTest {
         Assert.assertNotNull(exec);
         // If you change this, you must also change
         // the TestEventDispatcher
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("state2", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testExecutorSerializability(exec);

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-01.xml Sat Mar 22 23:34:20 2014
@@ -23,7 +23,7 @@
        version="1.0"
        initial="custom">
 
-    <state id="custom" final="true">
+    <final id="custom">
 
         <onentry>
             <my:hello name="world" />
@@ -31,7 +31,7 @@
             <foo:bar name="custom action" />
         </onentry>
 
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-02.xml Sat Mar 22 23:34:20 2014
@@ -21,13 +21,13 @@
        version="1.0"
        initial="custom">
 
-    <state id="custom" final="true">
+    <final id="custom">
         
         <onentry>
             <my:hello name="child (included) document" />
         </onentry>
 
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-03.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-03.xml Sat Mar 22 23:34:20 2014
@@ -21,13 +21,13 @@
        version="1.0"
        initial="custom">
 
-    <state id="custom" final="true">
+    <final id="custom">
         
         <onentry>
             <my:send name="overridden local name" />
         </onentry>
 
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-04-jexl.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-04-jexl.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-04-jexl.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/custom-hello-world-04-jexl.xml Sat Mar 22 23:34:20 2014
@@ -55,7 +55,7 @@
         <transition target="end" cond="helloName1 eq 'custom04b'" />
     </state>
 
-    <state id="end" final="true"/>
+    <final id="end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/AbstractSCXMLListenerTest.java Sat Mar 22 23:34:20 2014
@@ -17,6 +17,7 @@
 package org.apache.commons.scxml2.env;
 
 import org.apache.commons.scxml2.SCXMLListener;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.State;
 import org.apache.commons.scxml2.model.Transition;
 import org.apache.commons.scxml2.model.TransitionTarget;
@@ -31,8 +32,8 @@ import org.junit.Test;
 public class AbstractSCXMLListenerTest {
 
     // Test data
-    private TransitionTarget to;
-    private TransitionTarget from;
+    private State to;
+    private State from;
     private Transition transition;
     private boolean heardOnEntry;
     private boolean heardOnExit;
@@ -65,18 +66,18 @@ public class AbstractSCXMLListenerTest {
     public void testAbstractSCXMLListener0() {
         SCXMLListener listener0 = new AbstractSCXMLListener() {
                 /**
-                 * @see SCXMLListener#onEntry(TransitionTarget)
+                 * @see SCXMLListener#onEntry(EnterableState)
                  */
                 @Override
-                public void onEntry(TransitionTarget state) {
+                public void onEntry(EnterableState state) {
                     heardOnEntry = true;
                 }
 
                 /**
-                 * @see SCXMLListener#onExit(TransitionTarget)
+                 * @see SCXMLListener#onExit(EnterableState)
                  */
                 @Override
-                public void onExit(TransitionTarget state) {
+                public void onExit(EnterableState state) {
                     heardOnExit = true;
                 }
 
@@ -105,18 +106,18 @@ public class AbstractSCXMLListenerTest {
     public void testAbstractSCXMLListener1() {
         SCXMLListener listener1 = new AbstractSCXMLListener() {
                 /**
-                 * @see SCXMLListener#onEntry(TransitionTarget)
+                 * @see SCXMLListener#onEntry(EnterableState)
                  */
                 @Override
-                public void onEntry(TransitionTarget state) {
+                public void onEntry(EnterableState state) {
                     heardOnEntry = true;
                 }
 
                 /**
-                 * @see SCXMLListener#onExit(TransitionTarget)
+                 * @see SCXMLListener#onExit(EnterableState)
                  */
                 @Override
-                public void onExit(TransitionTarget state) {
+                public void onExit(EnterableState state) {
                     heardOnExit = true;
                 }
             };
@@ -136,10 +137,10 @@ public class AbstractSCXMLListenerTest {
     public void testAbstractSCXMLListener2() {
         SCXMLListener listener2 = new AbstractSCXMLListener() {
                 /**
-                 * @see SCXMLListener#onEntry(TransitionTarget)
+                 * @see SCXMLListener#onEntry(EnterableState)
                  */
                 @Override
-                public void onEntry(TransitionTarget state) {
+                public void onEntry(EnterableState state) {
                     heardOnEntry = true;
                 }
             };

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatch.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatch.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatch.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/StopWatch.java Sat Mar 22 23:34:20 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.scxml2.env;
 
-import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
 
@@ -95,8 +94,7 @@ public class StopWatch extends AbstractS
 
     // used by the demonstration (see StopWatchDisplay usecase)
     public String getCurrentState() {
-        Set<TransitionTarget> states = getEngine().getCurrentStatus().getStates();
-        return states.iterator().next().getId();
+        return getEngine().getCurrentStatus().getStates().iterator().next().getId();
     }
 
     private void increment() {

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/GroovyClosureTest.java Sat Mar 22 23:34:20 2014
@@ -21,9 +21,10 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.State;
-import org.apache.commons.scxml2.model.TransitionTarget;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,7 +37,7 @@ public class GroovyClosureTest {
         Assert.assertNotNull(scxml);
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor(scxml, new GroovyContext(), new GroovyEvaluator(true));
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
+        Set<EnterableState> currentStates = SCXMLTestHelper.fireEvent(exec, "turn_on");
         Assert.assertEquals(2, currentStates.size());
         String id = ((State)currentStates.iterator().next()).getId();
         Assert.assertTrue(id.equals("closed") || id.equals("cooking"));

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/SerializableInitialBaseScriptTest.java Sat Mar 22 23:34:20 2014
@@ -21,7 +21,7 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.apache.commons.scxml2.model.TransitionTarget;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -61,7 +61,7 @@ public class SerializableInitialBaseScri
     public void testSerializableInitialBaseScriptSample() throws Exception {
     	exec = SCXMLTestHelper.getExecutor(scxml, new GroovyContext(), new GroovyEvaluator(true));
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("state1", currentStates.iterator().next().getId());
         exec = SCXMLTestHelper.testExecutorSerializability(exec);

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/StaticMethodTest.java Sat Mar 22 23:34:20 2014
@@ -22,7 +22,7 @@ import java.util.Set;
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.apache.commons.scxml2.model.TransitionTarget;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -55,9 +55,27 @@ public class StaticMethodTest {
         jc.set("System", System.class);
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor(staticmethod,
                 jc, new GroovyEvaluator());
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("static", currentStates.iterator().next().getId());
     }
 
+    @Test
+    public void mytest() throws Exception {
+        Object o1, o2 = new Object();
+        o1 = new Object();
+
+        o2 = null;
+        o1 = null;
+        if (val(o1,o2)) {
+            System.out.println("hello");
+        }
+        else {
+            System.out.println("boo");
+        }
+    }
+
+    public boolean val(Object o1, Object o2) {
+        return (o1 == o2);
+    }
 }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/serializable-initial-base-script.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/serializable-initial-base-script.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/serializable-initial-base-script.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/serializable-initial-base-script.xml Sat Mar 22 23:34:20 2014
@@ -48,7 +48,7 @@
     <transition event="foo.*" cond="targets(3)" target="state3"/>
     <transition event="foo.bar.*" cond="targets(4)" target="state4"/>
   </state>
-  <state id="state2" final="true"/>
-  <state id="state3" final="true"/>
-  <state id="state4" final="true"/>
+  <final id="state2"/>
+  <final id="state3"/>
+  <final id="state4"/>
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/static-method.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/static-method.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/static-method.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/groovy/static-method.xml Sat Mar 22 23:34:20 2014
@@ -22,11 +22,11 @@
        version="1.0"
        initial="static">
 
-    <state id="static" final="true">
+    <final id="static">
         <onentry>
             <log expr="'Current time millis: ' + System.currentTimeMillis()" />
         </onentry>
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/JSExampleTest.java Sat Mar 22 23:34:20 2014
@@ -35,10 +35,11 @@ import org.apache.commons.scxml2.SCXMLTe
 import org.apache.commons.scxml2.TriggerEvent;
 import org.apache.commons.scxml2.model.Action;
 import org.apache.commons.scxml2.model.CustomAction;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.ModelException;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.State;
-import org.apache.commons.scxml2.model.TransitionTarget;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -85,10 +86,9 @@ public class JSExampleTest {
         exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
 
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("end", ((State)currentStates.iterator().
-            next()).getId());
+        Assert.assertEquals("end", currentStates.iterator().next().getId());
     }
 
     // INNER CLASSES

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/example-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/example-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/example-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/javascript/example-01.xml Sat Mar 22 23:34:20 2014
@@ -160,10 +160,10 @@
 
  <!-- DONE -->
 
- <state id='end' final='true' >
+ <final id='end'>
   <onentry>
    <log expr='"Ending Javascript sample script: " + new Date()' />
   </onentry>
- </state>
+ </final>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/StaticMethodTest.java Sat Mar 22 23:34:20 2014
@@ -22,7 +22,8 @@ import java.util.Set;
 import org.apache.commons.scxml2.Context;
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.apache.commons.scxml2.model.TransitionTarget;
+import org.apache.commons.scxml2.model.EnterableState;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -55,7 +56,7 @@ public class StaticMethodTest {
         jc.set("System", System.class);
         SCXMLExecutor exec = SCXMLTestHelper.getExecutor(staticmethod,
                 jc, new JexlEvaluator());
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("static", currentStates.iterator().next().getId());
     }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-01.xml Sat Mar 22 23:34:20 2014
@@ -104,7 +104,7 @@
              target="forty" />
         </state>
 
-        <state id="forty" final="true" />
+        <final id="forty"/>
 
     </state>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-02.xml Sat Mar 22 23:34:20 2014
@@ -83,7 +83,7 @@
 
     </state>
 
-    <state id="forty" final="true" />
+    <final id="forty"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-03.xml Sat Mar 22 23:34:20 2014
@@ -252,7 +252,7 @@
 
     </state>
 
-    <state id="seventy" final="true" />
+    <final id="seventy"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/datamodel-04.xml Sat Mar 22 23:34:20 2014
@@ -41,7 +41,7 @@
         </onexit>
     </state>
 
-    <state id="thirty" final="true"/>
+    <final id="thirty"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-01.xml Sat Mar 22 23:34:20 2014
@@ -24,7 +24,7 @@
            <transition event="event.foo" cond="_eventdata eq 3"
                        target="state3"/>
      </state>
-     <state id="state2" final="true"/>
+     <final id="state2"/>
      <state id="state3">
            <transition event="event.bar" target="state4"
                        cond="_eventdatamap['event.bar'] eq 4"/>
@@ -33,11 +33,11 @@
            <transition event="event.bar" target="state6"
                        cond="_eventdatamap['event.bar'] eq 6"/>
      </state>
-     <state id="state4" final="true"/>
-     <state id="state5" final="true"/>
+     <final id="state4"/>
+     <final id="state5"/>
      <state id="state6">
            <transition event="event.baz" target="state7"
                        cond="_eventdatamap['event.baz'] eq 7"/>
      </state>
-     <state id="state7" final="true"/>
+     <final id="state7"/>
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-02.xml Sat Mar 22 23:34:20 2014
@@ -25,7 +25,7 @@
            <transition event="connection.alerting"
                        cond="_eventdata eq 'line2'" target="state2"/>
      </state>
-     <state id="state1" final="true"/>
+     <final id="state1"/>
      <state id="state2">
            <!-- ... or an arbitrary, user defined object. -->
            <transition event="connection.alerting"
@@ -33,6 +33,6 @@
            <transition event="connection.alerting"
                        cond="_eventdata.line eq 4" target="state4"/>
      </state>
-     <state id="state3" final="true"/>
-     <state id="state4" final="true"/>
+     <final id="state3"/>
+     <final id="state4"/>
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-03.xml Sat Mar 22 23:34:20 2014
@@ -44,6 +44,6 @@
             target="thirty"/>
     </state>
 
-    <state id="thirty" final="true"/>
+    <final id="thirty"/>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/eventdata-04.xml Sat Mar 22 23:34:20 2014
@@ -49,7 +49,7 @@
                </transition>
            </state>
 
-           <state id="thirty" final="true"/>
+           <final id="thirty"/>
        </state>
 
    </parallel>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/stateless-01.xml Sat Mar 22 23:34:20 2014
@@ -43,7 +43,7 @@
                         target="thirty" />
         </state>
 
-        <state id="thirty" final="true" />
+        <final id="thirty"/>
 
     </state>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/static-method.xml Sat Mar 22 23:34:20 2014
@@ -22,11 +22,11 @@
        version="1.0"
        initial="static">
 
-    <state id="static" final="true">
+    <final id="static">
         <onentry>
             <log expr="'Current time millis: ' + System.currentTimeMillis()" />
         </onentry>
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/jexl/wildcard-01.xml Sat Mar 22 23:34:20 2014
@@ -29,7 +29,7 @@
            <transition event="foo.*" cond="switch eq 3" target="state3"/>
            <transition event="foo.bar.*" cond="switch eq 4" target="state4"/>
      </state>
-     <state id="state2" final="true"/>
-     <state id="state3" final="true"/>
-     <state id="state4" final="true"/>
+     <final id="state2"/>
+     <final id="state3"/>
+     <final id="state4"/>
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/env/xpath/XPathExampleTest.java Sat Mar 22 23:34:20 2014
@@ -25,9 +25,10 @@ import org.apache.commons.scxml2.Evaluat
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
 import org.apache.commons.scxml2.TriggerEvent;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
 import org.apache.commons.scxml2.model.State;
-import org.apache.commons.scxml2.model.TransitionTarget;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -73,7 +74,7 @@ public class XPathExampleTest {
         exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
 
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("mid", ((State)currentStates.iterator().
             next()).getId());
@@ -96,10 +97,9 @@ public class XPathExampleTest {
         exec = SCXMLTestHelper.getExecutor(scxml, context, evaluator);
 
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
-        Assert.assertEquals("end", ((State)currentStates.iterator().
-            next()).getId());
+        Assert.assertEquals("end", currentStates.iterator().next().getId());
 
     }
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/external-hello-world.xml Sat Mar 22 23:34:20 2014
@@ -22,7 +22,7 @@
        version="1.0"
        initial="external-hello">
 
-    <state id="external-hello" final="true" src="custom-hello-world-02.xml">
+    <state id="external-hello" src="custom-hello-world-02.xml">
 
         <onentry>
             <my:hello name="parent document" />

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/hello-world.xml Sat Mar 22 23:34:20 2014
@@ -21,11 +21,11 @@
        version="1.0"
        initial="hello">
 
-    <state id="hello" final="true">
+    <final id="hello">
         <onentry>
             <log expr="'hello world'" />
         </onentry>
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-deep-01.xml Sat Mar 22 23:34:20 2014
@@ -52,7 +52,7 @@
                 <transition event="phase.done" target="phase3"/>
             </state>
 
-            <state id="phase3" final="true" />
+            <final id="phase3"/>
 
         </state>
 
@@ -70,6 +70,6 @@
 
     </state>
 
-    <state id="terminated" final="true"/>
+    <final id="terminated"/>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-default-01.xml Sat Mar 22 23:34:20 2014
@@ -87,6 +87,6 @@
 
     </state>
 
-    <state id="state4" final="true"/>
+    <final id="state4"/>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/history-shallow-01.xml Sat Mar 22 23:34:20 2014
@@ -46,7 +46,7 @@
             <transition event="phase.done" target="phase3"/>
         </state>
 
-        <state id="phase3" final="true"/>
+        <final id="phase3"/>
 
         <transition event="flow.pause" target="interrupted"/>
 
@@ -62,6 +62,6 @@
 
     </state>
 
-    <state id="terminated" final="true"/>
+    <final id="terminated"/>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/InvokeTest.java Sat Mar 22 23:34:20 2014
@@ -26,8 +26,8 @@ import org.apache.commons.scxml2.env.Sim
 import org.apache.commons.scxml2.env.jexl.JexlContext;
 import org.apache.commons.scxml2.env.jexl.JexlEvaluator;
 import org.apache.commons.scxml2.io.SCXMLReader;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.TransitionTarget;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -77,7 +77,7 @@ public class InvokeTest {
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("invoker", currentStates.iterator().next().getId());
     }
@@ -92,7 +92,7 @@ public class InvokeTest {
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
     }
     
@@ -106,7 +106,7 @@ public class InvokeTest {
         exec.setStateMachine(scxml);
         exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
         exec.go();
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         SCXMLTestHelper.fireEvent(exec, "s1.next");
         SCXMLTestHelper.fireEvent(exec, "state1.next");

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-01.xml Sat Mar 22 23:34:20 2014
@@ -26,7 +26,7 @@
         <transition event="invoked.next" target="state2" />
     </state>
 
-    <state id="state2" final="true" />
+    <final id="state2"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-02.xml Sat Mar 22 23:34:20 2014
@@ -26,7 +26,7 @@
         <transition event="invoked.next" target="state2" />
     </state>
 
-    <state id="state2" final="true" />
+    <final id="state2"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03-01.xml Sat Mar 22 23:34:20 2014
@@ -27,7 +27,7 @@
         <transition event="s1.next" target="s2"/>
     </state>
 
-    <state id="s2" final="true"/>
+    <final id="s2"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoked-03.xml Sat Mar 22 23:34:20 2014
@@ -28,11 +28,11 @@
         <transition event="state1.next" target="end1" />
     </state>
 
-    <state id="end1" final="true">
+    <final id="end1">
         <onentry>
             <log expr="'    Inner invoke completed'"/>
         </onentry>
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-01.xml Sat Mar 22 23:34:20 2014
@@ -33,7 +33,7 @@
         <transition event="invoker.invoke.done" target="end" />
     </state>
 
-    <state id="end" final="true" />
+    <final id="end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-02.xml Sat Mar 22 23:34:20 2014
@@ -24,7 +24,7 @@
         <transition event="invoker.invoke.done" target="end" />
     </state>
 
-    <state id="end" final="true" />
+    <final id="end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/invoke/invoker-03.xml Sat Mar 22 23:34:20 2014
@@ -30,11 +30,11 @@
         </transition>
     </state>
 
-    <state id="end" final="true">
+    <final id="end">
         <onentry>
             <log expr="'Invoker completed'"/>
         </onentry>
-    </state>
+    </final>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java Sat Mar 22 23:34:20 2014
@@ -42,6 +42,7 @@ import org.apache.commons.scxml2.model.A
 import org.apache.commons.scxml2.model.CustomAction;
 import org.apache.commons.scxml2.model.Data;
 import org.apache.commons.scxml2.model.Datamodel;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.ExternalContent;
 import org.apache.commons.scxml2.model.Final;
 import org.apache.commons.scxml2.model.ModelException;
@@ -203,7 +204,7 @@ public class SCXMLReaderTest {
             "action", MyAction.class);
         cas.add(ca);
         scxml = SCXMLTestHelper.parse(action01, cas);
-        State state = (State) scxml.getInitialTransition().getTargets().get(0);
+        EnterableState state = (EnterableState) scxml.getInitialTransition().getTargets().get(0);
         Assert.assertEquals("actions", state.getId());
         List<Action> actions = state.getOnEntry().getActions();
         Assert.assertEquals(1, actions.size());

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/StateSrcTest.java Sat Mar 22 23:34:20 2014
@@ -21,15 +21,14 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
+import org.apache.commons.scxml2.model.EnterableState;
 import org.apache.commons.scxml2.model.ModelException;
 import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.TransitionTarget;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 /**
- * Unit tests {@link org.apache.commons.scxml2.io.SCXMLDigester}
  * Test white box nature of <state> element "src" attribute.
  */
 public class StateSrcTest {
@@ -71,7 +70,7 @@ public class StateSrcTest {
         Assert.assertNotNull(scxml);
         exec = SCXMLTestHelper.getExecutor(scxml);
         Assert.assertNotNull(exec);
-        Set<TransitionTarget> states = exec.getCurrentStatus().getStates();
+        Set<EnterableState> states = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, states.size());
         Assert.assertEquals("srctest3", states.iterator().next().getId());
         states = SCXMLTestHelper.fireEvent(exec, "src.test");

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-1.xml Sat Mar 22 23:34:20 2014
@@ -25,7 +25,7 @@
         <transition event="srctest1.done" target="srctest1end"/>
     </state>
 
-    <state id="srctest1end" final="true"/>
+    <final id="srctest1end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-2.xml Sat Mar 22 23:34:20 2014
@@ -24,7 +24,7 @@
         <transition event="srctest2.done" target="srctest2end"/>
     </state>
 
-    <state id="srctest2end" final="true"/>
+    <final id="srctest2end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-3.xml Sat Mar 22 23:34:20 2014
@@ -22,7 +22,7 @@
 
     <state id="srctest3"/>
 
-    <state id="srctest3end" final="true"/>
+    <final id="srctest3end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-4.xml Sat Mar 22 23:34:20 2014
@@ -24,7 +24,7 @@
         <transition event="srctest1.done" target="srctest1end"/>
     </state>
 
-    <state id="srctest1end" final="true"/>
+    <final id="srctest1end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/io/src-test-5.xml Sat Mar 22 23:34:20 2014
@@ -24,7 +24,7 @@
         <transition event="srctest1.done" target="srctest1end"/>
     </state>
 
-    <state id="srctest1end" final="true"/>
+    <final id="srctest1end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue112Test.java Sat Mar 22 23:34:20 2014
@@ -35,7 +35,6 @@ import org.apache.commons.scxml2.model.A
 import org.apache.commons.scxml2.model.CustomAction;
 import org.apache.commons.scxml2.model.ModelException;
 import org.apache.commons.scxml2.model.SCXML;
-import org.apache.commons.scxml2.model.State;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -83,8 +82,8 @@ public class Issue112Test {
         SCXML scxml = SCXMLTestHelper.parse(queue01, customActions);
 
         exec = SCXMLTestHelper.getExecutor(scxml);
-        Assert.assertEquals("init", ((State) exec.getCurrentStatus().getStates().
-                iterator().next()).getId());
+        Assert.assertEquals("init", exec.getCurrentStatus().getStates().
+                iterator().next().getId());
 
         // Add an event, other external events could be added to the queue at any time (this test only adds one).
         Application.QUEUE.add("next");
@@ -100,8 +99,8 @@ public class Issue112Test {
         }
 
         Assert.assertTrue(exec.getCurrentStatus().isFinal());
-        Assert.assertEquals("end", ((State) exec.getCurrentStatus().getStates().
-                iterator().next()).getId());
+        Assert.assertEquals("end", exec.getCurrentStatus().getStates().
+                iterator().next().getId());
 
     }
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/Issue62Test.java Sat Mar 22 23:34:20 2014
@@ -21,7 +21,8 @@ import java.util.Set;
 
 import org.apache.commons.scxml2.SCXMLExecutor;
 import org.apache.commons.scxml2.SCXMLTestHelper;
-import org.apache.commons.scxml2.model.TransitionTarget;
+import org.apache.commons.scxml2.model.EnterableState;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
@@ -61,7 +62,7 @@ public class Issue62Test {
     @Test
     public void test01issue62() throws Exception {
         exec = SCXMLTestHelper.getExecutor(test01);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("s1.1", currentStates.iterator().next().getId());
         SCXMLTestHelper.assertPostTriggerState(exec, "foo", "s1.1");
@@ -80,7 +81,7 @@ public class Issue62Test {
     }
 
     private void fragmenttest() throws Exception {
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("s1", currentStates.iterator().next().getId());
         SCXMLTestHelper.assertPostTriggerState(exec, "foo", "e1.1.1");

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02-ext.xml Sat Mar 22 23:34:20 2014
@@ -33,7 +33,7 @@
                 <transition event="baz" target="e1.2"/>
             </state>
         </state>
-        <state id="e1.2" final="true"/>
+        <final id="e1.2"/>
     </state>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue62-02.xml Sat Mar 22 23:34:20 2014
@@ -30,6 +30,6 @@
         <transition event="s2.1.done" target="s3"/>
     </state>
 
-    <state id="s3" final="true"/>
+    <final id="s3"/>
 
 </scxml>

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-01.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-01.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-01.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-01.xml Sat Mar 22 23:34:20 2014
@@ -32,7 +32,7 @@
          <log expr="'*****' + dummy" />
         </transition>
     </state>
-    <state id="end" final="true" />
+    <final id="end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-02.xml
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-02.xml?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-02.xml (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/issues/issue64-02.xml Sat Mar 22 23:34:20 2014
@@ -48,7 +48,7 @@
     
     <my:baz/>
 
-    <state id="end" final="true" />
+    <final id="end"/>
 
 </scxml>
 

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/ActionTest.java Sat Mar 22 23:34:20 2014
@@ -38,7 +38,7 @@ public class ActionTest {
         transition.setParent(state);
         action.setParent(transition);
 
-        TransitionTarget returnValue = action.getParentTransitionTarget();
+        TransitionTarget returnValue = action.getParentEnterableState();
         
         Assert.assertEquals("on", returnValue.getId());
     }
@@ -58,7 +58,7 @@ public class ActionTest {
         transition.setParent(parallel);
         action.setParent(transition);
 
-        TransitionTarget returnValue = action.getParentTransitionTarget();
+        TransitionTarget returnValue = action.getParentEnterableState();
         
         Assert.assertEquals("on", returnValue.getId());
     }
@@ -78,27 +78,26 @@ public class ActionTest {
         transition.setParent(history);
         action.setParent(transition);
 
-        TransitionTarget returnValue = action.getParentTransitionTarget();
+        TransitionTarget returnValue = action.getParentEnterableState();
         
         Assert.assertEquals("off", returnValue.getId());
     }
     
     @Test
     public void testGetParentStateIsInitial() throws Exception {
-        Transition transition = new Transition();
+        SimpleTransition transition = new SimpleTransition();
         
         Initial initial = new Initial();
-        initial.setId("on");
 
         State state = new State();
         state.setId("off");
 
         initial.setParent(state);
 
-        transition.setParent(initial);
+        initial.setTransition(transition);
         action.setParent(transition);
 
-        TransitionTarget returnValue = action.getParentTransitionTarget();
+        TransitionTarget returnValue = action.getParentEnterableState();
 
         Assert.assertEquals("off", returnValue.getId());
     }

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/AssignTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/AssignTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/AssignTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/AssignTest.java Sat Mar 22 23:34:20 2014
@@ -60,7 +60,7 @@ public class AssignTest {
     @Test
     public void testAssignSrc() throws Exception {
         exec = SCXMLTestHelper.getExecutor(assign01);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("assign3", currentStates.iterator().next().getId());
         Assert.assertTrue(exec.getCurrentStatus().isFinal());
@@ -69,7 +69,7 @@ public class AssignTest {
     @Test
     public void testAssignDeep() throws Exception {
         exec = SCXMLTestHelper.getExecutor(assign02);
-        Set<TransitionTarget> currentStates = exec.getCurrentStatus().getStates();
+        Set<EnterableState> currentStates = exec.getCurrentStatus().getStates();
         Assert.assertEquals(1, currentStates.size());
         Assert.assertEquals("assign3", currentStates.iterator().next().getId());
         Assert.assertTrue(exec.getCurrentStatus().isFinal());

Modified: commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/CustomActionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/CustomActionTest.java?rev=1580369&r1=1580368&r2=1580369&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/CustomActionTest.java (original)
+++ commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml2/model/CustomActionTest.java Sat Mar 22 23:34:20 2014
@@ -146,7 +146,7 @@ public class CustomActionTest {
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca1);
         customActions.add(ca2);
-        // (2) Parse the document with a custom digester.
+        // (2) Parse the document
         SCXML scxml = SCXMLTestHelper.parse(custom01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
@@ -171,7 +171,7 @@ public class CustomActionTest {
                              "hello", Hello.class);
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
-        // (2) Parse the document with a custom digester.
+        // (2) Parse the document
         SCXML scxml = SCXMLTestHelper.parse(external01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
@@ -194,7 +194,7 @@ public class CustomActionTest {
                              "send", Hello.class);
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
-        // (2) Parse the document with a custom digester.
+        // (2) Parse the document
         SCXML scxml = SCXMLTestHelper.parse(override01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);
@@ -218,7 +218,7 @@ public class CustomActionTest {
                              "hello", Hello.class);
         List<CustomAction> customActions = new ArrayList<CustomAction>();
         customActions.add(ca);
-        // (2) Parse the document with a custom digester.
+        // (2) Parse the document
         SCXML scxml = SCXMLTestHelper.parse(payload01, customActions);
         // (3) Get a SCXMLExecutor
         exec = SCXMLTestHelper.getExecutor(scxml);



Mime
View raw message