commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject SCXML2 Serialization
Date Thu, 17 Apr 2014 05:48:59 GMT
Hi Ate,

I put and Simple1.xml here :
When I run the program (second time) the fsm is frozen :

First time :

After creation [startIngTrs.processMsg is running : true

Process finished with exit code 0

Second time :
Loading simple1
After creation [startIngTrs.waitMsg is running : false

Process finished with exit code 0



Thanks for your reply Ate.

I want to serialize/deserialize a SCXML 'session' for this use case :

Into a transactional server, a request is processed by a thread. An ID is retrieved from the
message, with this ID the server loads a context (from a redis store) and instantiates a new
'Executor' with it's associated SCXML file and saved instance.

I'll use invokers to call external functions or new a SCXML 'processor', I don't expect them
to still be running after the state machine stabilized.

You said : "But then you should not set the statemachine again (after attachInstance) as that
will re-initialize the SCInstance itself"
so I don't have to  do this "executor.setStateMachine(scxml);"because  scxml is serialized
with the scInstance. But if I need to register a listener (addListener) or if I have custom
actions, are they serialized too?

In the example I do 'setInitialState(executor, "paused");' because the call to go resets the
state and I know that 'paused' is the last state. Of course  I want to 'return' in the same
state I left off. Without a call of the  go function, the state machine seems to be frozen.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message