Book a Demo

Author Topic: How do I model calls made in an iteration?  (Read 11908 times)

David M. Karr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
How do I model calls made in an iteration?
« on: December 07, 2011, 06:05:01 am »
Using EA 8.

I've previously only created class diagrams in EA.  I'm now working on some sequence diagrams, and there are some simple things I want to model that I can't figure out how to do in EA.

I have a class "Foo" that has a method "do" that calls a method "getit" in another class "Bar". The "getit()" method is called in a loop while iterating through a collection of "Bar" objects.

It's more complicated than this (each loop iteration actually spawns a TaskExecutor task to make the "getit" call), but I think this is enough detail to model.

It's easy enough to add a "getit" message from "Foo" to "Bar", but that's not enough.

I tried a "self-message" and gave it an ad hoc label saying that it's iterating through a list.  However, when I tried to add a "message" from that indented block to "Bar", it just added the new message line BELOW the indented block, making it seem like the new message comes after the iteration is done.

David M. Karr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: How do I model calls made in an iteration?
« Reply #1 on: December 07, 2011, 11:36:29 am »
I guess I've figured this out. Examples I found on the web show using a "fragment" with a "loop" label.  I also added another fragment inside that with a "par" label (standard for parallel execution).

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I model calls made in an iteration?
« Reply #2 on: December 07, 2011, 05:51:23 pm »
Yep, that sounds about right.

Geert