digraph "NestedTransition" {
  compound = true;

  // Class: A

    // Top Level StateMachine: sm
    
    // Start states are shown as a black circle
    node [ratio="auto" shape = point, fillcolor="black", width=0.2 ];
    start_A_sm [ tooltip = "Class A, SM sm, State start" ];
    
        
    // Format for normal states
    node [ratio="auto" shape = rectangle, width=1,style=rounded];
    
      // State: s1

      A_sm_s1 [label = s1, tooltip = "Class A, SM sm, State s1", URL="javascript:Action.stateClicked(\"A^*^sm^*^s1\")"];
      // End State: s1

      // State: s2

     subgraph clusterA_sm_s2 {
      label = "s2";
      style = rounded;
      URL="javascript:Action.stateClicked(\"A^*^sm^*^s2\")";

      // Bottom Level StateMachine: s2
      
      // Start states are shown as a black circle
      node [ratio="auto" shape = point, fillcolor="black", width=0.2 ];
      start_A_smS2 [ tooltip = "Class A, SM sm, State s2.start" ];
      
            
      // Format for normal states
      node [ratio="auto" shape = rectangle, width=1,style=rounded];
      
        // State: s2a

        A_smS2_s2a [label = s2a, tooltip = "Class A, SM sm, State s2.s2a", URL="javascript:Action.stateClicked(\"A^*^sm^*^s2.s2a\")"];
        // End State: s2a

        // State: s2b

        A_smS2_s2b [label = s2b, tooltip = "Class A, SM sm, State s2.s2b", URL="javascript:Action.stateClicked(\"A^*^sm^*^s2.s2b\")"];
        // End State: s2b
      // End Bottom Level StateMachine: s2
     }
      // End State: s2
    // End Top Level StateMachine: sm

  // All transitions
    start_A_sm -> A_sm_s1 [  tooltip = "start to s1", URL="javascript:Action.transitionClicked(\"null\")" ] ;
    A_smS2_s2a -> A_sm_s1 [  ltail=clusterA_sm_s2,  label = "e1", tooltip = "From s2 to s1 on e1", URL="javascript:Action.transitionClicked(\"A*^*sm*^*e1*^*s2*^*s1*^*\")" ] ;
  
  A_sm_s1 -> A_smS2_s2a [  lhead=clusterA_sm_s2,  label = "e1", tooltip = "From s1 to s2 on e1", URL="javascript:Action.transitionClicked(\"A*^*sm*^*e1*^*s1*^*s2*^*\")" ] ;
  
  start_A_smS2 -> A_smS2_s2a [  tooltip = "start to s2.s2a", URL="javascript:Action.transitionClicked(\"null\")" ] ;
    A_smS2_s2b -> A_smS2_s2a [  label = "e3", tooltip = "From s2.s2b to s2.s2a on e3", URL="javascript:Action.transitionClicked(\"A*^*sm*^*e3*^*s2.s2b*^*s2.s2a*^*\")" ] ;
  
  A_sm_s1 -> A_smS2_s2b [  label = "e2", tooltip = "From s1 to s2.s2b on e2", URL="javascript:Action.transitionClicked(\"A*^*sm*^*e2*^*s1*^*s2.s2b*^*\")" ] ;
  
  A_smS2_s2a -> A_smS2_s2b [  label = "e3", tooltip = "From s2.s2a to s2.s2b on e3", URL="javascript:Action.transitionClicked(\"A*^*sm*^*e3*^*s2.s2a*^*s2.s2b*^*\")" ] ;
  

}
