Please, tell me the things I must use for modeling an (Enterprise Architect) activity diagram of

object1.method1() calls object2.method2()

I'm able to dragndrop a method of a class from model tree-view to my diagram, and it appears as new action there. But there is no hint about its belonging object. Also I don't get it which arrow type I must use to model that one calls the other.

My feeling is it's not very appropriate for constructing documentation of typical call scenarios of my application. You know I want to create UML docs for what we've programmed until now.

  • What tool are you using? Jun 13, 2013 at 15:32
  • Sparx Enterprise Architect
    – user93623
    Jun 13, 2013 at 18:44

1 Answer 1


Activity diagrams don't use the concept of objects, as they usually don't show who does what, but only which actions/decisions are taken. You could use partitions (also called swim lanes) to indicate who executes the actions, but if you have more than two or three objects interacting, this can become rather unreadable.

For describing the interactions between several objects, it will be better to use a sequence diagram or a communication diagram (sometimes referred to by its old name of collaboration diagram).

  • I don't get it why an activity diagram has such limitation. I dislike sequence diagrams a bit because I don't want to be limited to 1D and to show the time is not important to me there.
    – user93623
    Jun 13, 2013 at 18:52
  • @falkb: you have to put a lot of effort in to let a sequence diagram show time information, but if you prefer, you can also use a communication diagram. Jun 14, 2013 at 9:16
  • @falkb: The limitation on activity diagrams comes from the purpose for which they are meant to be used. They were meant to show procedural information, business processes and work flow and are somewhat comparable to flowcharts. None of this needs the concept of an object as it is used in OOP. Jun 14, 2013 at 9:19
  • but one can also chain processes and flow to entities doing that and that is missing there. It's somehow limited to the special case "global scope", and that's why not sufficient to model OOP. You know activity comes always out of something.
    – user93623
    Jun 14, 2013 at 9:38
  • 1
    @falkb: In a communication diagram, you are supposed to be able to note down the method calls next to the lines connecting the objects (together with an arrow indicating the direction of the call and a sequence number). I'm not familiar with the tool you use, so I can't tell how to add that information to the diagram. Jun 14, 2013 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy