commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Spegni <francesco.spe...@gmail.com>
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: 
http://www.computervaritt.it/xal/index.php/en/tutorial/49-progettazione-dellapplicazione-.html

).

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="http://www.w3.org/2005/07/scxml"
        version="1.0"
        initialstate="a"
        datamodel="xmlns:cc="someurl" >

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

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

     </state>
</scxml>

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 
condition

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 
http://www.w3.org/TR/scxml/ ). 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 
null-datamodel)?

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
Web: http://www.manuefra.eu
Skype: francesco.spegni

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



Mime
View raw message