Book a Demo

Author Topic: Activity Diagrams  (Read 6741 times)

mazumdi

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Geek Speak
    • View Profile
Activity Diagrams
« on: February 07, 2008, 09:45:06 pm »
I have just downloaded the trial version of EA because it supports UML 2 and I am trying to create activity diagrams.
I have some questions.

1) How do I add input and output pins to an action? I want it to look like a little box attached to the action and I want to put a description on the pin
2) I have entered Pre and Post conditions to an activity and I want to make these conditions visible when viewing the diagram. Something like this <<precondition - appt open>> <<post condition - appt closed>> at the top of the activity element.
3) I would like to place the partition element within the activity element, instead of the other way around. How do I bring the partition element to the front so it displays within the activity element?
Dee

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Activity Diagrams
« Reply #1 on: February 08, 2008, 12:37:09 am »
Quote from: mazumdi

1) How do I add input and output pins to an action? I want it to look like a little box attached to the action and I want to put a description on the pin


If you connect it with another action/activity, whatever you can do it as an ObjectFlow which in turn will give you the required object pins.

Quote

2) I have entered Pre and Post conditions to an activity and I want to make these conditions visible when viewing the diagram. Something like this <<precondition - appt open>> <<post condition - appt closed>> at the top of the activity element.


You can add constraints to your action/activity from the properties dialog however those will not show up in the diagrams. Constraints for links between objects however will.

Quote
3) I would like to place the partition element within the activity element, instead of the other way around. How do I bring the partition element to the front so it displays within the activity element?



The only reason for this imho is to have a composite element  which shows inner activities so I suggest to use a structured activity instead of a normal one.
However playing with the Z-Order from the context menu will help you any further here.

Oliver
« Last Edit: February 08, 2008, 12:37:57 am by ofels »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Activity Diagrams
« Reply #2 on: February 08, 2008, 04:07:44 am »
Quote
...
You can add constraints to your action/activity from the properties dialog however those will not show up in the diagrams...

Actually, you can get these to show up, but there's a catch. You have to use the "rectangle notation" that UML provides for as an alternate.

Right-click on an Activity with constrains and from the context menu choose Advanced | Use Rectangle Notation. The Activity will become a rectangle, with an activity glyph in the upper right corner. This gets you halfway there. You now right click again, and choose Feature Visibility, or you can use the control-shift-Y shortcut. Click on the compartments you need, in this case Constraints. When you exit the dialog you'll see your constraints. [Note that unless you name them accordingly you won't get a visual cue to their type.]

HTH, David

PS: I'd really like some mechanism to do this without resorting to the (dreaded) rectangle notation. Perhaps you'd like to start the feature request (he hints).
No, you can't have it!

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Activity Diagrams
« Reply #3 on: February 08, 2008, 04:37:17 am »
Quote
Actually, you can get these to show up, but there's a catch. You have to use the "rectangle notation" that UML provides for as an alternate.

Or make an empty Note associated with your activity, right-click on the connector (famous UI) pick Link this Note to an Element Feature and pick constraints.
Jan 'Bary' Glas

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Activity Diagrams
« Reply #4 on: February 08, 2008, 06:04:45 am »
Yes, that's probably a better solution for most people.
No, you can't have it!

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Activity Diagrams
« Reply #5 on: February 08, 2008, 07:27:30 am »
Quote
Or make an empty Note associated with your activity, right-click on the connector (famous UI) pick Link this Note to an Element Feature and pick constraints.


/me just learned a new and totally useful feature...
Thanks for pointing that out...

Oliver

Oliver F.

  • EA User
  • **
  • Posts: 573
  • Karma: +2/-1
  • Aren´t we all in the model business ?
    • View Profile
    • Karl Storz homepage
Re: Activity Diagrams
« Reply #6 on: February 08, 2008, 07:36:48 am »
Quote
3) I would like to place the partition element within the activity element, instead of the other way around. How do I bring the partition element to the front so it displays within the activity element?


Just as an update: I noticed (at least in the 7.1 beta) that using "Advanced->Partition Activity" from the context menu  might let you do what you want.

Don´t know whether this has been in place in older versions.

Oliver
« Last Edit: February 08, 2008, 07:37:01 am by ofels »

mazumdi

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Geek Speak
    • View Profile
Re: Activity Diagrams
« Reply #7 on: February 10, 2008, 01:53:07 pm »
Many thanks for your suggestions. I will try them out.
Dee

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Activity Diagrams
« Reply #8 on: February 11, 2008, 03:31:54 am »
If you just want a single pre-condition and/or single post-condition, then right click the activity and select Advanced->Custom Properties...

There you will find a Pre-condition, and Post-condition property. Complete and now the Activity will render the pre and post conditions with the sterotype/keywords as per OMG specification. The title of the Activity now moves to the left of the Activity.

For multiple conditions use boolean operators and or

Models are great!
Correct models are even greater!

mazumdi

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • Geek Speak
    • View Profile
Re: Activity Diagrams
« Reply #9 on: February 11, 2008, 02:19:20 pm »
I have tried advanced/custom properties for rendering pre and post conditions as suggested and it has worked.

Previously, I used a really buggy tool where I spent more time battling the tool than on anything else.
EA is not like that, thanks once again for all your help, its got me on my way.

Dee
Dee

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Activity Diagrams
« Reply #10 on: February 12, 2008, 06:06:02 am »
Good stuff Dee,

I'm happy that you are unstuck. That's the main thing, at least for now.

Still, EA has its own foibles. Search for the EAUI keyword in the forum and you'll see some of what I'm talking about. [I'll leave you to find the definition.]

For that reason, please participate. When you do find something that is incorrect, report the bug, and let us know in the (new) Bugs and Issues section of the forum. [Actually, do it the other way around. Search my posts over the past couple of months for a best practice we use.]

If you have suggestions for improving EA, let us know in the Suggestions and Requests section. And let Sparx know by making a feature request. [We use a similar best practice, so once again, please search.]

All the best,
David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Activity Diagrams
« Reply #11 on: February 12, 2008, 04:28:45 pm »
Quote
I have tried advanced/custom properties for rendering pre and post conditions as suggested and it has worked.

Previously, I used a really buggy tool where I spent more time battling the tool than on anything else.
EA is not like that, thanks once again for all your help, its got me on my way.

Dee
You just haven't used EA enough... :)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!