---
title: "State Machine 2 Diagram"
description: "A diagram diagram template"
category: "templates/uml"
type: "diagram"
source_file: "templates/uml/state_machine_2_decoded.xml"
tags: ["software", "template", "modeling", "drawio", "uml"]
---

# State Machine 2 Diagram

A diagram diagram template

## XML Source

```xml
<?xml version="1.0" ?>
<mxGraphModel dx="1408" dy="544" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="none" math="0" shadow="0">
  <root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <mxCell id="a89904937c33695-14" value="Composite State" style="swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;collapsible=0;rounded=1;arcSize=18;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;" parent="1" vertex="1">
      <mxGeometry x="225" y="347.5" width="160" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-15" value="Subtitle" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;" parent="a89904937c33695-14" vertex="1">
      <mxGeometry y="30" width="160" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-16" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;entryX=0.5;entryY=0;" parent="1" source="a89904937c33695-14" target="a89904937c33695-19" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="305" y="467.5" as="targetPoint"/>
        <Array as="points"/>
      </mxGeometry>
    </mxCell>
    <mxCell id="a89904937c33695-17" value="Composite State" style="swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;collapsible=0;rounded=1;arcSize=21;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;" parent="1" vertex="1">
      <mxGeometry x="615" y="347.5" width="160" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-18" value="Subtitle" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;" parent="a89904937c33695-17" vertex="1">
      <mxGeometry y="30" width="160" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-19" value="Composite State" style="swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;collapsible=0;rounded=1;arcSize=21;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;" parent="1" vertex="1">
      <mxGeometry x="225" y="552.5" width="160" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-20" value="Subtitle" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;" parent="a89904937c33695-19" vertex="1">
      <mxGeometry y="30" width="160" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-21" value="Composite State" style="swimlane;html=1;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;collapsible=0;rounded=1;arcSize=20;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;" parent="1" vertex="1">
      <mxGeometry x="615" y="552.5" width="160" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-22" value="Subtitle" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;" parent="a89904937c33695-21" vertex="1">
      <mxGeometry y="30" width="160" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-24" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;entryX=1;entryY=0.25;exitX=0;exitY=0.5;" parent="1" source="a89904937c33695-18" target="a89904937c33695-19" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="314.7586206896551" y="562.8103448275863" as="targetPoint"/>
        <mxPoint x="595" y="392.5" as="sourcePoint"/>
        <Array as="points">
          <mxPoint x="505" y="392.5"/>
          <mxPoint x="505" y="567.5"/>
        </Array>
      </mxGeometry>
    </mxCell>
    <mxCell id="a89904937c33695-26" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;entryX=0;entryY=0.25;exitX=1;exitY=0.25;" parent="1" source="a89904937c33695-14" target="a89904937c33695-17" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="314.7586206896551" y="562.8103448275863" as="targetPoint"/>
        <mxPoint x="314.7586206896551" y="417.5" as="sourcePoint"/>
        <Array as="points">
          <mxPoint x="425" y="362.5"/>
          <mxPoint x="425" y="362.5"/>
        </Array>
      </mxGeometry>
    </mxCell>
    <mxCell id="a89904937c33695-27" value="" style="ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;rounded=1;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;align=center;" parent="1" vertex="1">
      <mxGeometry x="290" y="237.5" width="30" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-28" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;entryX=0.5;entryY=0;" parent="1" source="a89904937c33695-27" target="a89904937c33695-14" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="305" y="327.5" as="targetPoint"/>
        <Array as="points"/>
      </mxGeometry>
    </mxCell>
    <mxCell id="a89904937c33695-29" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" parent="1" source="a89904937c33695-20" target="a89904937c33695-22" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="585" y="597.5" as="targetPoint"/>
        <mxPoint x="395" y="587.5" as="sourcePoint"/>
        <Array as="points"/>
      </mxGeometry>
    </mxCell>
    <mxCell id="a89904937c33695-30" value="" style="ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;rounded=1;shadow=0;comic=0;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;align=center;" parent="1" vertex="1">
      <mxGeometry x="845" y="567.5" width="30" height="30" as="geometry"/>
    </mxCell>
    <mxCell id="a89904937c33695-31" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;labelBackgroundColor=none;fontFamily=Verdana;fontSize=12;fontColor=#000000;" parent="1" target="a89904937c33695-30" edge="1">
      <mxGeometry relative="1" as="geometry">
        <mxPoint x="625.1428571428571" y="607.7857142857143" as="targetPoint"/>
        <mxPoint x="775" y="582.5" as="sourcePoint"/>
        <Array as="points">
          <mxPoint x="775" y="582.5"/>
        </Array>
      </mxGeometry>
    </mxCell>
  </root>
</mxGraphModel>

```