Apache Commons logo Commons SCXML

Commons SCXML - Standalone testing, trying out samples

The SCXML distribution provides utility classes that offer a mock command line environments allowing users to try out samples. The core dependencies for Commons SCXML are Commons Digester (which introduces a transitive dependency on Commons BeanUtils, at the least) and Commons Logging.

View the dependencies page for the recommended version numbers. It may be possible to use lower version numbers for the Commons dependencies.

An environment specific expression language is used in SCXML documents. Commons SCXML currently supports the use of JEXL, Javascript, XPath or Groovy in SCXML documents.

Using JEXL in SCXML documents

The JEXL Standalone class anticipates expressions in JEXL and hence requires commons-jexl.jar.

So that amounts to (use the correct local paths and filenames to the jar files and the SCXML document, without the line breaks):

    java -classpath




You could set up something more elegant (a script, an ant task etc.), but that is what it boils down to. If the document is a well-formed SCXML document, you will be able to type ? or help at the console and you can follow the directions thereafter (to simulate events, set variable values, reset the state machine or quit).

A few examples are available as part of the Commons SCXML test suite (look in env.* child packages as well).