{"id":669,"date":"2024-11-26T05:52:34","date_gmt":"2024-11-26T05:52:34","guid":{"rendered":"https:\/\/www.go-uml.com\/ru\/?p=669"},"modified":"2024-11-26T05:52:34","modified_gmt":"2024-11-26T05:52:34","slug":"learning-uml-state-diagrams-by-example-telephone-call-management-system","status":"publish","type":"post","link":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/","title":{"rendered":"Learning UML State Diagrams by Example: Telephone Call Management System"},"content":{"rendered":"<p>UML (<a href=\"https:\/\/online.visual-paradigm.com\/diagrams\/features\/uml-tool\/\">Unified Modeling Language<\/a>) <a href=\"https:\/\/www.visual-paradigm.com\/guide\/uml-unified-modeling-language\/what-is-state-machine-diagram\/\">state diagrams<\/a>, also known as state machines or state charts, are a type of behavioral diagram that illustrates the different states of an object and the transitions between those states in response to events. State diagrams are particularly useful for understanding and designing the dynamic behavior of systems that undergo various states over time. In this article, we will learn about <a href=\"https:\/\/www.visual-paradigm.com\/solution\/freeumltool\/\">UML<\/a> state diagrams using a practical example: a telephone call management system.<\/p>\n<h3>Understanding the Telephone Call Management System<\/h3>\n<p>The Figure below illustrates a state diagram for a telephone call management system. Let&#8217;s break down the key elements and concepts depicted in this diagram.<\/p>\n<p>&nbsp;<\/p>\n<p id=\"GHWYMkN\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1211\" height=\"366\" class=\"alignnone size-full wp-image-670 \" src=\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\" alt=\"\" srcset=\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png 1211w, https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d-300x91.png 300w, https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d-1024x309.png 1024w, https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d-768x232.png 768w\" sizes=\"(max-width: 1211px) 100vw, 1211px\" \/><\/p>\n<h4>Key Elements of a State Diagram<\/h4>\n<ol>\n<li><strong>State<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents a condition or situation during the life of an object.<\/li>\n<li><strong>Representation<\/strong>: A rounded rectangle with the state&#8217;s name.<\/li>\n<li><strong>Example<\/strong>: States like &#8220;Idle,&#8221; &#8220;DialTone,&#8221; &#8220;Dialing,&#8221; &#8220;Connecting,&#8221; &#8220;Ringing,&#8221; &#8220;Connected,&#8221; and &#8220;Disconnected.&#8221;<\/li>\n<\/ul>\n<\/li>\n<li><strong>Initial Pseudo State<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents the start point of the state machine.<\/li>\n<li><strong>Representation<\/strong>: A solid black circle.<\/li>\n<li><strong>Example<\/strong>: The initial pseudo state at the beginning of the diagram.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Final State<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents the end point of the state machine.<\/li>\n<li><strong>Representation<\/strong>: A solid black circle with a border.<\/li>\n<li><strong>Example<\/strong>: The final state at the end of the diagram.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Transition<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents a change from one state to another in response to an event.<\/li>\n<li><strong>Representation<\/strong>: A solid arrow connecting states, often labeled with the event that triggers the transition.<\/li>\n<li><strong>Example<\/strong>: The transition from &#8220;Idle&#8221; to &#8220;DialTone&#8221; triggered by the\u00a0<code class=\"\">onHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Self Transition<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents a transition from a state back to itself.<\/li>\n<li><strong>Representation<\/strong>: A looping arrow from a state back to itself.<\/li>\n<li><strong>Example<\/strong>: The self transition in the &#8220;Dialing&#8221; state triggered by the\u00a0<code class=\"\">digit(n)<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Guard<\/strong>:\n<ul>\n<li><strong>Definition<\/strong>: Represents a condition that must be true for a transition to occur.<\/li>\n<li><strong>Representation<\/strong>: A condition in square brackets on the transition arrow.<\/li>\n<li><strong>Example<\/strong>: The guard\u00a0<code class=\"\">[isValidNumber]<\/code>\u00a0on the transition from &#8220;Dialing&#8221; to &#8220;Connecting.&#8221;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>Step-by-Step Walkthrough<\/h3>\n<p>Let&#8217;s walk through the telephone call management system step by step:<\/p>\n<ol>\n<li><strong>Initial State<\/strong>:\n<ul>\n<li>The state machine begins at the initial pseudo state.<\/li>\n<li>The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0<code class=\"\">onHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Idle State<\/strong>:\n<ul>\n<li>The &#8220;Idle&#8221; state represents the telephone being on the hook.<\/li>\n<li>The transition to the &#8220;DialTone&#8221; state is triggered by the\u00a0<code class=\"\">offHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>DialTone State<\/strong>:\n<ul>\n<li>The &#8220;DialTone&#8221; state represents the telephone playing a dial tone.<\/li>\n<li>The transition to the &#8220;Dialing&#8221; state is triggered by the\u00a0<code class=\"\">digit(n)<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Dialing State<\/strong>:\n<ul>\n<li>The &#8220;Dialing&#8221; state represents the user dialing a number.<\/li>\n<li>The self transition triggered by the\u00a0<code class=\"\">digit(n)<\/code>\u00a0event allows the user to input multiple digits.<\/li>\n<li>The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0<code class=\"\">timeout<\/code>\u00a0event if the user takes too long to dial.<\/li>\n<li>The transition to the &#8220;Connecting&#8221; state is triggered by the\u00a0<code class=\"\">isValidNumber<\/code>\u00a0guard if the dialed number is valid.<\/li>\n<li>The transition to the &#8220;BusyTone&#8221; state is triggered by the\u00a0<code class=\"\">numberBusy<\/code>\u00a0event if the dialed number is busy.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Timeout State<\/strong>:\n<ul>\n<li>The &#8220;Timeout&#8221; state represents a timeout condition.<\/li>\n<li>The transition to the &#8220;Warning&#8221; state is triggered by the\u00a0<code class=\"\">timeout<\/code>\u00a0event.<\/li>\n<li>The transition back to the &#8220;DialTone&#8221; state is triggered by the\u00a0<code class=\"\">timeout<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Warning State<\/strong>:\n<ul>\n<li>The &#8220;Warning&#8221; state represents a warning condition.<\/li>\n<li>The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0<code class=\"\">timeout<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Connecting State<\/strong>:\n<ul>\n<li>The &#8220;Connecting&#8221; state represents the telephone attempting to connect the call.<\/li>\n<li>The transition to the &#8220;Ringing&#8221; state is triggered by the\u00a0<code class=\"\">routed<\/code>\u00a0event.<\/li>\n<li>The transition to the &#8220;FastBusyTone&#8221; state is triggered by the\u00a0<code class=\"\">trunkBusy<\/code>\u00a0event if the trunk line is busy.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Ringing State<\/strong>:\n<ul>\n<li>The &#8220;Ringing&#8221; state represents the telephone ringing the called party.<\/li>\n<li>The transition to the &#8220;Connected&#8221; state is triggered by the\u00a0<code class=\"\">calledPhoneAnswers<\/code>\u00a0event.<\/li>\n<li>The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0<code class=\"\">calledPhoneHangsUp<\/code>\u00a0event if the called party hangs up.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Connected State<\/strong>:\n<ul>\n<li>The &#8220;Connected&#8221; state represents an active call.<\/li>\n<li>The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0<code class=\"\">calledPhoneHangsUp<\/code>\u00a0event if the called party hangs up.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Disconnected State<\/strong>:\n<ul>\n<li>The &#8220;Disconnected&#8221; state represents the call being disconnected.<\/li>\n<li>The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0<code class=\"\">onHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>BusyTone State<\/strong>:\n<ul>\n<li>The &#8220;BusyTone&#8221; state represents the telephone playing a busy tone.<\/li>\n<li>The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0<code class=\"\">onHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>FastBusyTone State<\/strong>:\n<ul>\n<li>The &#8220;FastBusyTone&#8221; state represents the telephone playing a fast busy tone.<\/li>\n<li>The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0<code class=\"\">onHook<\/code>\u00a0event.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Final State<\/strong>:\n<ul>\n<li>The state machine ends at the final state.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>Key Concepts Illustrated<\/h3>\n<ol>\n<li><strong>State Transitions<\/strong>:\n<ul>\n<li>The diagram illustrates various state transitions triggered by events such as\u00a0<code class=\"\">onHook<\/code>,\u00a0<code class=\"\">offHook<\/code>,\u00a0<code class=\"\">digit(n)<\/code>,\u00a0<code class=\"\">timeout<\/code>,\u00a0<code class=\"\">isValidNumber<\/code>,\u00a0<code class=\"\">numberBusy<\/code>,\u00a0<code class=\"\">routed<\/code>,\u00a0<code class=\"\">trunkBusy<\/code>,\u00a0<code class=\"\">calledPhoneAnswers<\/code>, and\u00a0<code class=\"\">calledPhoneHangsUp<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Self Transitions<\/strong>:\n<ul>\n<li>The self transition in the &#8220;Dialing&#8221; state allows the user to input multiple digits without changing the state.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Guards<\/strong>:\n<ul>\n<li>The guard\u00a0<code class=\"\">[isValidNumber]<\/code>\u00a0ensures that the transition from &#8220;Dialing&#8221; to &#8220;Connecting&#8221; only occurs if the dialed number is valid.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Initial and Final States<\/strong>:\n<ul>\n<li>The initial pseudo state and final state represent the start and end points of the state machine, respectively.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<p><a href=\"https:\/\/www.visual-paradigm.com\/guide\/uml-unified-modeling-language\/overview-of-the-14-uml-diagram-types\/\">UML<\/a> <a href=\"https:\/\/www.visual-paradigm.com\/guide\/uml-unified-modeling-language\/about-state-diagrams\/\">state diagrams<\/a> are invaluable for understanding and designing the dynamic behavior of systems that undergo various states over time. By breaking down the telephone call management system example, we have seen how <a href=\"https:\/\/online.visual-paradigm.com\/diagrams\/features\/state-machine-diagram-software\/;VPSESSIONID=7D5BA9CE2CBC9884693E7A5576CC403E\">state diagrams<\/a> can capture the different states of an object and the transitions between those states in response to events. This example demonstrates the practical application of state diagrams in real-world scenarios, making it easier to learn and apply UML in software development.<\/p>\n<p>Whether you are a beginner or an experienced developer, understanding <a href=\"https:\/\/online.visual-paradigm.com\/diagrams\/templates\/state-machine-diagram\/\">state diagrams<\/a> can significantly enhance your ability to design and analyze complex systems. So, start practicing with more examples and explore the powerful features of <a href=\"https:\/\/www.archimetric.com\/introduction-to-uml-diagrams-in-visual-paradigm\/\">UML<\/a> state diagrams to master this essential skill.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UML (Unified Modeling Language) state diagrams, also known as state machines or state charts, are a type of behavioral diagram that illustrates the different states of an object and the transitions between those states in response to events. State diagrams are particularly useful for understanding and designing the dynamic behavior of systems that undergo various states over time. In this article, we will learn about UML state diagrams using a practical example: a telephone call management system. Understanding the Telephone Call Management System The Figure below illustrates a state diagram for a telephone call management system. Let&#8217;s break down the key elements and concepts depicted in this diagram. &nbsp; Key Elements of a State Diagram State: Definition: Represents a condition or situation during the life of an object. Representation: A rounded rectangle with the state&#8217;s name. Example: States like &#8220;Idle,&#8221; &#8220;DialTone,&#8221; &#8220;Dialing,&#8221; &#8220;Connecting,&#8221; &#8220;Ringing,&#8221; &#8220;Connected,&#8221; and &#8220;Disconnected.&#8221; Initial Pseudo State: Definition: Represents the start point of the state machine. Representation: A solid black circle. Example: The initial pseudo state at the beginning of the diagram. Final State: Definition: Represents the end point of the state machine. Representation: A solid black circle with a border. Example: The final state at the end of the diagram. Transition: Definition: Represents a change from one state to another in response to an event. Representation: A solid arrow connecting states, often labeled with the event that triggers the transition. Example: The transition from &#8220;Idle&#8221; to &#8220;DialTone&#8221; triggered by the\u00a0onHook\u00a0event. Self Transition: Definition: Represents a transition from a state back to itself. Representation: A looping arrow from a state back to itself. Example: The self transition in the &#8220;Dialing&#8221; state triggered by the\u00a0digit(n)\u00a0event. Guard: Definition: Represents a condition that must be true for a transition to occur. Representation: A condition in square brackets on the transition arrow. Example: The guard\u00a0[isValidNumber]\u00a0on the transition from &#8220;Dialing&#8221; to &#8220;Connecting.&#8221; Step-by-Step Walkthrough Let&#8217;s walk through the telephone call management system step by step: Initial State: The state machine begins at the initial pseudo state. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Idle State: The &#8220;Idle&#8221; state represents the telephone being on the hook. The transition to the &#8220;DialTone&#8221; state is triggered by the\u00a0offHook\u00a0event. DialTone State: The &#8220;DialTone&#8221; state represents the telephone playing a dial tone. The transition to the &#8220;Dialing&#8221; state is triggered by the\u00a0digit(n)\u00a0event. Dialing State: The &#8220;Dialing&#8221; state represents the user dialing a number. The self transition triggered by the\u00a0digit(n)\u00a0event allows the user to input multiple digits. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event if the user takes too long to dial. The transition to the &#8220;Connecting&#8221; state is triggered by the\u00a0isValidNumber\u00a0guard if the dialed number is valid. The transition to the &#8220;BusyTone&#8221; state is triggered by the\u00a0numberBusy\u00a0event if the dialed number is busy. Timeout State: The &#8220;Timeout&#8221; state represents a timeout condition. The transition to the &#8220;Warning&#8221; state is triggered by the\u00a0timeout\u00a0event. The transition back to the &#8220;DialTone&#8221; state is triggered by the\u00a0timeout\u00a0event. Warning State: The &#8220;Warning&#8221; state represents a warning condition. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event. Connecting State: The &#8220;Connecting&#8221; state represents the telephone attempting to connect the call. The transition to the &#8220;Ringing&#8221; state is triggered by the\u00a0routed\u00a0event. The transition to the &#8220;FastBusyTone&#8221; state is triggered by the\u00a0trunkBusy\u00a0event if the trunk line is busy. Ringing State: The &#8220;Ringing&#8221; state represents the telephone ringing the called party. The transition to the &#8220;Connected&#8221; state is triggered by the\u00a0calledPhoneAnswers\u00a0event. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Connected State: The &#8220;Connected&#8221; state represents an active call. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Disconnected State: The &#8220;Disconnected&#8221; state represents the call being disconnected. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. BusyTone State: The &#8220;BusyTone&#8221; state represents the telephone playing a busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. FastBusyTone State: The &#8220;FastBusyTone&#8221; state represents the telephone playing a fast busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Final State: The state machine ends at the final state. Key Concepts Illustrated State Transitions: The diagram illustrates various state transitions triggered by events such as\u00a0onHook,\u00a0offHook,\u00a0digit(n),\u00a0timeout,\u00a0isValidNumber,\u00a0numberBusy,\u00a0routed,\u00a0trunkBusy,\u00a0calledPhoneAnswers, and\u00a0calledPhoneHangsUp. Self Transitions: The self transition in the &#8220;Dialing&#8221; state allows the user to input multiple digits without changing the state. Guards: The guard\u00a0[isValidNumber]\u00a0ensures that the transition from &#8220;Dialing&#8221; to &#8220;Connecting&#8221; only occurs if the dialed number is valid. Initial and Final States: The initial pseudo state and final state represent the start and end points of the state machine, respectively. Conclusion UML state diagrams are invaluable for understanding and designing the dynamic behavior of systems that undergo various states over time. By breaking down the telephone call management system example, we have seen how state diagrams can capture the different states of an object and the transitions between those states in response to events. This example demonstrates the practical application of state diagrams in real-world scenarios, making it easier to learn and apply UML in software development. Whether you are a beginner or an experienced developer, understanding state diagrams can significantly enhance your ability to design and analyze complex systems. So, start practicing with more examples and explore the powerful features of UML state diagrams to master this essential skill.<\/p>\n","protected":false},"author":7,"featured_media":671,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"fifu_image_url":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","fifu_image_alt":"","footnotes":""},"categories":[14,17],"tags":[],"class_list":["post-669","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-uml-tool","category-state-diagram"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439\" \/>\n<meta property=\"og:description\" content=\"UML (Unified Modeling Language) state diagrams, also known as state machines or state charts, are a type of behavioral diagram that illustrates the different states of an object and the transitions between those states in response to events. State diagrams are particularly useful for understanding and designing the dynamic behavior of systems that undergo various states over time. In this article, we will learn about UML state diagrams using a practical example: a telephone call management system. Understanding the Telephone Call Management System The Figure below illustrates a state diagram for a telephone call management system. Let&#8217;s break down the key elements and concepts depicted in this diagram. &nbsp; Key Elements of a State Diagram State: Definition: Represents a condition or situation during the life of an object. Representation: A rounded rectangle with the state&#8217;s name. Example: States like &#8220;Idle,&#8221; &#8220;DialTone,&#8221; &#8220;Dialing,&#8221; &#8220;Connecting,&#8221; &#8220;Ringing,&#8221; &#8220;Connected,&#8221; and &#8220;Disconnected.&#8221; Initial Pseudo State: Definition: Represents the start point of the state machine. Representation: A solid black circle. Example: The initial pseudo state at the beginning of the diagram. Final State: Definition: Represents the end point of the state machine. Representation: A solid black circle with a border. Example: The final state at the end of the diagram. Transition: Definition: Represents a change from one state to another in response to an event. Representation: A solid arrow connecting states, often labeled with the event that triggers the transition. Example: The transition from &#8220;Idle&#8221; to &#8220;DialTone&#8221; triggered by the\u00a0onHook\u00a0event. Self Transition: Definition: Represents a transition from a state back to itself. Representation: A looping arrow from a state back to itself. Example: The self transition in the &#8220;Dialing&#8221; state triggered by the\u00a0digit(n)\u00a0event. Guard: Definition: Represents a condition that must be true for a transition to occur. Representation: A condition in square brackets on the transition arrow. Example: The guard\u00a0[isValidNumber]\u00a0on the transition from &#8220;Dialing&#8221; to &#8220;Connecting.&#8221; Step-by-Step Walkthrough Let&#8217;s walk through the telephone call management system step by step: Initial State: The state machine begins at the initial pseudo state. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Idle State: The &#8220;Idle&#8221; state represents the telephone being on the hook. The transition to the &#8220;DialTone&#8221; state is triggered by the\u00a0offHook\u00a0event. DialTone State: The &#8220;DialTone&#8221; state represents the telephone playing a dial tone. The transition to the &#8220;Dialing&#8221; state is triggered by the\u00a0digit(n)\u00a0event. Dialing State: The &#8220;Dialing&#8221; state represents the user dialing a number. The self transition triggered by the\u00a0digit(n)\u00a0event allows the user to input multiple digits. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event if the user takes too long to dial. The transition to the &#8220;Connecting&#8221; state is triggered by the\u00a0isValidNumber\u00a0guard if the dialed number is valid. The transition to the &#8220;BusyTone&#8221; state is triggered by the\u00a0numberBusy\u00a0event if the dialed number is busy. Timeout State: The &#8220;Timeout&#8221; state represents a timeout condition. The transition to the &#8220;Warning&#8221; state is triggered by the\u00a0timeout\u00a0event. The transition back to the &#8220;DialTone&#8221; state is triggered by the\u00a0timeout\u00a0event. Warning State: The &#8220;Warning&#8221; state represents a warning condition. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event. Connecting State: The &#8220;Connecting&#8221; state represents the telephone attempting to connect the call. The transition to the &#8220;Ringing&#8221; state is triggered by the\u00a0routed\u00a0event. The transition to the &#8220;FastBusyTone&#8221; state is triggered by the\u00a0trunkBusy\u00a0event if the trunk line is busy. Ringing State: The &#8220;Ringing&#8221; state represents the telephone ringing the called party. The transition to the &#8220;Connected&#8221; state is triggered by the\u00a0calledPhoneAnswers\u00a0event. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Connected State: The &#8220;Connected&#8221; state represents an active call. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Disconnected State: The &#8220;Disconnected&#8221; state represents the call being disconnected. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. BusyTone State: The &#8220;BusyTone&#8221; state represents the telephone playing a busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. FastBusyTone State: The &#8220;FastBusyTone&#8221; state represents the telephone playing a fast busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Final State: The state machine ends at the final state. Key Concepts Illustrated State Transitions: The diagram illustrates various state transitions triggered by events such as\u00a0onHook,\u00a0offHook,\u00a0digit(n),\u00a0timeout,\u00a0isValidNumber,\u00a0numberBusy,\u00a0routed,\u00a0trunkBusy,\u00a0calledPhoneAnswers, and\u00a0calledPhoneHangsUp. Self Transitions: The self transition in the &#8220;Dialing&#8221; state allows the user to input multiple digits without changing the state. Guards: The guard\u00a0[isValidNumber]\u00a0ensures that the transition from &#8220;Dialing&#8221; to &#8220;Connecting&#8221; only occurs if the dialed number is valid. Initial and Final States: The initial pseudo state and final state represent the start and end points of the state machine, respectively. Conclusion UML state diagrams are invaluable for understanding and designing the dynamic behavior of systems that undergo various states over time. By breaking down the telephone call management system example, we have seen how state diagrams can capture the different states of an object and the transitions between those states in response to events. This example demonstrates the practical application of state diagrams in real-world scenarios, making it easier to learn and apply UML in software development. Whether you are a beginner or an experienced developer, understanding state diagrams can significantly enhance your ability to design and analyze complex systems. So, start practicing with more examples and explore the powerful features of UML state diagrams to master this essential skill.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/\" \/>\n<meta property=\"og:site_name\" content=\"Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-26T05:52:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\" \/>\n<meta name=\"author\" content=\"curtis\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"curtis\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/\",\"url\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/\",\"name\":\"Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439\",\"isPartOf\":{\"@id\":\"https:\/\/www.go-uml.com\/ru\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\",\"datePublished\":\"2024-11-26T05:52:34+00:00\",\"dateModified\":\"2024-11-26T05:52:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/fc1da26b1e963fc50ec2722b231a274b\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage\",\"url\":\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\",\"contentUrl\":\"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png\",\"width\":\"1211\",\"height\":\"366\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.go-uml.com\/ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learning UML State Diagrams by Example: Telephone Call Management System\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/#website\",\"url\":\"https:\/\/www.go-uml.com\/ru\/\",\"name\":\"Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.go-uml.com\/ru\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/fc1da26b1e963fc50ec2722b231a274b\",\"name\":\"curtis\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/48025789fc0776739935e63d9f629084?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/48025789fc0776739935e63d9f629084?s=96&d=mm&r=g\",\"caption\":\"curtis\"},\"url\":\"https:\/\/www.go-uml.com\/ru\/author\/curtis\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/","og_locale":"ru_RU","og_type":"article","og_title":"Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439","og_description":"UML (Unified Modeling Language) state diagrams, also known as state machines or state charts, are a type of behavioral diagram that illustrates the different states of an object and the transitions between those states in response to events. State diagrams are particularly useful for understanding and designing the dynamic behavior of systems that undergo various states over time. In this article, we will learn about UML state diagrams using a practical example: a telephone call management system. Understanding the Telephone Call Management System The Figure below illustrates a state diagram for a telephone call management system. Let&#8217;s break down the key elements and concepts depicted in this diagram. &nbsp; Key Elements of a State Diagram State: Definition: Represents a condition or situation during the life of an object. Representation: A rounded rectangle with the state&#8217;s name. Example: States like &#8220;Idle,&#8221; &#8220;DialTone,&#8221; &#8220;Dialing,&#8221; &#8220;Connecting,&#8221; &#8220;Ringing,&#8221; &#8220;Connected,&#8221; and &#8220;Disconnected.&#8221; Initial Pseudo State: Definition: Represents the start point of the state machine. Representation: A solid black circle. Example: The initial pseudo state at the beginning of the diagram. Final State: Definition: Represents the end point of the state machine. Representation: A solid black circle with a border. Example: The final state at the end of the diagram. Transition: Definition: Represents a change from one state to another in response to an event. Representation: A solid arrow connecting states, often labeled with the event that triggers the transition. Example: The transition from &#8220;Idle&#8221; to &#8220;DialTone&#8221; triggered by the\u00a0onHook\u00a0event. Self Transition: Definition: Represents a transition from a state back to itself. Representation: A looping arrow from a state back to itself. Example: The self transition in the &#8220;Dialing&#8221; state triggered by the\u00a0digit(n)\u00a0event. Guard: Definition: Represents a condition that must be true for a transition to occur. Representation: A condition in square brackets on the transition arrow. Example: The guard\u00a0[isValidNumber]\u00a0on the transition from &#8220;Dialing&#8221; to &#8220;Connecting.&#8221; Step-by-Step Walkthrough Let&#8217;s walk through the telephone call management system step by step: Initial State: The state machine begins at the initial pseudo state. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Idle State: The &#8220;Idle&#8221; state represents the telephone being on the hook. The transition to the &#8220;DialTone&#8221; state is triggered by the\u00a0offHook\u00a0event. DialTone State: The &#8220;DialTone&#8221; state represents the telephone playing a dial tone. The transition to the &#8220;Dialing&#8221; state is triggered by the\u00a0digit(n)\u00a0event. Dialing State: The &#8220;Dialing&#8221; state represents the user dialing a number. The self transition triggered by the\u00a0digit(n)\u00a0event allows the user to input multiple digits. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event if the user takes too long to dial. The transition to the &#8220;Connecting&#8221; state is triggered by the\u00a0isValidNumber\u00a0guard if the dialed number is valid. The transition to the &#8220;BusyTone&#8221; state is triggered by the\u00a0numberBusy\u00a0event if the dialed number is busy. Timeout State: The &#8220;Timeout&#8221; state represents a timeout condition. The transition to the &#8220;Warning&#8221; state is triggered by the\u00a0timeout\u00a0event. The transition back to the &#8220;DialTone&#8221; state is triggered by the\u00a0timeout\u00a0event. Warning State: The &#8220;Warning&#8221; state represents a warning condition. The transition to the &#8220;Timeout&#8221; state is triggered by the\u00a0timeout\u00a0event. Connecting State: The &#8220;Connecting&#8221; state represents the telephone attempting to connect the call. The transition to the &#8220;Ringing&#8221; state is triggered by the\u00a0routed\u00a0event. The transition to the &#8220;FastBusyTone&#8221; state is triggered by the\u00a0trunkBusy\u00a0event if the trunk line is busy. Ringing State: The &#8220;Ringing&#8221; state represents the telephone ringing the called party. The transition to the &#8220;Connected&#8221; state is triggered by the\u00a0calledPhoneAnswers\u00a0event. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Connected State: The &#8220;Connected&#8221; state represents an active call. The transition to the &#8220;Disconnected&#8221; state is triggered by the\u00a0calledPhoneHangsUp\u00a0event if the called party hangs up. Disconnected State: The &#8220;Disconnected&#8221; state represents the call being disconnected. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. BusyTone State: The &#8220;BusyTone&#8221; state represents the telephone playing a busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. FastBusyTone State: The &#8220;FastBusyTone&#8221; state represents the telephone playing a fast busy tone. The transition to the &#8220;Idle&#8221; state is triggered by the\u00a0onHook\u00a0event. Final State: The state machine ends at the final state. Key Concepts Illustrated State Transitions: The diagram illustrates various state transitions triggered by events such as\u00a0onHook,\u00a0offHook,\u00a0digit(n),\u00a0timeout,\u00a0isValidNumber,\u00a0numberBusy,\u00a0routed,\u00a0trunkBusy,\u00a0calledPhoneAnswers, and\u00a0calledPhoneHangsUp. Self Transitions: The self transition in the &#8220;Dialing&#8221; state allows the user to input multiple digits without changing the state. Guards: The guard\u00a0[isValidNumber]\u00a0ensures that the transition from &#8220;Dialing&#8221; to &#8220;Connecting&#8221; only occurs if the dialed number is valid. Initial and Final States: The initial pseudo state and final state represent the start and end points of the state machine, respectively. Conclusion UML state diagrams are invaluable for understanding and designing the dynamic behavior of systems that undergo various states over time. By breaking down the telephone call management system example, we have seen how state diagrams can capture the different states of an object and the transitions between those states in response to events. This example demonstrates the practical application of state diagrams in real-world scenarios, making it easier to learn and apply UML in software development. Whether you are a beginner or an experienced developer, understanding state diagrams can significantly enhance your ability to design and analyze complex systems. So, start practicing with more examples and explore the powerful features of UML state diagrams to master this essential skill.","og_url":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/","og_site_name":"Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439","article_published_time":"2024-11-26T05:52:34+00:00","og_image":[{"url":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","type":"","width":"","height":""}],"author":"curtis","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"curtis","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"5 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/","url":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/","name":"Learning UML State Diagrams by Example: Telephone Call Management System - Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439","isPartOf":{"@id":"https:\/\/www.go-uml.com\/ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage"},"image":{"@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage"},"thumbnailUrl":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","datePublished":"2024-11-26T05:52:34+00:00","dateModified":"2024-11-26T05:52:34+00:00","author":{"@id":"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/fc1da26b1e963fc50ec2722b231a274b"},"breadcrumb":{"@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#primaryimage","url":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","contentUrl":"https:\/\/www.go-uml.com\/ru\/wp-content\/uploads\/sites\/11\/2024\/11\/img_6745616fa9e0d.png","width":"1211","height":"366"},{"@type":"BreadcrumbList","@id":"https:\/\/www.go-uml.com\/ru\/learning-uml-state-diagrams-by-example-telephone-call-management-system\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.go-uml.com\/ru\/"},{"@type":"ListItem","position":2,"name":"Learning UML State Diagrams by Example: Telephone Call Management System"}]},{"@type":"WebSite","@id":"https:\/\/www.go-uml.com\/ru\/#website","url":"https:\/\/www.go-uml.com\/ru\/","name":"Go UML \u0420\u0443\u0441\u0441\u043a\u0438\u0439","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.go-uml.com\/ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/fc1da26b1e963fc50ec2722b231a274b","name":"curtis","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/www.go-uml.com\/ru\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/48025789fc0776739935e63d9f629084?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/48025789fc0776739935e63d9f629084?s=96&d=mm&r=g","caption":"curtis"},"url":"https:\/\/www.go-uml.com\/ru\/author\/curtis\/"}]}},"_links":{"self":[{"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/posts\/669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/comments?post=669"}],"version-history":[{"count":2,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/posts\/669\/revisions"}],"predecessor-version":[{"id":673,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/posts\/669\/revisions\/673"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/media\/671"}],"wp:attachment":[{"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/media?parent=669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/categories?post=669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.go-uml.com\/ru\/wp-json\/wp\/v2\/tags?post=669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}