On 9/6/06, Madhwaraj Rao <[EMAIL PROTECTED]> 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. -Rahul
Thanks -- Raj
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
