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

Jaroslav Drazan <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.mdr.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.