You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Riccardo Manoni <ar...@gmail.com> on 2012/12/12 17:59:50 UTC

[scxml] update data model

Hi all,

i'm new to scxml so here i am with a (maybe dumb..) question: is it
possible to update the datamodel or "raise" an event from a java
method? For example, in the StopWatch use case, can i force the life
cycle to go in "reset" state when 10sec elapsed?

My intention is let the data model knows about the time elapsed since
the "start", so i think i need a way to communicate the seconds
elapsed to the data model… Can someone point me in the right
direction? Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


RE: [scxml] update data model

Posted by Jim Barnett <Ji...@genesyslab.com>.
Use the 'delay' attribute on <send> to create a timer.  Then add an event handler/transition that catches the delayed event and updates the data model (using the executable content that is a child  of <transition>).

- Jim

-----Original Message-----
From: Riccardo Manoni [mailto:arduinowifishield@gmail.com] 
Sent: Wednesday, December 12, 2012 12:00 PM
To: user@commons.apache.org
Subject: [scxml] update data model

Hi all,

i'm new to scxml so here i am with a (maybe dumb..) question: is it possible to update the datamodel or "raise" an event from a java method? For example, in the StopWatch use case, can i force the life cycle to go in "reset" state when 10sec elapsed?

My intention is let the data model knows about the time elapsed since the "start", so i think i need a way to communicate the seconds elapsed to the data model... Can someone point me in the right direction? Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org