Book a Demo

Author Topic: Activity implemented in a component  (Read 18201 times)

Tim Twe

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Activity implemented in a component
« on: May 26, 2010, 11:09:17 pm »
Hi,

If I have an activity diagram showing a number of activities, you will find certain activities are implemented inside a component.  How do I represent that particular activity in the model?

I would typically create an activity diagram with swim lanes to show where the activities are manifested.

Advice?I have figured out how to create a component diagram reflect the dependencies expressed in a sequence diagram and now I want to do the same for Activity diagrams.

An Activity diagram alone shows the steps necessary to implement a process however from an EA perspective, assigning the activities to specific components through swimlanes or tracability allows more a accurate understanding of the system.

Paul Lotz

  • EA User
  • **
  • Posts: 248
  • Karma: +1/-0
    • View Profile
Re: Activity implemented in a component
« Reply #1 on: May 27, 2010, 03:17:24 am »
Hi!  I am not sure what you are asking, actually.  Yes, you can use swimlanes in an activity diagram, just as you describe, and that is indeed a good idea, but it sounds like you already know that.  Can you clarify what it is you additionally want to know?

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 implemented in a component
« Reply #2 on: May 27, 2010, 05:38:29 pm »
Hmm, the relation between activities/actions and the swimlanes is weak to say the least. I don't think that is the best way to express the relation between the activity/action and the component that realises it.


Geert

Tim Twe

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: Activity implemented in a component
« Reply #3 on: May 27, 2010, 06:27:17 pm »
Hi Geert,

You have expressed exactly what I am after.

I am trying to do the following:



Without any form of link between the activity flow I would be forced to do the following to express the relationship:



PS. Is there a better way to do this? I have a bad feeling putting components on an activity diagram.  Also, I have problems understanding the semantics of trace because it seems too general to me.  Can I use <<trace>> in this example?  The most appropriate type would be <<realise>> however in EA i cannot create a realise connector, I would have to create a trace/dependency connector and then change the stereotype to <<realise>> which does not exist in the predefined list.  Comments?




One disadvantage of strongly associating the swim-lanes to the component is that you are forcing a specific implementation.  In my following example I show how an activity diagram may have two solutions. I show 2 "Legacy" components and I show the 2 newer "Components".  See how Activity2 is implemented by different components, i.e. there is not a 1-1 mapping in functionality between "Legacy" and "Components".




In closing, what is the best way to capture the facts that a particular activity is realised in a specific component?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Activity implemented in a component
« Reply #4 on: May 27, 2010, 07:54:56 pm »
Hi Tim,

The good news ias that while the QuickLinker doesn't support Realize between a component and an activity, EA will allow you to draw it (even with Strict UML syntax enabled).  Just select the Realize from the tool bar and connect them.

As to the notion of swimlanes; it's my view that a swimlane should be a rendering of an element rather than a separate element - like the compartmental (rectangular) form of many UML shapes (or the actor shape - which again, in my view should be just a rendering)

If, in your view, the component realizes the activity - depict it appropriately!   It's your model!

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

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 implemented in a component
« Reply #5 on: May 28, 2010, 01:15:39 am »
Realize or trace, both are acceptable notations IMHO.

What strikes me as odd is that you have activities on your activity diagram.
Normally an Activity should only be the parent of an activity diagram, and the diagram itself should contain only actions (of type CallBehavior or something like that if that action executes an Activity).

Geert


Tim Twe

  • EA User
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: Activity implemented in a component
« Reply #6 on: May 28, 2010, 08:24:42 pm »
Hi,

What do you mean by "a swimlane should be a rendering of an element rather than a separate element".

In my diagrams i show both the swim-lane linked to an element (type 1) AND the elements on the diagram with trace associations from the element to the activity/actions (type 2).  I believe you are referring to type 1 by your comment?

I am in agreement.  My original desire was to have the swimlane be strongly linked to activities/actions associated with the swimlane.

My second concern (my last diagram) was that sometimes, when introducing a legacy system you are re-map existing processes to a new set of components and therefore the activity may have tracability to two different solutions.

This makes me concerned about consistency because, as Geert correctly pointed out, I had used an uncommon/incorrect modeling of an activity diagram using activities instead of actions.  While I am confident that I could model the way I want to, I believe I would then be the only person to understand the model.  Having many professionals diagram a system with  the same consistent patterns and semantics has its benefits in communication.

Back to my original question, is it better then to model activity diagrams and associate the actions with <<trace>> or realise relationships? Or is it better to advocate that Sparx should strongly link swimlanes to actions?  I am now of the opinion that <<trace>> and <<realise>> are better notation even though Swimlanes are less work.  Potentially there should be a diagram with options to strongly link vs weakly link because it is not common to show tracability for multiple solutions on a single diagram, as in my example.

Thoughts?

Do you trace your actions to components?  Is it considered common practice? or is it considered best practice but has not been adopted?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Activity implemented in a component
« Reply #7 on: May 28, 2010, 09:08:33 pm »
Quote
What do you mean by "a swimlane should be a rendering of an element rather than a separate element".
[size=18]...[/size]
The UML 2.2 Superstructure (formal) Specification describes Partitions as:

Description
Partitions divide the nodes and edges to constrain and show a view of the contained nodes. Partitions can share contents.
They often correspond to organizational units in a business model. They may be used to allocate characteristics or
resources among the nodes of an activity.


Later on it talks about partitions representing...

The key word here is correspond.  If the partition corresponds or represents; then, if possible, it should BE...  That is, you can consider the partition (if representing a classifier or instance) as a rendering of the thing.  It's just another way of showing the thing in a particular way.  In a similar way, if an element is behaving as an actor, you should be able to render it as an actor.

It's about consistency.  If the partition is just a rendering, you can view the properties and get the properties of the element, not just of the rendering.

EA doesn't take that view, it makes Actors and Partitions / Swimlanes different elements from the elements they represent so you have to maintain the linkages back to the source elements yourself.

This can create consistency issues...

HTH,
Paolo
« Last Edit: May 28, 2010, 09:09:13 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

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 implemented in a component
« Reply #8 on: May 28, 2010, 09:15:31 pm »
Paolo,

I just saw yesterday that UML 2.3 was released.
Thought you might be interested to know.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Activity implemented in a component
« Reply #9 on: May 28, 2010, 10:26:04 pm »
Quote
Paolo,

I just saw yesterday that UML 2.3 was released.
Thought you might be interested to know.

Geert
Thanks!

I was just thinking about that when I was posting above...

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