|
|
|
|
Re: problem with oclIsKindOf() [message #1848264 is a reply to message #1848232] |
Fri, 26 November 2021 08:06   |
|
Hi Ilya,
the answer given by Acceleo is correct in both cases. You have to consider according to the UML specification an Activity is a Behavior which is a Class. Consequently applying oclIsKindOf on Class will also return true for an Activity.
Nevertheless, if I got your intention correctly you might can use a construct like:
[self.getClientDependencies().supplier->asOrderedSet()->reject(e|e.oclIsTypeOf(Class))/]
This gives you the non-conforming suppliers as an OrderedSet.
/Carsten
|
|
|
Re: problem with oclIsKindOf() [message #1848265 is a reply to message #1848264] |
Fri, 26 November 2021 08:49   |
Ilja Kraval Messages: 38 Registered: October 2021 |
Member |
|
|
Hi Carsten,
thanks for the answer.
You are right about constructing terms in UML, but I think the given condition oclIsKindOf () examines a given UML specific for "leaf concrete metaclass".
To check , here is a listing of the XML file (.uml) of the given example, one element has type = Class and the second has type = Activity
<packagedElement xmi:type="uml:Package" xmi:id="_c-REwE4HEeystpVXwKmYWg" name="Package3">
<packagedElement xmi:type="uml:InstanceSpecification" xmi:id="_g79CUE4HEeystpVXwKmYWg" name="InstanceSpecification1"/>
<packagedElement xmi:type="uml:Class" xmi:id="_kUtG0E4HEeystpVXwKmYWg" name="Class1"/>
<packagedElement xmi:type="uml:Activity" xmi:id="_pN1Y8E4HEeystpVXwKmYWg" name="Activity1"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="_wedG4E4HEeystpVXwKmYWg" name="Dep1" client="_c-REwE4HEeystpVXwKmYWg _g79CUE4HEeystpVXwKmYWg" supplier="_kUtG0E4HEeystpVXwKmYWg"/>
<packagedElement xmi:type="uml:Dependency" xmi:id="_40pVwE4HEeystpVXwKmYWg" name="Dep2" client="_g79CUE4HEeystpVXwKmYWg" supplier="_pN1Y8E4HEeystpVXwKmYWg"/>
</packagedElement>
Regards,
Ilya
[Updated on: Fri, 26 November 2021 09:01] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02370 seconds