Issue 13308: Issue: ActivityNodeActivation::clearTokens incorrect (fuml-ftf) Source: Model Driven Solutions (Mr. Ed Seidewitz, ed-s(at)modeldriven.com) Nature: Uncategorized Issue Severity: Summary: Specification: Semantics of a Foundation Subset for Executable UML Models, FTF – Beta 1 (ptc/08-11-03) Section: 8.5.2.2.3 (ActivityNodeActivation) Summary: The logic for the ActivityNodeActivation::clearTokens operation is incorrect. As coded, this operation withdraws each token held by an activity node activation. However, as each token is withdrawn, it gets removed from the activity node. This means that the indexing of the getValue used to get the next held token will be incorrect. Proposed resolution: Replace the current code with the following: while (this.heldTokens.size() > 0) { this.heldTokens.getValue(0).withdraw(); } Resolution: Change the code as proposed Revised Text: In Section: 8.5.2.2.3 (ActivityNodeActivation): Replace the current code with the following: while (this.heldTokens.size() > 0) { this.heldTokens.getValue(0).withdraw(); } Actions taken: January 20, 2009: received issue July 23, 2010: closed issue Discussion: End of Annotations:===== ubject: Issue: ActivityNodeActivation::clearTokens incorrect Date: Tue, 20 Jan 2009 15:16:16 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Issue: ActivityNodeActivation::clearTokens incorrect thread-index: Acl7OKnT4BEH41S8S0mhFBouTBWAbA== From: "Ed Seidewitz" To: Cc: [This is a resend. If you received the original message, please disregard this one.] Specification: Semantics of a Foundation Subset for Executable UML Models, FTF . Beta 1 (ptc/08-11-03) Section: 8.5.2.2.3 (ActivityNodeActivation) Summary: The logic for the ActivityNodeActivation::clearTokens operation is incorrect. As coded, this operation withdraws each token held by an activity node activation. However, as each token is withdrawn, it gets removed from the activity node. This means that the indexing of the getValue used to get the next held token will be incorrect. Proposed resolution: Replace the current code with the following: while (this.heldTokens.size() > 0) { this.heldTokens.getValue(0).withdraw(); }