Issue 17346: Read link actions and read structural feature actions do not handle ordered ends correctly (fuml-rtf) Source: Model Driven Solutions (Mr. Ed Seidewitz, ed-s(at)modeldriven.com) Nature: Uncategorized Issue Severity: Summary: Specification: Semantics of a Foundational Subset for Executable UML Models (fUML), v1.0 (formal/2011-02-02) Subclause: 8.6.3.2.9 ReadLinkActionActivation, 8.6.3.2.13 StructuralFeatureActionActivation Read link actions and read structural feature actions do not always return the values for an ordered association end in the correct order. In ReadLinkActionActivation::doAction, after the loop searching for the position at which to insert a featureValue, the statement featureValues.addValue(k-1, featureValue); should be replaced with if (continueSearching) { featureValue.addValue(featureValue); } else { featureValue.addValue(k-1, featureValue); } in order to correctly handle the case in which the featureValue should be added at the end of the list. There is a similar statement in StructuralFeatureActionActivation::getMatchingLinks to insert a link at the correct position in the list of matching links, and it should be replaced in a similar manner to the above. Resolution: agreed Revised Text: In Subclause 8.6.3.2.9, in the doAction operation, within the first for loop, after the while loop, replace the statement featureValues.addValue(k-1, featureValue); with if (continueSearching) { featureValue.addValue(featureValue); } else { featureValue.addValue(k-1, featureValue); } In Subclause 8.6.3.2.13, in the getMatchingLinks operation, after the while loop, replace the statement links.addValue(j–1, (Link)link); with if (continueSearching) { links.addValue((Link)link); } else { links.addValue(j–1, (Link)link); } Actions taken: April 29, 2012: received issue January 7, 2013: closed issue Discussion: End of Annotations:===== m: Ed Seidewitz To: "issues@omg.org" Date: Sun, 29 Apr 2012 16:54:04 -0400 Subject: Read link actions and read structural feature actions do not handle ordered ends correctly Thread-Topic: Read link actions and read structural feature actions do not handle ordered ends correctly Thread-Index: Ac0mSjZRGC7a+xebQoyghuZ4Tmy0jw== Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-Mailprotector-Decision: deliver X-Mailprotector-Connection: TLSv1|[10.1.50.226]|10.1.50.226|outbound.mailprotector.net|0|0|0|new|ugly|0|0|0|0 X-Mailprotector-Results: null_ptr subject_50_chars subject_10_spaces clean X-Mailprotector-Score: 80 X-Mailprotector-IP-Analysis: 0, 10.1.50.226, Ugly c=0 p=0 Source New X-Mailprotector-Scan-Diagnostics: 0-0-0-7632-c X-Mailprotector-ID: 42db25f5-69dc-4625-b06b-3b9b4e874e21 Specification: Semantics of a Foundational Subset for Executable UML Models (fUML), v1.0 (formal/2011-02-02) Subclause: 8.6.3.2.9 ReadLinkActionActivation, 8.6.3.2.13 StructuralFeatureActionActivation Read link actions and read structural feature actions do not always return the values for an ordered association end in the correct order. In ReadLinkActionActivation::doAction, after the loop searching for the position at which to insert a featureValue, the statement featureValues.addValue(k-1, featureValue); should be replaced with if (continueSearching) { featureValue.addValue(featureValue); } else { featureValue.addValue(k-1, featureValue); } in order to correctly handle the case in which the featureValue should be added at the end of the list. There is a similar statement in StructuralFeatureActionActivation::getMatchingLinks to insert a link at the correct position in the list of matching links, and it should be replaced in a similar manner to the above.