Re: [mdr-users] Operation as a context of ActivityGraph

Jaroslav Drazan <[email protected]> Thu, 23 Jun 2005 18:00:33 +0200 (CEST)
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
Hi all,
UML 1.5 (and less) defines context as aggregation but not composition i.e. it should be possible to set both - Namespace and Context and MDR shouldn't throw CompositionViolationException (at least in case that it is same in metamodel you really use). Otherway I applogize I didn't see UML metamodel and I thougt that context is composition (because of the Exception).

Regards
Jarda

> Hello Martin,
> 
>     It is not possible because the context is a BehaviorFeature and
> BehaviorFeature does not extends Namespace.
> 
> 
> 
>     Thanks,
> 
>     Leo 
> 
> 2005/6/23, Martin Matula <[email protected]>:
> > Set the namespace to the same value as the context.
> > Regards,
> > Martin
> > 
> > Leonardo Gresta Paulino Murta wrote:
> > 
> > >Hi Jarda,
> > >
> > >       Thanks for the hint! However, when I do not set the namespace of the
> > >ActivityGraph, the ActivityGraph is not written in XMI file. In other words:
> > >I do not receive the CompositionViolationException and the generated XMI
> > >file correctly has an element relating the xmiid of the Operation with the
> > >xmiid of the ActivityGraph, but the ActivityGraph itself is not there...
> > >
> > >       The attached file (test.xml) is the generated XMI file. It is using
> > >SPEM metamodel, but SPEM is derived from UML metamodel. The element
> > >"SPEM:A_behavior_contex" relates a WorkDefinition, which extends Operation,
> > >with an ActivityGraph (xmi.idref = "a7"). However, the ActivityGraph itself
> > >(xmiid = "a7") is not there! Do you have any other hints?
> > >
> > >       Thanks a lot!!!
> > >
> > >       Leo
> > >
> > >
> > >
> > >>-----Original Message-----
> > >>From: Jaroslav Drazan [mailto:[email protected]]
> > >>Sent: Thursday, June 23, 2005 6:33 AM
> > >>To: [email protected]
> > >>Subject: Re: [mdr-users] Operation as a context of ActivityGraph
> > >>
> > >>Hello Leo,
> > >>You can't set the composition more than once. That's the reason why all
> > >>compositions defined by UML (ModelElement in Namespace, Feature in
> > >>Classifier...) are optional (multiplicity is 0..1). So if you want to
> > >>specify ActivityGraph for some BehaviorFeature you mustn't specify its
> > >>namespace (if it has been already set you must first set it to null).
> > >>
> > >>Regards
> > >>Jarda
> > >>
> > >>
> > >>
> > >>>Hello,
> > >>>
> > >>>     I am using UML metamodel and trying to set the context of an
> > >>>ActivityGraph to an Operation. The specification says the context of an
> > >>>ActivityGraph may be a BehavioralFeature. Moreover, Operation inherits
> > >>>
> > >>>
> > >>from
> > >>
> > >>
> > >>>BehavioralFeature. However, a CompositionViolationException is thrown.
> > >>>
> > >>>
> > >>It
> > >>
> > >>
> > >>>complains that I am trying to set more than one context to the
> > >>>ActivityGraph. I suppose it considers the namespace where the
> > >>>
> > >>>
> > >>ActivityGraph
> > >>
> > >>
> > >>>is inserted as an existing context. Am I doing something wrong? What is
> > >>>
> > >>>
> > >>the
> > >>
> > >>
> > >>>correct way to set the context of an ActivityGraph to an Operation?
> > >>>
> > >>>
> > >>Where
> > >>
> > >>
> > >>>should I insert the ActivityGraph to avoid the
> > >>>CompositionViolationException?
> > >>>
> > >>>     Thanks,
> > >>>
> > >>>     Leo
> > >>>
> > >>>
> > >>>
> > >>____________________________________________________________
> > >>http://www.listicka.cz
> > >>
> > >>
> > 
> >

____________________________________________________________
http://www.listicka.cz