After the sequence diagram are made the sequence methods become code, before writing some code that would alter database records I would like to know how to detect if a sequence is doing the job without damaging some other part's of the system, what comes to my mind is that there must be a way to relate the sequences to something so that it would be easy to analyze by having a high-level document to keep track of.

  • 1
    Sequence diagrams are just planning tools, unless you intend to build some sort of code generator that creates software based on the diagrams. Diagrams do not guarantee system integrity; well-written, tested and documented code does that. May 2, 2019 at 23:39
  • 1
    In any case, to help maintain this kind of system integrity, design the software in such a way that each of its modules communicates with each other only through strict, well-defined boundaries. Then you won't have to worry about one part of the system damaging another part, because each part is responsible for its own business. See en.wikipedia.org/wiki/Application_programming_interface for more information. May 2, 2019 at 23:43
  • Sure, sequence diagrams do not guarantee system integrity, but they do give a point of reference to analyze before the implementation phase, thanks for the boundaries suggestion @RobertHarvey May 2, 2019 at 23:51

1 Answer 1


I would recommend drawing a class diagram or a component diagram showing the classes of objects that participate in your sequence diagrams.

  • The messages in your sequence diagrams should match the operations defined on the classes.
  • The relationships among the classes should reflect which classes interact with which other classes. For example, if method X of class A calls method Y of class B, then you could draw a dependency arrow from A to B in the class diagram.

If you have complex interactions and you want to divide such a complex interaction over multiple sequence diagrams, you could use an interaction overview diagram. This resembles an activity diagram, where each action is a (reference to a) sequence diagram or other kind of interaction diagram. The following image is copied from the UML 2.5 specification.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.