diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-08-01 19:39:13 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-08-01 19:39:13 (GMT) |
commit | bca8837bc47686adbf96498a3b645aaeacd07d69 (patch) | |
tree | 365c1f28bcc6d027ac99b8f353fcee6c71df5675 /test/bindings/java/org/uscxml/examples | |
parent | 7e81f2155717f8490ffd1b23e4f0aa8ac44d4de8 (diff) | |
download | uscxml-bca8837bc47686adbf96498a3b645aaeacd07d69.zip uscxml-bca8837bc47686adbf96498a3b645aaeacd07d69.tar.gz uscxml-bca8837bc47686adbf96498a3b645aaeacd07d69.tar.bz2 |
Added to appveyor
Diffstat (limited to 'test/bindings/java/org/uscxml/examples')
-rw-r--r-- | test/bindings/java/org/uscxml/examples/MonitorExample.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/bindings/java/org/uscxml/examples/MonitorExample.java b/test/bindings/java/org/uscxml/examples/MonitorExample.java index 3e3781c..dc4cffa 100644 --- a/test/bindings/java/org/uscxml/examples/MonitorExample.java +++ b/test/bindings/java/org/uscxml/examples/MonitorExample.java @@ -3,6 +3,7 @@ package org.uscxml.examples; import org.uscxml.Interpreter; import org.uscxml.InterpreterException; import org.uscxml.InterpreterState; +import org.uscxml.StringVector; import org.uscxml.helper.TestMonitor; @@ -20,7 +21,7 @@ public class MonitorExample { try { TestMonitor tm = new TestMonitor(); Interpreter scxml = Interpreter.fromURL("https://raw.githubusercontent.com/tklab-tud/uscxml/master/test/w3c/null/test436.scxml"); - scxml.setMonitor(tm); + scxml.addMonitor(tm); InterpreterState state = InterpreterState.USCXML_UNDEF; while((state = scxml.step()) != InterpreterState.USCXML_FINISHED) { switch (state) { @@ -29,8 +30,14 @@ public class MonitorExample { case USCXML_IDLE: case USCXML_INITIALIZED: case USCXML_INSTANTIATED: + break; case USCXML_MICROSTEPPED: case USCXML_MACROSTEPPED: + StringVector states = scxml.getConfiguration(); + for (int i = 0; i < states.size(); i++) { + System.out.print(states.get(i) + " "); + } + System.out.println(); case USCXML_CANCELLED: break; default: |