How do I verify that my SCXML defines a valid state machine?

I've just started looking at defining state machines and SCXML looks attractive, especially the Apache Commons SCXML for Java. Obviously I can validate the XML (with an appropriate XSD).

However I can't obviously find any way to verify that the defined state machine is valid (no dead-ends, no unreachable states, etc).

But how can I verify a defined state-machine before I execute it? In particular I am interested in tools that can integrated into a build tool-chain (i.e. from the command-line).

Answers


The uscxml-analyze tool from the uSCXML distribution will do just that:

$ uscxml-browser -c ../../test/w3c/ecma/test144.scxml

It checks for a whole bunch of issues:

  • Required attributes
  • Valid parent elements
  • Valid default history configurations
  • Valid initial transition
  • Valid initial attributes
  • Unreachable state hierarchies
  • Uniqueness of state id attribute
  • Valid targets for transitions
  • Redundant / unselectable transitions
  • Superfluous history elements
  • Legal configuration of target sets
  • A bunch of attribute / element combination constraints
  • Valid syntax of data-model expressions

The uSCXML interpreter will also check for cycles within a macro-step during interpretation.


Need Your Help

How to access the bound DataSource item in the ASP.NET ListView's DataBound event?

asp.net listview sqldatasource databound

I know the question has already been posted here but we didn't get to an real solution.

Optimal RAID setup for SQL server

sql-server database performance hardware

We have an SQL 2005 database backend for our website, currently about 10GB in size. There are a lot more reads than writes, though I don't have the exact statistics.