Fixes are available
APAR status
Closed as program error.
Error description
https://bugs.eclipse.org/bugs/show_bug.cgi?id=259630 Product: Rational Software Architect 7.5.1 Operating System: Linux Steps To Reproduce: 1. Create two classes with a navigable association between them 2. Create the instances of the two classes and a link(InstanceSp ecification) for the assiociation between those instances 3. Use the link in ocl from the nonnavigable side: self.toOtherC lass 4. It returns itself which is incorrect More information: Debugging through ocl I came across the following code which mig ht contain the problem: org.eclipse.ocl.uml.UMLEvaluationEnvironment.java navigateNonNavigableProperty(Property, Association, InstanceSpec ification) /** * Navigates a non-navigable property in an instance specifi cation context. * * @param property * the non-navigable property to navigate * @param association * the association of which the property is a mem ber * @param instance * the instance specification from which we are n avigating the * property * * @return the property value */ private Object navigateNonNavigableProperty(Property propert y, Association association, InstanceSpecification insta nce) { Collection?InstanceSpecification? result = CollectionUti l .createNewSet(); Property otherEnd = property.getOtherEnd(); for (Slot slot : getSlotsReferencing(instance)) { // TODO: Handle redefinition of the other end if (slot.getDefiningFeature() == otherEnd) { InstanceSpecification referencer = slot.getOwnin gInstance(); if (referencer != null) { if (isInstance(association, referencer)) { // get value of the other end. Multiplic ity of an // association end is always 1 from the association's // perspective Slot otherSlot = getSlot(referencer, oth erEnd); Should be: Slot otherSlot = getSlot(referencer, pro perty); if (otherSlot != null) { ValueSpecification value = otherSlot .getValues() .isEmpty() ? null : otherSlot.getValues().get(0); if ((value != null) ?? (value instanceof InstanceVal ue)) { result.add(((InstanceValue) valu e) .getInstance()); } } } else { // navigable opposite result.add(referencer); } } } } return coerceValue(property, result, true); }
Local fix
Problem summary
OCL InstanceSpecification of association not handled correctly.
Problem conclusion
Fixed in release RSx 752. Bugzilla 259630 was been fixed in MDT OCL 1.2.0 which is available in Ganymede SR2 which will be available in RSA 7.5.2.
Temporary fix
Comments
APAR Information
APAR number
PK78129
Reported component name
RSA-SE WIN
Reported component ID
5724V8800
Reported release
750
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-01-06
Closed date
2009-04-03
Last modified date
2009-04-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
RSA-SE WIN
Fixed component ID
5724V8800
Applicable component levels
R750 PSN
UP
[{"Business Unit":{"code":"BU029","label":"Software"},"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5"}]
Document Information
Modified date:
25 October 2021