Book a Demo

Author Topic: Activity Diagram:  Paste from Project Browser  (Read 15049 times)

MissKu

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Activity Diagram:  Paste from Project Browser
« on: August 01, 2012, 09:30:10 pm »
I have been surfing through your site and Internet looking for best practices of creating Activity Diagrams.
 
To create a diagram we create a reference to swimline on the diagram and create a reference to all tasks (Activities) that are needed on this diagram.
We use the Past from Project Browser functionality (http://www.sparxsystems.com/uml_tool_guide/modeling/pastingfromthetree.htm). Paste as an instance of the element.
 
Could you please explain which is the right approach Paste the element as a simple link or Paste as an instance of the element? In what cases you recommend each of them?

Any references to informational resource or document that could explain this approach and provides other Best Practices are highly appreciated.
 
Thank you,
 
Eugenia

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Activity Diagram:  Paste from Project Browser
« Reply #1 on: August 01, 2012, 11:21:09 pm »
Pasting as instance will create a new instance of the dragged element. You can see that appear in the project browser near the diagram. A simple link will place the very element on the diagram.

When working with activities I suggest to use simple links. Whereas in sequence diagrams you should always use instances.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Activity Diagram:  Paste from Project Browser
« Reply #2 on: August 02, 2012, 04:09:36 pm »
Eugenia,

In the case of Activities there's a special thing.
Since there is no such thing as an instance of an Activity EA will create an action that call the activity instead.

One of my best practices is to never use Activities on Activity diagram. I think they should only be used as the owner of the Activity Diagram, but on Activity diagrams you should only show Actions.

This is similar to State Machines and State Diagrams, and Interactions and Sequence diagrams.

So in this case I would select "Past as an instance".

Geert

MissKu

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Activity Diagram:  Paste from Project Browser
« Reply #3 on: August 02, 2012, 06:46:50 pm »
Hello, thank you for the answers! I also lean toward the idea of using instances as this allows multiple reusing of Actions on the same diagram.
There is a disadvantage of using instances - one can not navigate to the Diagram under this Action (or Activity) if any. This is available only in simple link mode.

In our Model we have several layers: Scenarios are built from Actions and Use Cases (represented as Activities), Use Cases in it's turn are built from Actions and Integration Use Cases (represented as Activities).

So, if i want to support there and back navigation through the diagrams, shall i still use simple links?

Thank you and sorry for this messy explanation,
Eugenia

Paulus

  • EA User
  • **
  • Posts: 152
  • Karma: +0/-0
    • View Profile
Re: Activity Diagram:  Paste from Project Browser
« Reply #4 on: August 03, 2012, 12:14:01 am »
I've faced this very problem some time ago when trying to 'integrate' use cases in the workflow. Essentially what i did was to always use actions in activity diagrams, these being either 'atomic' (ie, no subflow), or instances of activities. I use an activity as the container of an activity diagram.

Btw a drawback of using actions iso activities: the extra layer of indirection makes it more difficult to determine relationships between use cases or between a use case and domain objects, etc. Then again if you're able to write script and know SQL this doesn't have to be a problem.


Quote
There is a disadvantage of using instances - one can not navigate to the Diagram under this Action (or Activity) if any. This is available only in simple link mode.

Maybe i misunderstand but if an activity is composite then you can navigate to the composite diagram from instances. Just what you need to navigate the workflow!