UML Course

break fragment

Go back

You can use the fragment "break", to interrupt the execution of the block, or the program if this is the last block.

This fragment

  • is taking a guard (like for alt/opt)
  • and if the condition inside the guard is true
  • then the method, and the block, is interrupted.