Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: bullet on January 25, 2007, 08:13:28 am

Title: Re-use of swimlanes
Post by: bullet on January 25, 2007, 08:13:28 am
any help on how to re-use already defined swimlanes from one diagram to the other?
Couldn't find any topic in the forum nor on the cfm
Title: Re: Re-use of swimlanes
Post by: Jan ´Bary´ Glas on January 26, 2007, 12:55:44 am
Swimlanes are not re-usable, but UML 2.0 presents partitions - these may help you. In UML words ActivityPartition is a NamedElement. And is reusable. In EA words is in repository.
Title: Re: Re-use of swimlanes
Post by: bioform on January 30, 2007, 11:29:10 am
If you WANT to re-use the swimlane from another diagram (e.g., say the activity diagram for a UC has a swimlane that corresponds to the UC's Loan Officer), just select that object from the Project Browser and drag it onto the new diagram (then select the option to LINK.)  That way if you "rename" the original swimlane, the change will propgate through your other diagrams... I do this for activities, actions, etc.

Say UC A ends with an action that would start UC B, then the last activity/action from UC A, I copy and past as a link to be the START of UC B...
Title: Re: Re-use of swimlanes
Post by: bullet on February 01, 2007, 01:51:24 am
Thnx for the hints.
Don't use a db yet. I am having a hard time understanding where the swimlanes are in model or .eap in order to drag 'em
Title: Re: Re-use of swimlanes
Post by: bioform on February 02, 2007, 01:34:58 am
The swimlanes are located as objects UNDERNEATH the activity diagram in the "Project" tab ((displayed in a heriachy".

The project tab is usually visible to the right of the diagram windows. Find the activity diagram, then you should see the "swimlanes" located as "children" of the diagram, also the activities, actions, decisions, etc. are also located there...

So IF you wanted to "share/re-use" the swimlane... either from the first activity diagram, click the swimlane to select it, then Ctrl-C to copy it to the clipboard. Then click the background of the second diagram, and using the menu selection Edit|Paste Elements|as Link (or just press Shift+Insert) and they will appear on the diagram (linked to the original object)

Once you have done, that go back to the first diagram, rename the swimlane, check the second diagram and you should see that the swimlane name changed automatically...

Hope that helps...
Title: Re: Re-use of swimlanes
Post by: bullet on February 02, 2007, 01:49:30 am
thnx. It seems to me, that it must be a display issue since I do NOT see the swimlanes as "childs" in the project browser. Any thoughts?
Title: Re: Re-use of swimlanes
Post by: bioform on February 02, 2007, 01:53:49 am
I believe they are located underneath the object that you created the activity diagram for (if you used the object's context menu) or in the package that you created the diagram in...
Title: Re: Re-use of swimlanes
Post by: bioform on February 02, 2007, 01:55:04 am
Another way to find them, is just click the swimlane, then Alt-G, and it will highlite the item in the project tab heirarchy!
Title: Re: Re-use of swimlanes
Post by: bullet on February 02, 2007, 01:59:45 am
 ???
nope, doesn't show. I tried to search for the objects in the proj. browser, too, without any luck.
I am pretty sure to have a display setting, that is not check or so, but can't find it, yet. (no luck via the 'view' settings and richt click
???

I would 've expected this in -> diagram -> configure swimlane  :-/
Title: Re: Re-use of swimlanes
Post by: Graham_Moir on February 02, 2007, 04:41:05 am
I think the issue here is that you're using swimlanes which are effectively attributes of the diagram itself (configure swimlanes appears on the diagram menu), rather than the partitions which have been mentioned which are elements on the diagram and so appear in the project browser and have their own element menu.
Title: Re: Re-use of swimlanes
Post by: Paolo F Cantoni on February 02, 2007, 04:57:21 am
I think Graham has hit the nail on the head.  Swimlanes are UML 1.x constructs and EA implemented them in a certain way - such that they are nested within a non-UML construct (the Diagram).

Partitions, on the other hand, are UML 2.x constructs and as Graham says are first-class (named) elements in their own right.

HTH,
Paolo
Title: Re: Re-use of swimlanes
Post by: bullet on February 02, 2007, 05:43:11 am
 :-X

BIIIIG tomatoes on my eyes!
Now the penny has dropped, finally. Thnx.

Hopefully that post will help other, who might be as blind as I was, freshly hitting EA.

cheers
Title: Re: Re-use of swimlanes
Post by: bioform on February 02, 2007, 07:58:58 am
I checked with my model, and my "swimlanes" are in fact partitions (thus the reason they exist as their own objects), but when I create one... they are in fact placed under the object that the activity diagram is associated with (in my case a Use Case.)

Another one of the advantages of "re-using" a partition would be the ability to "list" all of the activities or actions associated with it. So if my UC activity diagram includes partitions that represent two actors (say a contributor & a editior), and these partitions are linked across several use cases, you would then be able to list the actions and activities that a contributor participates in and those that a editor does.

This seems to me to be VERY VERY helpful in the generation of both training material, operational docuements, etc. As a BIG part of my effort is toward generation of system documentation from the model (Sys Req Spec, External Sys Interface Spec, High-level Design Documents, Test Plans, etc. THIS IS VERY POWERFUL... Take the time to model well upstream during req. engineering effort, and reap the benefits downstream in Design, Test, Training, & Deployment/Operations documentation...
=========================================================
How do you create "Swimlanes" as part of a diagram? NOT that I want to... but trying to understand HOW the problem was created in the first place?
Title: Re: Re-use of swimlanes
Post by: «Midnight» on February 02, 2007, 08:55:58 am
Right-click on the diagram and choose Configure Swimlanes.
Title: Re-use of swimlanes (Partitions)
Post by: bioform on February 02, 2007, 09:14:19 am
Just a question about organizing my partitions...

I have a use case model view, that contains an Actor Package, which a diagram that displays my Actor relationships (generalizations). Since for my UC activity diagrams, they contain one or more human actors, I have placed the corresponding partion under the actor (owns) and created an association...

Questions:
1.) Anything "syntactically" incorrect in this?
2.) SHOULD I create the association between the partition and the corresponding actor? (I believe it would be helpful to achieve some of what I posted earlier) And what should the assoication type be? Trace, Dependency, or?

Thanks ahead of time for your thoughts and comments...
Title: Re: Re-use of swimlanes (Partitions)
Post by: KP on February 04, 2007, 01:39:42 pm
Quote
2.) SHOULD I create the association between the partition and the corresponding actor? (I believe it would be helpful to achieve some of what I posted earlier) And what should the assoication type be? Trace, Dependency, or?

It's a matter of taste but I would have the actor classify the partition: right-click the partition and "Advanced | Instance Classifier".

Neil
Title: Partition - Instance Classifier
Post by: bioform on February 05, 2007, 08:56:56 am
That sounds like a good approach. However how would I name the partition object or would I just leave it blank.

Example:
Actor - Site Contributor (SC), set Partition's classifier to Site Contributor and leave the partition's name blank... Partition's displayed name would then ":Site Contributor"

Previously, I just named the Partition the same name as the actor it was associated with (for clarity on the activity diagram), but that now would lead to rather odd redundant looking results (Site Contributor :Site Contributor.)

It just seems "wrong" to leave the object's instance name blank... Is that true? <Looking over my shoulder for the UML Modeling police!>

Right now, I am developing project models to support requirement engineering involving Use Cases, Business Object Classes, Features, Requirements, Traces to other items such as Stakeholder Needs, Acceptance Criteria, UC dependencies, logical UI (prototypes) screen, tests, and test cases, expressed as UML objects or instances... BUT the underlying goal is to make sure that the model and it's elements have value to the downstream consumers (customer, testers, designers, developers, trainers, etc.)

I want to make sure that an approach I choose now, will not lead to unexpected issues later...
Title: Re: Re-use of swimlanes
Post by: bullet on February 05, 2007, 09:03:29 am
from my understanding swimlane do express business units or departments and/or whole or part of a system: I would name the partition(s)/swimlane. Example: SiteConstructor->WebDev Department or SiteConstructor->CMS(ContentManagementSystem)

clear ???
Title: Re: Re-use of swimlanes
Post by: bioform on February 05, 2007, 09:12:20 am
so for my example what would you suggest?
Title: Re: Re-use of swimlanes
Post by: bullet on February 05, 2007, 09:25:59 am
Quote
so for my example what would you suggest?


ok something like: (Site Content :Site Contributor.)

customer=actor,corporate=partition/swimlane
testers=actor,staging=partition/swimlane
designers=actor/developers=actor,development=partition/swimlane
trainers=actors,HR=partition/swimlane

etc.

Title: Re: Re-use of swimlanes
Post by: bioform on February 05, 2007, 10:09:38 am
But that is NOT the intent of the partion in the activity diagram... It is to show those actions and activities that are associated with the actor "Site Contributor" that occur in the Usecase that the activity diagram is documenting...

I guess using the instance classifier is NOT what I want to do, since this is NOT an instance of the actor, but the representtion of the actor's potential choices of actions or activities within the scope of the use case...

Any idea how to REMOVE this now that I have created it like that?
Title: Re: Re-use of swimlanes
Post by: bullet on February 05, 2007, 11:49:07 pm
not 100%, since I am bloody new to EA, but I guess if as partition as part of model(2.0), right click/delete or via diagram (1.0) right click/configure swimlanes and delete from list
Title: Re: Re-use of swimlanes
Post by: bioform on February 06, 2007, 09:14:18 am
Bullet, don't worry EA has sometimes left me bloody too! (Or maybe it's more my ignorance of UML and EA combined... but I'll just blame it on EA... Seems the american thing to do!  <wink>)