{"id":1694,"date":"2026-02-25T10:44:53","date_gmt":"2026-02-25T10:44:53","guid":{"rendered":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/"},"modified":"2026-02-25T10:44:53","modified_gmt":"2026-02-25T10:44:53","slug":"uml-sequence-fragments-alternatives-loops","status":"publish","type":"docs","link":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/","title":{"rendered":"Handling Alternatives and Loops in Sequences"},"content":{"rendered":"<p>\u201cI just want to show what happens when the user logs in\u201d \u2014 that\u2019s a phrase I hear weekly from beginners. It often means they\u2019re about to draw a single path with no consideration for failure, timeout, or retry. That\u2019s fine for a first sketch \u2014 but in real systems, things don\u2019t always go smoothly. The real power of sequence diagrams comes not just from showing one flow, but from modeling the full picture: what happens when things go wrong, when choices are made, when actions repeat. That\u2019s where UML sequence fragments come in.<\/p>\n<p>These aren\u2019t extra bells and whistles \u2014 they\u2019re the tools that turn a simple interaction diagram into a reliable blueprint for behavior. You\u2019ll learn how to use <strong>alt<\/strong>, <strong>option<\/strong>, <strong>loop<\/strong>, and <strong>par<\/strong> fragments to model conditional logic, repetition, and parallelism \u2014 all while keeping your diagrams clean and readable.<\/p>\n<p>By the end of this chapter, you\u2019ll be able to model a login process that handles both valid and invalid credentials, a checkout system that repeats attempts on timeout, and a task that runs in parallel with confirmation. You\u2019ll understand not just how to draw them, but when to use each one \u2014 and when to avoid overcomplicating.<\/p>\n<h2>Why Sequence Fragments Are Essential for Realistic Behavior<\/h2>\n<p>Sequence diagrams aren\u2019t just about time order. They\u2019re about <strong>control flow<\/strong>. Without fragments, you\u2019re limited to a single path, which doesn\u2019t reflect real-world software behavior.<\/p>\n<p>Consider a login system. A user enters a username and password. The system might respond in multiple ways: success, invalid password, locked account, or network failure.<\/p>\n<p>To represent these possibilities, you need to move beyond a single linear flow. That\u2019s what sequence fragments are for.<\/p>\n<p>They let you define alternative branches, repeat actions, and run processes in parallel \u2014 all within the same diagram. This makes your models more accurate, more useful for testing, and more valuable when discussing design with teammates.<\/p>\n<h2>Modeling Alternatives with <code>alt<\/code> and <code>option<\/code> Fragments<\/h2>\n<p>The <code>alt<\/code> fragment is your go-to for modeling mutually exclusive alternatives \u2014 like success vs. error.<\/p>\n<h3>When to Use <code>alt<\/code><\/h3>\n<ul>\n<li>When only one branch should execute (e.g., login succeeds or fails).<\/li>\n<li>When modeling valid and invalid outcomes.<\/li>\n<li>When you want to highlight a primary path and its exceptions.<\/li>\n<\/ul>\n<p>Here\u2019s how to use it:<\/p>\n<ol>\n<li>Draw a rectangle around the messages that represent the main flow.<\/li>\n<li>Label the top of the rectangle <code>alt<\/code>.<\/li>\n<li>Inside, add a condition in brackets (e.g., <code>[success]<\/code>).<\/li>\n<li>Draw the alternative branch below, starting with <code>[else]<\/code>.<\/li>\n<\/ol>\n<p>Example: A login that either succeeds or returns an error.<\/p>\n<pre><code>alt [success]\n  User --&gt; System: Enter credentials\n  System --&gt; User: Welcome!\nelse [failure]\n  User --&gt; System: Enter credentials\n  System --&gt; User: Invalid password\n<\/code><\/pre>\n<p>This is a clean way to show <strong>conditional flows in sequence UML<\/strong>. It\u2019s easy to read, and it emphasizes the most common path first.<\/p>\n<h3>When to Use <code>option<\/code><\/h3>\n<p>The <code>option<\/code> fragment is similar but less strict. It allows multiple branches, but the rules are looser \u2014 it\u2019s useful when you want to show optional paths.<\/p>\n<ul>\n<li>Use <code>option<\/code> when you\u2019re listing possibilities, not enforcing exclusivity.<\/li>\n<li>Good for showing actions that might happen under certain conditions (e.g., \u201csend email\u201d or \u201cnotify admin\u201d).<\/li>\n<li>Doesn\u2019t require a <code>then<\/code> or <code>else<\/code> \u2014 so it\u2019s more flexible.<\/li>\n<\/ul>\n<p>Example: A user can log in with password, biometrics, or magic link.<\/p>\n<pre><code>option [password]\n  User --&gt; System: Enter password\n  System --&gt; User: Login success\noption [biometrics]\n  User --&gt; System: Scan fingerprint\n  System --&gt; User: Login success\noption [magic link]\n  User --&gt; System: Click link\n  System --&gt; User: Login success\n<\/code><\/pre>\n<p>Use <code>option<\/code> when you\u2019re not enforcing mutual exclusivity \u2014 for example, when showing possible login methods, not the actual one used.<\/p>\n<h2>Modeling Repetition with the <code>loop<\/code> Fragment<\/h2>\n<p>Some actions repeat. A system might retry a failed connection, or a user might confirm an action multiple times.<\/p>\n<p>The <code>loop<\/code> fragment models repetition clearly and efficiently.<\/p>\n<h3>How to Use <code>loop<\/code><\/h3>\n<ol>\n<li>Enclose the repeated messages in a rectangle.<\/li>\n<li>Label it <code>loop<\/code>.<\/li>\n<li>Add a condition in brackets: <code>[while retries &lt; 3]<\/code>.<\/li>\n<\/ol>\n<p>Example: A system retries a network call up to 3 times.<\/p>\n<pre><code>loop [while retries &lt; 3]\n  System --&gt; Network: Send request\n  Network --&gt; System: Timeout\n  System --&gt; User: Retry attempt {retries + 1}\n<\/code><\/pre>\n<p>This is a powerful way to model <strong>sequence diagram alternatives loops<\/strong>. It\u2019s concise, readable, and avoids the need to draw the same messages three times.<\/p>\n<p>Don\u2019t overuse loop fragments. If you\u2019re repeating more than 2\u20133 times, consider whether a loop is appropriate \u2014 or if it should be modeled in a different diagram (like an activity diagram) for clarity.<\/p>\n<h2>Running Tasks in Parallel with <code>par<\/code><\/h2>\n<p>Some tasks happen at the same time. For example, a user logs in, and the system simultaneously starts a session, sends a welcome email, and logs the event.<\/p>\n<p>The <code>par<\/code> fragment (short for \u201cparallel\u201d) lets you show these concurrent actions.<\/p>\n<h3>How to Use <code>par<\/code><\/h3>\n<ol>\n<li>Draw a rectangle around the parallel actions.<\/li>\n<li>Label it <code>par<\/code>.<\/li>\n<li>Each branch inside should be a separate sequence of messages.<\/li>\n<\/ol>\n<p>Example: After login, the system starts multiple processes.<\/p>\n<pre><code>par\n  System --&gt; Session: Create session\n  System --&gt; Email: Send welcome email\n  System --&gt; Logger: Log login event\n<\/code><\/pre>\n<p>Use <code>par<\/code> when actions are independent and don\u2019t depend on each other\u2019s completion. If you need them to finish before continuing, use <code>opt<\/code> or <code>alt<\/code> with synchronization points.<\/p>\n<h3>When to Avoid <code>par<\/code><\/h3>\n<ul>\n<li>When actions depend on each other (e.g., you can\u2019t send an email until the session is created).<\/li>\n<li>When the number of parallel actions exceeds 3 \u2014 the diagram becomes cluttered.<\/li>\n<li>When you\u2019re modeling execution order that isn\u2019t truly concurrent.<\/li>\n<\/ul>\n<p>For complex parallel flows, consider breaking them into smaller diagrams or using activity diagrams instead.<\/p>\n<h2>Best Practices and Common Pitfalls<\/h2>\n<h3>Keep Fragments Simple<\/h3>\n<p>Don\u2019t nest fragments too deeply. One level of <code>alt<\/code> or <code>loop<\/code> is usually sufficient. If you need more, consider splitting the diagram.<\/p>\n<h3>Label Conditions Clearly<\/h3>\n<p>Use natural language in brackets: <code>[user exists]<\/code>, <code>[password matches]<\/code>. Avoid complex expressions unless necessary.<\/p>\n<h3>Use Consistent Layout<\/h3>\n<p>Align fragments vertically. Start each branch on the same timeline. Avoid diagonal or overlapping flows.<\/p>\n<h3>Don\u2019t Overuse Fragments<\/h3>\n<p>Not every decision needs a fragment. If a path is straightforward and unlikely to fail, just draw it. Use fragments only when you need to capture alternative outcomes.<\/p>\n<h2>Decision Checklist: Which Fragment to Use<\/h2>\n<table border=\"1\" cellpadding=\"4\" cellspacing=\"0\">\n<tbody>\n<tr>\n<th>Scenario<\/th>\n<th>Fragment<\/th>\n<th>Why?<\/th>\n<\/tr>\n<tr>\n<td>Only one outcome happens: success vs. failure<\/td>\n<td><code>alt<\/code><\/td>\n<td>Enforces mutual exclusivity<\/td>\n<\/tr>\n<tr>\n<td>Multiple possible paths (e.g., login methods)<\/td>\n<td><code>option<\/code><\/td>\n<td>Flexible, no need for exclusivity<\/td>\n<\/tr>\n<tr>\n<td>Repeating an action (e.g., retrying)<\/td>\n<td><code>loop<\/code><\/td>\n<td>Clear and concise repetition<\/td>\n<\/tr>\n<tr>\n<td>Independent actions at the same time<\/td>\n<td><code>par<\/code><\/td>\n<td>Models concurrency effectively<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Frequently Asked Questions<\/h2>\n<h3>Can I use multiple fragments in one diagram?<\/h3>\n<p>Yes \u2014 but be careful. You can combine <code>alt<\/code> and <code>loop<\/code> by placing a loop inside an <code>alt<\/code> branch. However, avoid deep nesting. If you find yourself with three layers, consider splitting the diagram.<\/p>\n<h3>How do I know if I should use a fragment or create a new diagram?<\/h3>\n<p>Use fragments when the alternative or loop is part of the same interaction. If the logic is complex \u2014 like a multi-step decision tree or a stateful process \u2014 consider using an activity diagram instead. Fragments are for behavior within a single interaction flow.<\/p>\n<h3>Do fragments affect the activation bar?<\/h3>\n<p>Yes \u2014 the activation bar should span the entire fragment. If you&#8217;re inside a <code>loop<\/code>, the activation should last for the duration of the loop. For <code>par<\/code>, each path gets its own activation bar that runs in parallel.<\/p>\n<h3>Can I use fragments in communication diagrams?<\/h3>\n<p>No \u2014 fragments are specific to sequence diagrams. Communication diagrams use numbered messages and focus on object collaboration, not control flow. Use UML sequence fragments only where timing and conditional logic matter.<\/p>\n<h3>How do I model a loop that stops on success?<\/h3>\n<p>Use <code>loop<\/code> with a condition like <code>[until success]<\/code>. This makes it clear the loop continues until a condition is met. Example:<\/p>\n<pre><code>loop [until success]\n  System --&gt; Network: Send request\n  Network --&gt; System: Failed\n  System --&gt; User: Try again\n<\/code><\/pre>\n<h3>Are fragments mandatory in every sequence diagram?<\/h3>\n<p>No. Use them only when you need to show alternatives, repetition, or parallelism. A simple login flow with no error cases doesn\u2019t need fragments. But if you\u2019re modeling real-world behavior, they\u2019re essential.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u201cI just want to show what happens when the user logs in\u201d \u2014 that\u2019s a phrase I hear weekly from beginners. It often means they\u2019re about to draw a single path with no consideration for failure, timeout, or retry. That\u2019s fine for a first sketch \u2014 but in real systems, things don\u2019t always go smoothly. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1689,"menu_order":4,"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_tag":[],"class_list":["post-1694","docs","type-docs","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>UML Sequence Fragments: Handling Alternatives and Loops<\/title>\n<meta name=\"description\" content=\"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UML Sequence Fragments: Handling Alternatives and Loops\" \/>\n<meta property=\"og:description\" content=\"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/\" \/>\n<meta property=\"og:site_name\" content=\"Visual Paradigm Skills Portugu\u00eas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/\",\"url\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/\",\"name\":\"UML Sequence Fragments: Handling Alternatives and Loops\",\"isPartOf\":{\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#website\"},\"datePublished\":\"2026-02-25T10:44:53+00:00\",\"description\":\"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.\",\"breadcrumb\":{\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/skills.visual-paradigm.com\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"UML Basics: Diagrams for Beginners\",\"item\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Sequence Diagrams for Interaction Flows\",\"item\":\"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Handling Alternatives and Loops in Sequences\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#website\",\"url\":\"https:\/\/skills.visual-paradigm.com\/pt\/\",\"name\":\"Visual Paradigm Skills Portugu\u00eas\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/skills.visual-paradigm.com\/pt\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#organization\",\"name\":\"Visual Paradigm Skills Portugu\u00eas\",\"url\":\"https:\/\/skills.visual-paradigm.com\/pt\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/skills.visual-paradigm.com\/pt\/wp-content\/uploads\/sites\/9\/2026\/02\/favicon.svg\",\"contentUrl\":\"https:\/\/skills.visual-paradigm.com\/pt\/wp-content\/uploads\/sites\/9\/2026\/02\/favicon.svg\",\"width\":70,\"height\":70,\"caption\":\"Visual Paradigm Skills Portugu\u00eas\"},\"image\":{\"@id\":\"https:\/\/skills.visual-paradigm.com\/pt\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"UML Sequence Fragments: Handling Alternatives and Loops","description":"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.","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:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/","og_locale":"pt_PT","og_type":"article","og_title":"UML Sequence Fragments: Handling Alternatives and Loops","og_description":"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.","og_url":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/","og_site_name":"Visual Paradigm Skills Portugu\u00eas","twitter_card":"summary_large_image","twitter_misc":{"Tempo estimado de leitura":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/","url":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/","name":"UML Sequence Fragments: Handling Alternatives and Loops","isPartOf":{"@id":"https:\/\/skills.visual-paradigm.com\/pt\/#website"},"datePublished":"2026-02-25T10:44:53+00:00","description":"Master UML sequence fragments to model conditional flows in sequence UML and handle loops with clarity. Learn how to use alt, option, loop, and parallel fragments effectively for better interaction modeling.","breadcrumb":{"@id":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/uml-sequence-fragments-alternatives-loops\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/skills.visual-paradigm.com\/pt\/"},{"@type":"ListItem","position":2,"name":"UML Basics: Diagrams for Beginners","item":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/"},{"@type":"ListItem","position":3,"name":"Sequence Diagrams for Interaction Flows","item":"https:\/\/skills.visual-paradigm.com\/pt\/docs\/uml-basics-diagrams-for-beginners\/sequence-diagrams-for-interaction-flows\/"},{"@type":"ListItem","position":4,"name":"Handling Alternatives and Loops in Sequences"}]},{"@type":"WebSite","@id":"https:\/\/skills.visual-paradigm.com\/pt\/#website","url":"https:\/\/skills.visual-paradigm.com\/pt\/","name":"Visual Paradigm Skills Portugu\u00eas","description":"","publisher":{"@id":"https:\/\/skills.visual-paradigm.com\/pt\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/skills.visual-paradigm.com\/pt\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/skills.visual-paradigm.com\/pt\/#organization","name":"Visual Paradigm Skills Portugu\u00eas","url":"https:\/\/skills.visual-paradigm.com\/pt\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/skills.visual-paradigm.com\/pt\/#\/schema\/logo\/image\/","url":"https:\/\/skills.visual-paradigm.com\/pt\/wp-content\/uploads\/sites\/9\/2026\/02\/favicon.svg","contentUrl":"https:\/\/skills.visual-paradigm.com\/pt\/wp-content\/uploads\/sites\/9\/2026\/02\/favicon.svg","width":70,"height":70,"caption":"Visual Paradigm Skills Portugu\u00eas"},"image":{"@id":"https:\/\/skills.visual-paradigm.com\/pt\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/docs\/1694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":0,"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/docs\/1694\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/docs\/1689"}],"wp:attachment":[{"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/media?parent=1694"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/skills.visual-paradigm.com\/pt\/wp-json\/wp\/v2\/doc_tag?post=1694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}