commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject svn commit: r373329 - /jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java
Date Sun, 29 Jan 2006 17:43:16 GMT
Author: rahul
Date: Sun Jan 29 09:43:14 2006
New Revision: 373329

URL: http://svn.apache.org/viewcvs?rev=373329&view=rev
Log:
Update command-line utility class to match changes to SCXML IO and execution.


Modified:
    jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java

Modified: jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java?rev=373329&r1=373328&r2=373329&view=diff
==============================================================================
--- jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java
(original)
+++ jakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/test/StandaloneUtils.java
Sun Jan 29 09:43:14 2006
@@ -77,8 +77,7 @@
             Context rootCtx = evaluator.newContext(null);
             EventDispatcher ed = new SimpleDispatcher();
             Tracer trc = new Tracer();
-            SCXML doc = SCXMLDigester.digest(new URL(documentURI), trc,
-                rootCtx, evaluator);
+            SCXML doc = SCXMLDigester.digest(new URL(documentURI), trc);
             if (doc == null) {
                 System.err.println("The SCXML document " + uri
                         + " can not be parsed!");
@@ -86,9 +85,11 @@
             }
             System.out.println(SCXMLSerializer.serialize(doc));
             SCXMLExecutor exec = new SCXMLExecutor(evaluator, ed, trc);
-            doc.addListener(trc);
+            exec.addListener(doc, trc);
             exec.setSuperStep(true);
+            exec.setRootContext(rootCtx);
             exec.setStateMachine(doc);
+            exec.go();
             BufferedReader br = new BufferedReader(new
                 InputStreamReader(System.in));
             String event = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message