5. Contd… 4. Signal: When an event causes a message/trigger to be sent to a state, that causes the transition; then, that message sent by the event is called a signal. Represented as a class with the <<Signal>> icon above the action/event. <<Signal>> Event/Action Event/Action 5. Final State: The end of the state diagram is shown by a bull's eye symbol, also called a final state. A final state is another example of a pseudo state because it does not have any variable or action described.
6. 6. Iterations: Whenever there is repetition of any action which does not make a transition to another state instead the same state reoccurs the transition is shown as given. This transition is known as a “ self-transition”. Here the source and target states are same. State 7. Decision Making: Whenever there is a requirement to check a given condition before any transition occurs then the condition is specified in [ ] brackets. State1 State2 Event/Action [ condition ]
7. 8. Region: A region is an orthogonal part of either a composite state or a state machine. It contains states and transitions. Lab1 Lab2 project First test Failed Passed Fail Studying
8. Different States of State Chart Diagram 1. Choice pseudo state: A choice vertices which, when reached, result in the dynamic evaluation of the guards of the triggers of its outgoing transitions. This realizes a dynamic conditional branch. It allows splitting of transitions into multiple outgoing paths such that the decision on which path to take may be a function of the results of prior actions performed in the same run-to-completion step. The boolean conditions specified are known as “guards” . [ <=10] Contd… ID [ >10] State1 State4 State3 State2 [ a=5]
9. 2. Composite State: A composite state is either a simple composite state (with just one region) or an orthogonal state (with more than one region). State1 State2 Event/Action [ condition ] 3. Submachine State: A submachine state specifies the insertion of the specification of a submachine state machine. The state machine that contains the submachine state is called the containing state machine. The same state machine may be a submachine more than once in the context of a single containing state machine. Contd…
10. 4. Junction Pseudostate: A junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct compound transition paths between states. State1 State1 State1 State1 State1 [a < 0] [a = 5] [a >7] E1 [b < 0] E2 [b < 0] Contd…
11. 5. History Deep Pseudostate: A deepHistory represents the most recent active configuration of the composite state that directly contains this pseudostate; e.g. the state configuration that was active when the composite state was last exited. A A2 A1 C Interrupt H* resume Contd…
12. 6. History Shallow Pseudostate: A shallowHistory represents the most recent active substate of its containing state (but not the substates of that substate). A composite state can have at most one shallow history vertex. A A1 A2 C Interrupt H resume Contd…
13. 7. Entry Point Pseudostate: Sometimes you won’t want to enter a sub-machine at the normal initial state. For example, in the following sub-machine it would be normal to begin in the "Initializing" state, but if for some reason it wasn’t necessary to perform the initialization, it would be possible to begin in the “Intialized" state by transitioning to the named entry point. A1 A2 A3 Skip A1 Initializing Initialized Contd…
14. 8. Exit Point Pseudostate: An exit point pseudostate is an exit point of a state machine or composite state. Entering an exit point within any region of the composite state or state machine referenced by a submachine state implies the exit of this composite state or submachine state and the triggering of the transition that has this exit point as source in the state machine enclosing the submachine or composite state. Reading instructions Writing Error report Displaying Results Processing instructions Processing Failed to Read Contd…
15. 9. Terminate Pseudostate: Entering a terminate pseudostate implies that the execution of this state machine by means of its context object is terminated. The state machine does not exit any states nor does it perform any exit actions other than those associated with the transition leading to the terminate pseudostate. State Active Terminate Lift receiver /get dial tone Caller hangs up /disconnect