Search code examples
umlsequence-diagram

How to represent a self call function which calls other object/entity in a sequence diagram?


I have created a sequence diagram and one of the objects will do a self function and inside of the function it will call the other class object function. How do i represent this correctly in a sequence diagram? My current diagram show it this way for now but i don't think its the right way to show it. enter image description here


Solution

  • The self-call can be represented with an overlapping execution specification (rectangle). This allows to distinguish the call from the execution of the called function, and to visualize with accuracy what happens in the self-call, and what happens after the self-call returns:

    enter image description here