Book a Demo

Author Topic: Associate a class operation to an activity diagram  (Read 4315 times)

Andreea

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Associate a class operation to an activity diagram
« on: October 22, 2009, 12:46:59 am »
Hi,

I would like to associate a class operation/method to an activity diagram that models the behavior of that operation/method.

I saw that EA has support for associating an action from an activity diagram to a call operation (Call Operation Actions) but I couldn't find how to make the association backwards: from class operations to activity diagrams.

Do you have any suggestions on how to do this?

Thanks in advance!
Andreea

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Associate a class operation to an activity dia
« Reply #1 on: October 22, 2009, 01:03:07 am »
If I'm not mistaken I've logged a bug report or change request a while ago to have the (defined in UML) relation between an operation and a behavior.
In the meantime you can work like we do, add a tagged value with a RefGUID. Limit the type to an Activity (or whatever you allow as behavior of an operation).
This works pretty good.

Geert

Andreea

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Associate a class operation to an activity dia
« Reply #2 on: October 23, 2009, 07:30:28 pm »
Thanks for the ideea. It works. :)

It would have been great though if the tagged values were visible from the operations window. To be able to see the tagged values one has to select an operation from the operations window or from the class element in the diagram and then open another window with the tagged values.

Best Regards,
Andreea

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Associate a class operation to an activity dia
« Reply #3 on: October 23, 2009, 07:37:36 pm »
Andrea,

There are currently two ways to see the tagged values.
You can open the dedicated tagged values window (and dock it) via "View/Tagged Values", or you can see them in the tab "Tagged values" of the properties dialog.

When I think about it I think I made the wrong suggestion to you.
In the UML metamodel an operation (behavioral feature) can be related to 0..* behaviors (such as an Activity).
So it would be a better idea if you add a tagged value to the Activity and fill in the operation it implements iso the other way around.

Geert

Andreea

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Associate a class operation to an activity dia
« Reply #4 on: October 23, 2009, 07:54:29 pm »
Indeed I had to associate an operation with two behaviors (aka activities). So I added two tagged values for the same operation.

This may not be the best aproach but when I look at the tagged values of an operation I can quickly see all the behaviors it implements.

With your latest suggestion, I find it harder to find out all the behaviors implemented by a call operation.  Probably the EAP search can help me search all the elements having a certain tagged value.

Andreea
« Last Edit: October 23, 2009, 07:54:56 pm by andreea »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Associate a class operation to an activity dia
« Reply #5 on: October 23, 2009, 08:03:42 pm »
Yes, you could use the Search, or you could write an addin to easely navigate between elements like I did.
Such an addin greatly improves the usability of a model.
I found that being able to quickly nagivate between different parts (operation -> implementation, implementation -> operation) is a very important element to be able to work on, and understand a model.

Geert

bioform

  • EA User
  • **
  • Posts: 230
  • Karma: +0/-0
  • Forty-Two?
    • View Profile
Re: Associate a class operation to an activity dia
« Reply #6 on: October 24, 2009, 05:28:51 am »
Quote
Yes, you could use the Search, or you could write an addin to easely navigate between elements like I did...Such an addin greatly improves the usability of a model.

Geert

Yes it would. Would you be willing to post an explanation of your add-in design/approach? I'm sure a lot of us would be interested.

BTW I will be opening up one of my blogspots soon (I hope) to use to share add-ins/code/approaches to useful add-ins to EA.

As everyone I am a bit swamped with work and struggling with the Rational suite... grrr (don't ask what I would have done with the seat license cost....)

David
Time is what keeps everything from happening at once, Space is what keeps it all from happening to you. <unknown>

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Associate a class operation to an activity dia
« Reply #7 on: November 10, 2009, 09:35:00 pm »
Hi,

It took a while, but I finally got my thoughts about Modelling Methods, Modelling Quality and Modelling Tooling together and written down.

Comments, insults, etc... are very welcome.

Geert