Author Topic: Newbie questions: Activity diagram  (Read 1303 times)

stereotype

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Newbie questions: Activity diagram
« on: June 05, 2008, 03:25:30 am »
Hope you donīt mind these rather basic UML/EA-questions:

First question:
Suppose you create an activity 'Make breakfast', make it composite, and then define a few "sub-activities", e.g. 'Slice bread', 'Get butter', 'Make coffee' etc.

Then you create another activity 'Bake a cake', make it composite too, and define its sub-activities. Doing so, you realize that you want to use one of the previously created sub-activities ('Get butter'). But that activity "belongs to" 'Make breakfast'?! How should I handle this situation in EA?

Second question:
After creating a lot of activities, I decide that I actually want 'Make breakfast' and 'Bake a cake' to become sub-activities of a new structured activity 'Xyz'. How do I achieve that in EA?

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Newbie questions: Activity diagram
« Reply #1 on: June 05, 2008, 03:35:26 am »
There may be other or better ways, but here's what I would do:

1. In the project browser drag "Get butter" one level up. If in diagrams it is shown inside a "Make breakfast" symbol, drag it out of it too.

2. In the project browser drag "Make breakfast" and "Bake a cake" under the Xyz activity. If you want to show it in the Xyz diagram, drag Xyz into it, make it big enough to hold all subactivities, and drag them into the Xyz symbol.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2731
  • Karma: +46/-3
    • View Profile
Re: Newbie questions: Activity diagram
« Reply #2 on: June 05, 2008, 08:58:03 am »
If you want to reuse an activity, I'd suggest using CallBehaviorActions. Drop an Action onto your activity diagram and when prompted for action kind set the "CallBehavior" radio button. On pressing OK you will then be prompted to "Set Behavior" - choose your activity from the list. Repeat for everywhere the activity is reused.
The Sparx Team
support@sparxsystems.com