Discussion:
[mdr-users] constraints in UML to MOF
Viviana Cerrutti
2007-11-06 12:40:46 UTC
Permalink
Hi,

I'm trying to define some ocl constraints in my UML metamodel (i'm
using ArgoUML tool).
I have a relational package which contains two classes: Table and
Column and a transactional package which contains Entity and Attribute.
I want to define a constraint so that the mdr tests (when verifying
constraints) whether if the column i match to an attribute correspond to
the entity that i associated to the table. The thing is, i was able to
define some contraints, but the tool uml2mof won't recognize them when i
voncert my uml metamodel to a mof metamodel.
What am i doing wrong? Is it posible to do this? Do I need to define
stereotypes or something like that?
Thanks.
Viviana
---------------------------------------------------------------------------------------------------------------------------------------

La informaci�n contenida en este mensaje es para uso exclusivo del destinatario y dem�s autorizados a recibirla. Si usted ha recibido este e-mail por error, comun�quelo inmediatamente por esta v�a y elim�nelo de su sistema. Si Ud. no es el destinatario especificado en el mensaje, cualquier revelaci�n, copia o distribuci�n de su contenido est� estrictamente prohibido.
El mensaje expresa la opini�n de su autor pero no necesariamente expresa la opini�n oficial del Banco Central del Uruguay.

The information included on this message is intended only for the personal and confidential use of the designated recipient(s) named above. If you have received it by mistake please let us know by e-mail immediately and destroy or delete it from your files or system. If you are not the designated recipient, any disclose, copy or distribution of its contents is prohibited.
<<>>
Mgr. Richard Ciglansky
2007-11-06 15:14:15 UTC
Permalink
Hello,

it seems you are making some MOF-metamodel of your own.
This metamodel should be expressed in MOF terms. As there was no MOF
tool available in old days to do this directly, but many UML tools were
available, uml2mof tool was developed to simplify creation of 'MOF
metamodel' in the way, that it can be designed in UML as 'UML model'
using some very restricted sub-set of UML and then this 'UML Model' can
be using 'uml2mof' converted into 'MOF metamodel'.
All UML features not 'mappable' to MOF are ignored.
I believe that 'MOF metamodel' cannot contain constraints. therefore all
constraints from UML are ignored by 'uml2mof' tool.
Check documentation for 'uml2mof' how to prepare you UML Model to be
fully convertible to MOF-metamodel.


The behavior is by design.


Regards

Richard
Post by Viviana Cerrutti
Hi,
I'm trying to define some ocl constraints in my UML metamodel (i'm
using ArgoUML tool).
I have a relational package which contains two classes: Table and
Column and a transactional package which contains Entity and Attribute.
I want to define a constraint so that the mdr tests (when verifying
constraints) whether if the column i match to an attribute correspond to
the entity that i associated to the table. The thing is, i was able to
define some contraints, but the tool uml2mof won't recognize them when i
voncert my uml metamodel to a mof metamodel.
What am i doing wrong? Is it posible to do this? Do I need to define
stereotypes or something like that?
Thanks.
Viviana
---------------------------------------------------------------------------------------------------------------------------------------
La informacin contenida en este mensaje es para uso exclusivo del destinatario y dems autorizados a recibirla. Si usted ha recibido este e-mail por error, comunquelo inmediatamente por esta va y elimnelo de su sistema. Si Ud. no es el destinatario especificado en el mensaje, cualquier revelacin, copia o distribucin de su contenido est estrictamente prohibido.
El mensaje expresa la opinin de su autor pero no necesariamente expresa la opinin oficial del Banco Central del Uruguay.
The information included on this message is intended only for the personal and confidential use of the designated recipient(s) named above. If you have received it by mistake please let us know by e-mail immediately and destroy or delete it from your files or system. If you are not the designated recipient, any disclose, copy or distribution of its contents is prohibited.
<<>>
Pieter Van Gorp
2007-11-06 14:56:35 UTC
Permalink
Hi Richard,
The MOF version supported by MDR does support constraints (see section
3.4.26 in the MOF 1.4 spec,
http://www.omg.org/docs/formal/02-04-03.pdf) but the NetBeans UML2MOF
transformation does not support the translation from constraints
attached to UML Classifiers to constraints attached to MOF
Classifiers. It should be possible to build such a translation but I
don't know of any existing one.

Best regards,
Pieter Van Gorp
Post by Mgr. Richard Ciglansky
Hello,
it seems you are making some MOF-metamodel of your own.
This metamodel should be expressed in MOF terms. As there was no MOF
tool available in old days to do this directly, but many UML tools were
available, uml2mof tool was developed to simplify creation of 'MOF
metamodel' in the way, that it can be designed in UML as 'UML model'
using some very restricted sub-set of UML and then this 'UML Model' can
be using 'uml2mof' converted into 'MOF metamodel'.
All UML features not 'mappable' to MOF are ignored.
I believe that 'MOF metamodel' cannot contain constraints. therefore all
constraints from UML are ignored by 'uml2mof' tool.
Check documentation for 'uml2mof' how to prepare you UML Model to be
fully convertible to MOF-metamodel.
The behavior is by design.
Frédéric Jouault
2007-11-07 00:35:37 UTC
Permalink
Hello,

The UML2MOF ATL transformation has a rule to translate constraints
from UML to MOF.
See: http://www.eclipse.org/m2m/atl/atlTransformations/#UML2MOF

In case this transformation does not completely fit your need, you may
improve it. This should be simpler than changing the UML2MOF tool
written in Java.


Best regards,

Frédéric
Post by Pieter Van Gorp
Hi Richard,
The MOF version supported by MDR does support constraints (see section
3.4.26 in the MOF 1.4 spec,
http://www.omg.org/docs/formal/02-04-03.pdf) but the NetBeans UML2MOF
transformation does not support the translation from constraints
attached to UML Classifiers to constraints attached to MOF
Classifiers. It should be possible to build such a translation but I
don't know of any existing one.
Best regards,
Pieter Van Gorp
Post by Mgr. Richard Ciglansky
Hello,
it seems you are making some MOF-metamodel of your own.
This metamodel should be expressed in MOF terms. As there was no MOF
tool available in old days to do this directly, but many UML tools were
available, uml2mof tool was developed to simplify creation of 'MOF
metamodel' in the way, that it can be designed in UML as 'UML model'
using some very restricted sub-set of UML and then this 'UML Model' can
be using 'uml2mof' converted into 'MOF metamodel'.
All UML features not 'mappable' to MOF are ignored.
I believe that 'MOF metamodel' cannot contain constraints. therefore all
constraints from UML are ignored by 'uml2mof' tool.
Check documentation for 'uml2mof' how to prepare you UML Model to be
fully convertible to MOF-metamodel.
The behavior is by design.
Loading...