Design – How to construct UML activity diagram reflecting real programmed source code as docs

activitydesignmodelingreverse-engineeringuml

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.

Best Answer

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).

Related Topic