If we have the following event sequence :
Close door --> Start --> Open door --> Reset
and we need to know the corresponding response sequence starting from the initial state
(~Closed, ~Heat, ~Error)
My answer was as follows:
(Closed, ~Heat, ~Error) --> (Closed, Heat, ~Error) --> (~Closed, ~Heat, ~Error)
I think my answer is not correct because I didn't take into consideration the event reset, the state of the system after the event open door is the initial state (as shown from my written sequence) and according to the state diagram the system has no transition from this initial state to any state due to the event reset, so is my answer will be the right system response or it's wrong ?
Finally, If we need to edit this diagram such that the system will have the ability to control the heating process in which it will stop the heating after one minute and produces an alarm for five seconds. My suggestion is to create an action associated with the start oven event in which this action will create a variable called timer and set it to zero and during the looping of the heating process (state
(Closed, Heat , ~Error) ) we will increment the timer variable as an action and then we will do a new state called alarm which has a transition from the state
(Closed, Heat , ~Error) to this alarm stateEdit with a guard condition timer> 60. Moreover, to finish this modification this state timer should have a transition leaving it and terminating at the state
(Closed ~ Heat Error). So is this modification will implement this heating control process? Or am I missing something?