State Context Data

瀏覽次數:65 次
跳到第一則未讀訊息

vishal gaurav

未讀,
2015年2月20日 清晨5:23:382015/2/20
收件者:squirrel-st...@googlegroups.com
Hi Henry,

The context doesn't stays with the state machine instance. Is it true ? When I call stateMachine.start(Context c); The context is only used for some entry and exit condition.
When state moves to another state after fire(New Context), the previous context is lost.

Please correct if my understanding is not correct. 

Also if you can point me to right direction in adding new functionality. 

I am trying to store the context data through out the state machine instance lifetime And when I fire(context) , this become the state local context. When the state moves to another state the context set in fire will be lost but the context set in start should alive. Similar to BPM engine where we have process variable and task variable.

Thanks
-Vishal

He Henry

未讀,
2015年2月24日 晚上9:50:552015/2/24
收件者:squirrel-st...@googlegroups.com
Hi Vishal,

You understanding is correct. Context will not stay with state machine instance. 

I think startContext of state machine instance can be stored in stateMachineData. I can make this change. After that, you need to disable statemachine auto start, and manual start the state machine with the context stored in state machine data. Is this what you want? If so, I would like you to submit a issue on github.

Thanks,
Henry

在 2015年2月20日星期五 UTC+8下午6:23:38,vishal gaurav写道:
回覆所有人
回覆作者
轉寄
0 則新訊息