google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Auto-transition support for multiple do activities #657

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  class Test{
    sm{
      start{
        do { 
          Thread.sleep(200);
          System.out.println("Activity 1");
        }
        do { System.out.println("Activity 2"); } -> end;
      }
      end{}
    }
  }

What is the expected output? What do you see instead?
In this example we expect all do activities to end before triggering the auto 
transition.
Instead, the transition is taken too soon and interrupts all other do 
activities.

The case with multiple transitions should also be considered but is related to 
Issue 524.

Original issue reported on code.google.com by ac.ring...@gmail.com on 27 Nov 2014 at 5:15

GoogleCodeExporter commented 9 years ago
These cases should also be considered.  

  class Test{
    sm{
      start{
        do { 
          Thread.sleep(200);
          System.out.println("Activity 1"); -> s1;
        }
        do { System.out.println("Activity 2"); } -> s2;
      }
      s1{}
      s2{}
    }
  }

  class Test{
    sm{
      start{
        -> s1;
        -> end;
      }
      s1{}
      end{}
    }
  }

These cases should raise a warning. Compilation will continue but the second 
transition will be ignored. 
This changes have been made in r4821

Original comment by ac.ring...@gmail.com on 2 Dec 2014 at 9:05