Book a Demo

Author Topic: Extending UML...  (Read 5509 times)

Inferjack

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Extending UML...
« on: February 14, 2006, 04:17:07 am »
Dear Modellers,

I am currently working on my own methodology which uses UML as a modeling language adopted to its needs.
UML 2.0 provides us with disciplined approach to extending language in the form of profiles. My questions are about extension process:

1. Are there any constraints on which metamodel elements I can extend? e.g. I need to extend message, metaclass which I was not able to find in the metaclasses list in EA tool during stereotype definition process.

2. I'd like to add the extra compartments to class symbol. e.g. I'd like to extend the classifier metaclass and use three instead of two compartments in the stereotype defined. How can I do that with EA?

3. I use a State Machine diagram for conversation modeling. In order to model my problem domain
I need more sophisticated GUARD CONDITION than
that defined in standard form. What would suits me the
most is guard condition consisted of two parts each
including more than one boolean expression in the form
[boolexpr1.1;boolexpr1.2...][boolexpr2.1;boolexpr2.2...].
How can I do that in order to be in accordance with well-formedness rules of UML 2.0?

Many thanks in advance!

Best
Jacek Jakiela

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Extending UML...
« Reply #1 on: February 14, 2006, 02:12:01 pm »
Quote
1. Are there any constraints on which metamodel elements I can extend?

The UML answer is you can extend any metaclass; the EA answer is that you can extend any concrete metaclass that has a properties dialog with a stereotype field.

Quote
e.g. I need to extend message, metaclass which I was not able to find in the metaclasses list in EA tool during stereotype definition process.

Message should be in the right-hand list under "Connectors". What version of EA are you using?

Quote
2. I'd like to add the extra compartments to class symbol. e.g. I'd like to extend the classifier metaclass and use three instead of two compartments in the stereotype defined. How can I do that with EA?

Can I ask what you want to show in the other compartment? When extending elements, you do that by applying a stereotype and optional tagged values and constraints. The class element can already display tagged value and constraint compartments.

Quote
3. I use a State Machine diagram for conversation modeling. In order to model my problem domain
I need more sophisticated GUARD CONDITION than
that defined in standard form. What would suits me the
most is guard condition consisted of two parts each
including more than one boolean expression in the form
[boolexpr1.1;boolexpr1.2...][boolexpr2.1;boolexpr2.2...].
How can I do that in order to be in accordance with well-formedness rules of UML 2.0?

The UML 2.0 Superstructure says:
Quote
guard: Constraint[0..1] A guard is a constraint that provides a fine-grained control over the firing of the transition. The guard is evaluated when an event occurrence is dispatched by the state machine. If the guard is true at that time, the transition may be enabled, otherwise, it is disabled. Guards should be pure expressions without side effects. Guard expressions with side effects are ill formed.

The "[0..1]" says you can't have more than one guard. Maybe you need two transitions?

HTH  :)
The Sparx Team
[email protected]

SF_lt

  • EA User
  • **
  • Posts: 216
  • Karma: +1/-0
  • The Truth Is Out There
    • View Profile
Re: Extending UML...
« Reply #2 on: February 14, 2006, 03:55:01 pm »
I would use combined constaints with the logic operator AND
registertm everything to SparX

thomaskilian

  • Guest
Re: Extending UML...
« Reply #3 on: February 15, 2006, 03:38:48 am »
Quote
I would use combined constaints with the logic operator AND

A constraint has a bit different semantic. So the solution should be to AND inside the guard thus it yields one boolean result.