commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Spegni <>
Subject [scxml] question on datamodel
Date Mon, 03 Dec 2012 14:30:06 GMT
Hello everybody,

I'm new to SCXML and with my research group we are trying to understand 
if it fits our needs.

We developed our own languages to represent FSMs with different kinds of 
constraints (e.g. semantic assertions, time constraints, ...) and now we 
are evaluating whether through SCXML we can "standardize" our languages 
and tools.

One of our languages is named XAL and deals with FSM, time constraints 
(as in Timed Automata) and actions associated to the single states (an 
example can be found here:


The first problem we are trying to solve is: how to extend the 
definition of Transition to accept custom XML nodes to be interpreted as 
complex conditions? E.g. we would like to express something as:

<scxml xmlns=""
        datamodel="xmlns:cc="someurl" >

     <state id="a">
         <transition target="b" cond="cc:eval(//condition)" >
                 <time exp="clock > 1 sec" />

     <state id="b" final="true">


In this case I have two states (a,b) and the transition a -> b is 
activated only when the time condition (clock > 1 sec) is true, provided 
a meaningful interpretation function "eval" is provided. In particular I 
would like to specify to the eval function the "child element" named 

As far as I've got is possible to use the xpath data-model for this 
purpose (there is a similar example in appendix D.3.2 at this URL ). Unfortunately the "datamodel" in the root 
attribute <scxml ...> is not supported in the current implementation of 
the Parser in Apache commons.

Provided all that, we are thinking about implementing an xpath datamodel 
for the scxml (or an ecmascript datamodel, in which case the solution 
would be very similar).

My questions are:
- is there any documentation explaining how to implement a new Datamodel 
in a standard way?
- would it be possible to reach the same result without implementing a 
brand new Datamodel, i.e. just using the default one (so-called 

Any suggestion would be very helpful. Thanks in advance :)

Francesco Spegni

Post Doc
Dipartimento di Ingegneria dell'Informazione (DII)
Università Politecnica delle Marche
via Brecce Bianche, 60131 Ancona, Italy

Phone: (+39) 328-8694618
Skype: francesco.spegni

"Ama le nuvole, le macchine, i libri, ma prima di tutto ama l'uomo" -
Nazim Hilkmet

View raw message