Book a Demo

Author Topic: Methods in methods  (Read 3040 times)

dave2

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Methods in methods
« on: February 14, 2011, 06:31:14 pm »
Hi,

I have a method (ClearState()), which calls two other methods:
ClearSession()
ClearView()

Alas, the following Sequence Diagram pic (my first attempt) does not really depict what is going on -



Is there a way in EA to depict those two methods being called inside the ClearState method in a Sequence Diagram.?

Cheers

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Methods in methods
« Reply #1 on: February 14, 2011, 08:03:57 pm »
Dave,

I usually only make one sequence diagram per operation.
In that case it is obvious.

Geert

dave2

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Methods in methods
« Reply #2 on: February 15, 2011, 12:34:45 pm »
Thanks Geert.

It's a pity I can't do it in the one diagram. A diagram for every method is going to get messy.

Thanks Again.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Methods in methods
« Reply #3 on: February 15, 2011, 06:23:34 pm »
Dave,

You could put it all in one sequence diagram, but what are you going to to when another operation calls ClearSession()? Document the behavior of ClearSession() a second time?

I think the one operation => one sequence diagram rule is a really good best practice that I can only recommend to follow.

Geert

dave2

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Methods in methods
« Reply #4 on: February 21, 2011, 03:50:57 pm »
Hi Again,

A follow up question on my previous one:

If you diagram each method separately, how do you reference one diagram from another?

I would need to do this to show that ClearSession and ClearView are being called from the ClearState method.

Cheers

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Methods in methods
« Reply #5 on: February 21, 2011, 07:22:50 pm »
Dave,

You can use the EA Navigator add-in to navigate between your operations, and the diagrams they are used on.

- EA Navigator on the Sparx community site
- EA Navigator MSI install package
- Enterprise Architect Toolpack homepage of which the EA Navigator is currently the only tool in the pack ;)

Geert

dave2

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Methods in methods
« Reply #6 on: February 22, 2011, 12:28:05 pm »
Thanks for taking the time to help me Geert. It is much appreciated.