Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: NicoleL on August 23, 2004, 05:52:06 pm
-
My colleageus and I can't really find a good place in EA for the Business Rules associated with the Use cases. So far nothing has jumped out at us in the Use cases.
Are we completely missing something?
Thanks,
Nicole
-
G'day,
EA can probably support a huge set of options to enter business rules into your model.
I'd be tempted to say use the Class element, stereotyped as <<Business Rule>>. Then, you can take advantage of attributes, operations (?), internal requirements, constraints, tags, scenarios, etc. to really document the rules to the hilt.
If that's overkill, then maybe a Requirement element, again stereotyped as <<Business Rule>>.
Do a search of the forum for other threads on business rules. Here's one:
http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.cgi?board=UMLPRO;action=display;num=1083322899;start=0#0
-
Hi,
"a Requirement element, stereotyped as <<Business Rule>>"
How can I do this with EA ?
Thx,
Didier
-
http://www.sparxsystems.com.au/EAUserGuide/creatingcustomstereotypes.htm
Sorry that's too simplistic - I was just passing !
-
Yes, this allows me to create the custom "business rule" stereotype. But how do I stereotype the requirement element ? (there's no drop down list in the properties tab like there is in the general tab of a class element, isn't it ?)
-
Didier is correct. There's no apparent mechanism for getting the stereotype assigned to the requirement. Nor does there appear to be a way to modify this behavior through the Stereotypes dialog.
Creating a stereotype designed for requirements has no effect, since the requirement won't allow assignment, and other base classes won't pick up that stereotype.
Nor does there appear to be (at least to me, so don't take this on faith, I'd love to be corrected) a simple way to stereotype a class (or some other 'common' element) to make it a requirement; if there were we could add an additional stereotype and see if that got us someplace.
Any ideas?
-
Didier is correct. There's no apparent mechanism for getting the stereotype assigned to the requirement. Nor does there appear to be a way to modify this behavior through the Stereotypes dialog.
Creating a stereotype designed for requirements has no effect, since the requirement won't allow assignment, and other base classes won't pick up that stereotype.
Nor does there appear to be (at least to me, so don't take this on faith, I'd love to be corrected) a simple way to stereotype a class (or some other 'common' element) to make it a requirement; if there were we could add an additional stereotype and see if that got us someplace.
Any ideas?
Remember folks,
There are two kinds of Requirements in EA - Internal and External (to the Element).
Internal Requirements are actually Responsibilities (of the Element). (See: Export Requirements to Excel (http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=suggestions;action=display;num=1120068328;start=8#8))
External requirements can have stereotypes added by a circuitous route. Change the Element type to Class, set the stereotype and reset the type back to Requirement.
(You can also set the stereotype value directly via the database - usual caveats)
[David, this is another example of the incorrect inheritance hierarchy - if I can do it by the circuitous route, why can't I do it directly? ::)]
Internal requirements (Responsibilities) are NOT elements - and thus CAN'T be stereotyped.
HTH,
Paolo
-
Thanks Paolo,
Still, this leaves me in a quandary (someplace I'm both familiar and comfortable).
When I create a requirement element from the toolbox (custom or requirements panel) I get what seems to be the internal requirement you mentioned. I cannot change element type, etc.
How do I create an external requirement? The user guide mentions both entities, but seems to be secretive about how to handle this.
Of course, I could be looking in the wrong place. Still, that is more likely YA indicator that the user guide is getting to the point where a total overhaul is necessary.
Yes, I agree about the EA Unique Interface. We live in hope...
David
-
David,
I believe the requirement from the toolbox is the external one ; while the internal one is the reponsability (in the responsabilities tab of an element).
Didier
-
So far so good Paolo,
I can change the element type via the Element menu, but not via the context menu. This has always been the case, but I forgot.
It appears that the element type for a requirement, internal or external, is always Class. When I create an external one, by clicking "Move External" on the Class dialog, I get a requirements icon, but with no apparent invisible (wait for it) stereotype.
When I create a requirement via the toolbox I get a requirement with a <<Functional>> stereotype; note that the capitalization seems to matter to EA. It (the stereotype) is visible in the Project View tree if your preferences are set for this. Note however that this stereotype is not listed in the Stereotypes dialog, and is 'invisible' on the element itself. (There is, however, a requirement stereotype for comments, but I digress...)
I can change the Class back into a Requirement, and so far things seem to work.
Now, can you remember how to set multiple requirements? I just cannot seem to get this right, and thus cannot retain the Functional stereotype.
Still, this is progress.
Nicole (if you're still listening) and Didier, does any of this help?
David
-
Multiple stereotypes are created via the little builder button [...] to the right of the stereotype dropdown.
The stereotype in the drop down is the primary stereotype. The others are auxiliaries. However, if you uncheck the primary stereotype (in the auxiliaries list), it appears the alphabetically first auxiliary stereotype will be assigned as the primary. HOWEVER, if you clear the primary stereotype in the dropdown, it remains set in the auxiliary list ::) At present ONLY the primary is visible in diagrams and the project explorer.
You can only do this whilst in type Class. (..and DON'T try this on your database as the additional stereotypes are NOT stored in the Stereotype field.)
HTH,
Paolo
-
Thanks Paolo,
It's always been there, and I have actually used it before (before time began, that is). Still, my brain (as we laughingly call that bone in my head) is trained to somehow associate the button the "Abstract" caption that it abuts. Even though I never have any urge to click the button to set a class to abstract, the blind spot remains.
Also, very much thanks for the pointers on how EA handles (?) primary stereotypes.
David
-
Hey folks...
We could always open the Settings / General Types / Requirements dialog and add BusinessRule as a requirements type. Then we could choose BusinessRule from the Type dropdown on the Properties dialog for a specific requirement.
We're still left with a rather bland display, since we cannot distinguish between these and other requirements (or even see any requirement types). Perhaps this is best brought up via the Request a Feature dialog in On-line Resources.
Who's got the most thinking into this so far? That would be the best person to dial Sparx. [Not me, since I cannot even find the button...]
-
Folks another option is to create a UML Profile using EAs extension mechanism and create a new Sterotype called "Business Rules".
There are many advantages to this approach.
1) You can set up the profile to appear on your toolbar and then just "drag and drop" like you do for "Requirement" or "Feature" and voila you have the stereotype pre-applied saving all the extensive work arounds suggested.
2) You can add additional tagged values to the "Business Rule" requirement type. Something that is not possible currently. In addition tagged values can be forced to pick from a List of values and thus control the values that can be entered.
3) If for some reason in future you decide to increase the tagged values fields, you can do so in the profile and then propogate to your existing model.
IMHO UML Profiles are a very powerful mechanism to extend UML and EA has done a great job of enabling users to create these profiles easily.
Refer UML Profiles in the help file or "http://sparxsystems.com.au/EAUserGuide/umlprofiles.htm" for more details.
If you want a sample Requirements profile to demonstrate this post your email ID or send me a private message and I will send it to you.
I tried uploading it to the EA users sharepoint site but realised I do not have permission to add new announcements. I have raised a request for membership and once I get it I will post the profile there.
Cheers
-
Excellent point, and I concur on all counts!
My experience is that the permission will come through quickly. I'll try to remember to check for this, but I'd certainly welcome it if you want to zip it up and fire it over.
David
-
Further to my earlier post. You can download the sample Requirements profile from:
http://sharepoint.knowledgerecovery.com/external/eaug/Tools/Forms/AllItems.aspx
Thanks Bruno for a superquick account setup.
For details on how to import this and include in toolbar refer UML Profiles in EA Help.
This can be extended further to change the decoration on the top right corner of the Stereotype notation from 'R' to 'BR' if required. So there are a lot more possibilites.
HTH
Cheers
-
Nara,
Don't you just love it when a plan comes together. I already have it - and have enen found it after I downloaded it to the wrong directory...
I took a look at the raw XML and I think you've got the essence of this just right. I'll look at it in EA tomorrow sometime; it's been a long day and I don't want to miss something.
Thanks much,
David
-
Noticed I had uploaded an initial version of the UML Profile on the Sharepoint site and have now updated it with the correct one (ver 1.1).
The earlier one (ver 1.0) did not have a demo of how tagged values can be selected from a list.
Optional steps follow:
After importing the profile if you would like a "B" to appear on the top right corner of your Requirement notation then do the following.
1) Download the Requirements profile from the EA User Group Sharepoint site
http://sharepoint.knowledgerecovery.com/external/eaug/Tools/Forms/AllItems.aspx
2) Ensure that the model you want to use it in is open in EA and then import the profile from the Resource view. (Check EA Help file for more details.)
3) After importing the Requirements Profile, open the stereotypes settings from the EA menu - "Settings > UML > Stereotypes" menu.
4) Select the stereotype "Business Rule" from the list. The base class will be "Requirement".
5) Next, in the Overide appearance menu select the "Shape Script" option and click "Edit".
6) In the Shapescript window Cut and paste the following text (without the dashed lines - starting with Decoration and ending with the last closed curly bracketc)
------
Decoration BusinessRule
{
Orientation="NE";
SetFillColor(255,255,200);
StartPath();
Rectangle(0,0,90,100);
EndPath();
FillAndStrokePath();
Print("B");
}
------
Save the Shapescript.
Now when you create a "Business Requirement" type requirements, you will notice a B decoration within a box to differentiate it with other requirements & Features.
Let me know how you folks get along.