[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-655600-105":59,"doc-detail-655600-en":130,"doc-similar-655600":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","state-machine-diagrams-a-simple-state-machine-diagram-explanation","State Machine Diagrams - A simple state machine diagram - Explanation","","State Machine Diagrams explain how to model an object's behavior across its lifetime using states and transitions. The content describes initial pseudostates, multiple named states such as Wait, Lock, and Open, and transition labels composed of optional trigger-signature, guard, and activity. It covers rules for valid transitions, ignoring events with no applicable path, and how final states imply completion. It also introduces internal activities (entry/exit) and activity states using do-activities that can be halted or completed based on events.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/state-machine-diagrams-a-simple-state-machine-diagram-explanation/655600/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/state-machine-diagrams-a-simple-state-machine-diagram-explanation/655600.png","ImageObject",300,407,{"name":92,"@type":93},"Lucas Martin","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-26","2026-10-25",true,{"@type":102,"interactionType":103,"userInteractionCount":39},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are the main components of a state machine diagram transition?","Question",{"text":112,"@type":113},"A transition label has three optional parts: trigger-signature, guard, and activity. If a part is missing, the diagram defines how events are handled (e.g., no activity means nothing happens; no guard means the transition is taken whenever the event occurs).","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the diagram determine which transition to take when an event occurs?",{"text":117,"@type":113},"When an event occurs in a state, only one outgoing transition can be taken. If multiple transitions share the same event, their guards must be mutually exclusive; otherwise, invalid combinations are not taken and the event may be ignored.",{"name":119,"@type":110,"acceptedAnswer":120},"What is the difference between internal activities and self-transitions?",{"text":121,"@type":113},"Internal activities execute within the state box but do not trigger entry and exit activities. This contrasts with self-transitions, which loop back to the same state and can trigger entry/exit behavior according to the diagram’s state change semantics.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},655600,1793073226,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":39,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":44,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":143,"read_time":144,"preview_page_count":19,"preview_urls":145},8796095360427,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","# State Machine Diagrams\n\nState machine diagrams are a familiar technique to describe the behavior of asystem.Various forms of state diagrams have been around since the 1960s andthe earliest object-oriented techniques adopted them to show behavior.Inobject-oriented approaches,you draw a state machine diagram for a single classto show the lifetime behavior of a single object.  \nWhenever people write about state machines,the examples are inevitablycruise controls or vending machines.As I’m a little bored with them,I decidedto use a controller for a secret panel in a Gothic castle.In this castle,I want tokeep my valuables in a safe that's hard to find.So to reveal the lock to the safe,I have to remove a strategic candle from its holder,but this will reveal the lockonly while the door is closed.Once I can see the lock,I can insert my key toopen the safe.For extra safety,I make sure that I can open the safe only if Ireplace the candle first.If a thief neglects this precaution,I'll unleash a nastymonster to devour him.  \nFigure 10.1 shows a state machine diagram of the controller class that directsmy unusual security system.The state diagram starts with the state of the con-troller object when it's created:in Figure 10.1,the Wait state.The diagram indi-cates this with initial pseudostate,which is not a state but has an arrow thatpoints to the initial state.  \nThe diagram shows that the controller can be in three states:Wait,Lock,andOpen.The diagram also gives the rules by which the controller changes fromstate to state.These rules are in the form of transitions:the lines that connectthe states.  \nThe transition indicates a movement from one state to another.Each transitionhas a label that comes in three parts:trigger-signature [guard]/activity.All the partsare optional.The trigger-signature is usually a single event that triggers a potentialchange of state.The guard,if present,is a Boolean condition that must be true forthe transition to be taken.The activity is some behavior that's executed during thetransition.It may be any behavioral expression.The full form of a trigger-signature  \nCHAPTER 10 STATE MACHINE DIAGRAMS  \nFigure 10.1 A simple state machine diagram  \nmay include multiple events and parameters.So in Figure 10.1,you read the out-ward transition from the Wait state as \"In the Wait state if the candle is removedproviding the door is open,you reveal the lock and move to the Lock state.”  \nAll three parts to a transition are optional.A missing activity indicates thatyou don't do anything during the transition.A missing guard indicates that youalways take the transition if the event occurs.A missing trigger-signature is rarebut does occur.It indicates that you take the transition immediately,which yousee mostly with activity states,which I'll come to in a moment.  \nWhen an event occurs in a state,you can take only one transition out of it.So if you use multiple transitions with the same event,as in the Lock state ofFigure 10.1,the guards must be mutually exclusive.If an event occurs and notransition is valid—for example,a safe-closed event in the Wait state or a candle-removed event with the door closed—the event is ignored.  \nThe final state indicates that the state machine is completed,implying thedeletion of the controller object.Thus,if someone should be so careless as tofall for my trap,the controller object terminates,so I would need to put the rab-bit in its cage,mop the floor,and reboot the system.  \nRemember that state machines can show only what the object directlyobserves or activates.So although you might expect me to add or remove things  \nfrom the safe when it's open,I don't put that on the state diagram,because thecontroller cannot tell.  \nWhen developers talk about objects,they often refer to the state of theobjects to mean the combination of all the data in the fields of the objects.However,the state in a state machine diagram is a more abstract notion ofstate;essentially,different states imply a different w","cbCaie1VswwVfSwr","https://ap.wps.com/l/cbCaie1VswwVfSwr","pdf",292845,"English","# State Machine Diagrams\n## Internal Activities\n## Activity States","[{\"question\":\"What are the main components of a state machine diagram transition?\",\"answer\":\"A transition label has three optional parts: trigger-signature, guard, and activity. If a part is missing, the diagram defines how events are handled (e.g., no activity means nothing happens; no guard means the transition is taken whenever the event occurs).\"},{\"question\":\"How does the diagram determine which transition to take when an event occurs?\",\"answer\":\"When an event occurs in a state, only one outgoing transition can be taken. If multiple transitions share the same event, their guards must be mutually exclusive; otherwise, invalid combinations are not taken and the event may be ignored.\"},{\"question\":\"What is the difference between internal activities and self-transitions?\",\"answer\":\"Internal activities execute within the state box but do not trigger entry and exit activities. This contrasts with self-transitions, which loop back to the same state and can trigger entry/exit behavior according to the diagram’s state change semantics.\"}]","State Machine Diagrams - A simple state machine diagram - Explanation | PDF",1792962838,23,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/2fd5d52643e0aced5e74d11a3cb70b4a.webp",983,1399,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/50a04eb29601f97031130dbc4e274c96.webp",982,1398,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/f14d56453779b8530b1b299b5b873f6f.webp",981,1396,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/9a101d3042ed0fee223a48d59588b849.webp",980,1395,{"list":163,"token":66},[164,171,177,183,188,194,200,206,212,218],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":169,"category_name":30,"create_tm":170},655585,"Unit-5 - Activity Diagrams - 1 - Activity diagram overview and drawing guidance","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285680/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=xD%2Fo6DHlZFs5eXqHxnuRqrXvRXs%3D","unit-5-activity-diagrams-1-activity-diagram-overview-and-drawing-guidance",18,1792962748,{"doc_id":172,"doc_title":173,"file_type":137,"home_preview_img_url":174,"slug":175,"view_count":44,"category_name":30,"create_tm":176},665483,"Information Systems Analysis and Design - State and Activity Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229983495517/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=tTooA10MbrYp9VR%2F59NRWV6N%2FKw%3D","information-systems-analysis-and-design-state-and-activity-diagrams",1793304474,{"doc_id":178,"doc_title":179,"file_type":137,"home_preview_img_url":180,"slug":181,"view_count":52,"category_name":30,"create_tm":182},655597,"Chapter 10: UML State Diagrams - Key Concepts","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286038/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=B2Ry%2F3d839sez4abRTywRB7UVNs%3D","chapter-10-uml-state-diagrams-key-concepts",1792962834,{"doc_id":184,"doc_title":185,"file_type":137,"home_preview_img_url":186,"slug":187,"view_count":44,"category_name":30,"create_tm":143},655599,"State Diagrams - State and Activity Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286048/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=DEoOyIJwEYw4qvF291OV2z6Fucc%3D","state-diagrams-state-and-activity-diagrams",{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":44,"category_name":30,"create_tm":193},655641,"Activity Diagram - UML Models - Definitions and Types","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286522/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=%2BIORljoRBp3VzoKU1EznM9Y%2FtB4%3D","activity-diagram-uml-models-definitions-and-types",1792962986,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":8,"category_name":30,"create_tm":199},691642,"XMC1100 / XMC1200 / XMC1300 - Fixed Flash Wait States - Datasheet Addendum - V1.1","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002681044/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=UK%2F5SRl%2BjtHnJmP6tFRICwFGb8c%3D","xmc1100-xmc1200-xmc1300-fixed-flash-wait-states-datasheet-addendum-v11",1794175517,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":52,"category_name":30,"create_tm":205},655587,"Chapter 16 - UML Activity Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285692/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=FaqOhDrmtCOEDdcemrEBe9IZT5k%3D","chapter-16-uml-activity-diagrams",1792962750,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":44,"category_name":30,"create_tm":211},655596,"State Diagram - Basic Concepts and How to Draw It","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286018/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=J2ILjjRfMYiJSy1cD9UQ0cOa44s%3D","state-diagram-basic-concepts-and-how-to-draw-it",1792962828,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":24,"category_name":30,"create_tm":217},690918,"Apoc_Datasheet_Adeptus_Custodes_web","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002039232/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=W%2BBJzSHIr1qsDcNM3voOr3IXVVs%3D","apoc_datasheet_adeptus_custodes_web",1794170886,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":223,"category_name":30,"create_tm":224},655734,"Interaction Diagrams I - Lecture 4 - Modelling and Simulation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975288569/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796151779&Signature=QotVUPraBFK5jUtE76sIApp1Xqg%3D","interaction-diagrams-i-lecture-4-modelling-and-simulation",11,1792963514]