commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: [SCXML] Need to resume a state machine (SCXML-19)
Date Thu, 07 Sep 2006 19:04:11 GMT
On 9/6/06, Rahul Akolkar <rahul.akolkar@gmail.com> wrote:
>
> On 9/6/06, Madhwaraj Rao <madhwaraj_rao@yahoo.com> wrote:
> > Hi,
> >
> > I have the following use case:
> >
> > A state machine defines states {S1, S2, S3, S4}.
> > This state machine can run from state S1 -> S3 and
> > would be waiting on an event to transition to S4. I
> > will persist the "state" of this state machine some
> > place and the state machine would be decomissioned.
> > At a later point in time, I want the ability of a
> > newly instantiated state machine to "resume" from
> > state S3.
> >
> > I tried setting the SCXML.setInitialState(), but on
> > instantiating the engine, it invokes the OnEntry
> > actions and listeners on the resumed state. But this
> > is not desirable, as these actions would have been
> > executed earlier.
> >
> > In short, I need an ability to suspend a state machine
> > and resume a new state machine from where the original
> > one left off.
> >
> > Can you please point me to existing functionality that
> > can achieve this? I have raised a WISH List issue in
> > JIRA (SCXML-19).
> >
> <snip/>
>
> There is no existing functionality that does this the way you describe
> above. There is merit to the WISH issue. We need to look closely at
> some of the standard persistance mechanisms, such as Java
> serialization, and add a few test cases for the model and executor
> instances. This is unlikely to happen overnight if left to me, but
> will remain on my TODO list.
>
> The programmatic approach of "setting current states" along the lines
> of what you're doing (per the patch you've attached to SCXML-19,
> thanks for that) may be a fine short term solution for individual
> applications (such as yours), but we need to do more at the level of
> the library itself.


In a recent TSSJS thread on Seam, I saw a wish list item somewhat similar to
this one, for a web specific use case ... the ability to "checkpoint" all of
the state machines currently active for a user so that he or she can log out
and go home, and then be able to restore them all when the user logs on the
next morning.


-Rahul


Craig


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message