Book a Demo

Author Topic: Adding an activity diagram to a class' operation  (Read 4339 times)

Stefan Lang

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Adding an activity diagram to a class' operation
« on: December 05, 2011, 08:50:31 pm »
Hi everybody,

is there a way to add an activity diagram to an operation (of a class)?

What I want to do, is the following: After creating a new class, I added an operation, for example Abc_Init(). It is then shown in my class diagram (which is embedded in a "CompositeStructure" diagram). Now I like to add/create an activity diagram to that function, which I can simply call e.g. by double-clicking the "Abc_Init()" entry in the class.

How does this work? Is there a comfortable way? Thanks for your help.

Best regards,

Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding an activity diagram to a class' operati
« Reply #1 on: December 05, 2011, 09:35:37 pm »
Stefan,

What you need to do is to put your activity diagram under an Activity element.
Then in the behavior part of your operation click on the Element button to link the activity with your operation.

You can use my EA Navigator add-in to easily open the activity diagram starting at the operation.

Geert

Stefan Lang

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Adding an activity diagram to a class' operati
« Reply #2 on: December 05, 2011, 11:11:44 pm »
Thanks, Geert.

Your plugin works properly. But is there a possibility to "link" the double-click-event on the operation directly to the activity diagram, instead of the property dialogue? Can a plugin handle this?

Thanks again. BR,

Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding an activity diagram to a class' operati
« Reply #3 on: December 06, 2011, 12:33:47 am »
In theory there is the event EA_OnContextItemDoubleClicked that you should be able to use to hook into.
If you return True then EA should stop processing the doubleclick.
But I've never used that event before.

Geert

Stefan Lang

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Adding an activity diagram to a class' operati
« Reply #4 on: December 06, 2011, 12:43:39 am »
OK, maybe if there is some free time I'm going to have a look at it. But so far, your plugin is a big step in the right direction.

Best regards, Stefan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding an activity diagram to a class' operati
« Reply #5 on: December 06, 2011, 01:05:31 am »
Hi, I'm glad you like it.
It's fully open source, so you should be able to easily add your own functions to it.

Geert