Hello,
I have what I hope is a simple question on the operation of the transitions in programming.
For a transition to occur due to an "event condition," is it correct that the current condition must be the state where the transition begins? i.e. if I have a state machine with 3 states, A, B, and C. Current state is A. There is a transition from state B to state C that is triggered by an "event condition." If machine is in state A, and condition goes True, will the transition occur? I believe that since machine is not in state B, transition will not occur... (actually I hope this is correct!)
Thanks!
Phil
Question on Programming Transitions
- drphil69
- Posts: 139
- Joined: Wed Mar 02, 2011 5:59 pm
- drphil69
- Posts: 139
- Joined: Wed Mar 02, 2011 5:59 pm
Re: Question on Programming Transitions
As an added related question -
Are multiple Transition Event Conditions logically connected by OR? i.e. if any of the conditions go true the transition happens?
Thanks!
Are multiple Transition Event Conditions logically connected by OR? i.e. if any of the conditions go true the transition happens?
Thanks!
- priyauplaonkar
- Enovation Controls Development
- Posts: 26
- Joined: Mon Nov 22, 2010 9:18 pm
Re: Question on Programming Transitions
Hi Phil,
1st question: Yes, you are right. If a machine is in state A(Current state) and the condition goes true, the transition between state B and C doesn't occur. That is because the condition cannot jump from State A to State B.
2nd question: Yes, the multiple transition Event Conditions are logically connected by OR when you are using them with a single state.
I hope this helps.
Thanks,
Priya.
1st question: Yes, you are right. If a machine is in state A(Current state) and the condition goes true, the transition between state B and C doesn't occur. That is because the condition cannot jump from State A to State B.
2nd question: Yes, the multiple transition Event Conditions are logically connected by OR when you are using them with a single state.
I hope this helps.
Thanks,
Priya.