Issue 13464: LoopNodeActivation::doStructuredActivity uses a Java array (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.3.2.3 LoopNodeActivation Summary: The operation LoopNodeActivation::doStructuredActivity uses a Java array, which has no mapping in Annex A. Proposed Resolution: Add a class Values to the package Semantics::Activities::CompleteStructuredActivities that has a property values: Semantics::Classes::Kernel::Value[*]. Then add a property bodyValueLists: Values[*] to LoopNodeActivation, which can be used in place of the local array variable. In the body of doStructuredActivity, within the statement “if (continuing) { … }”, replace the code with: this.activationGroup.terminateAll(); this.bodyOutputLists.clear(); OutputPinList bodyOutputs = loopNode.bodyOutput; for (int i = 0; i < bodyOutputs.size(); i++) { OutputPin bodyOutput = bodyOutputs.getValue(i); Values bodyOutputList = new Values(); bodyOutputList.values = this.getPinValues(bodyOutput); this.bodyOutputLists.addValue(bodyOutputList); } this.runLoopVariables(); for (int i = 0; i < loopVariables.size(); i++) { OutputPin loopVariable = loopVariables.getValue(i); Values bodyOutputList = this.bodyOutputLists.getValue(i); ValueList values = bodyOutputList.values; this.putPinValues(loopVariable, values); } Resolution: Change the code as proposed Revised Text: Add a class Values to the package Semantics::Activities::CompleteStructuredActivities that has a property values: Semantics::Classes::Kernel::Value[*]. Then add a property bodyValueLists: Values[*] to LoopNodeActivation, which can be used in place of the local array variable. In the body of doStructuredActivity, within the statement “if (continuing) { … }”, replace the code with: this.activationGroup.terminateAll(); this.bodyOutputLists.clear(); OutputPinList bodyOutputs = loopNode.bodyOutput; for (int i = 0; i < bodyOutputs.size(); i++) { OutputPin bodyOutput = bodyOutputs.getValue(i); Values bodyOutputList = new Values(); bodyOutputList.values = this.getPinValues(bodyOutput); this.bodyOutputLists.addValue(bodyOutputList); } this.runLoopVariables(); for (int i = 0; i < loopVariables.size(); i++) { OutputPin loopVariable = loopVariables.getValue(i); Values bodyOutputList = this.bodyOutputLists.getValue(i); ValueList values = bodyOutputList.values; this.putPinValues(loopVariable, values); } Actions taken: February 7, 2009: received issue July 23, 2010: closed issue Discussion: End of Annotations:===== ubject: LoopNodeActivation::doStructuredActivity uses a Java array Date: Sat, 7 Feb 2009 12:58:10 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: LoopNodeActivation::doStructuredActivity uses a Java array thread-index: AcmJTaOFXgYhXuRiS/2ct3TxFgOzbg== From: "Ed Seidewitz" To: Specification: Semantics of a Foundation Subset for Executable UML Models, FTF . Beta 1 (ptc/08-11-03) Section: 8.5.3.2.3 LoopNodeActivation Summary: The operation LoopNodeActivation::doStructuredActivity uses a Java array, which has no mapping in Annex A. Proposed Resolution: Add a class Values to the package Semantics::Activities::CompleteStructuredActivities that has a property values: Semantics::Classes::Kernel::Value[*]. Then add a property bodyValueLists: Values[*] to LoopNodeActivation, which can be used in place of the local array variable. In the body of doStructuredActivity, within the statement .if (continuing) { . }., replace the code with: this.activationGroup.terminateAll(); this.bodyOutputLists.clear(); OutputPinList bodyOutputs = loopNode.bodyOutput; for (int i = 0; i < bodyOutputs.size(); i++) { OutputPin bodyOutput = bodyOutputs.getValue(i); Values bodyOutputList = new Values(); bodyOutputList.values = this.getPinValues(bodyOutput); this.bodyOutputLists.addValue(bodyOutputList); } this.runLoopVariables(); for (int i = 0; i < loopVariables.size(); i++) { OutputPin loopVariable = loopVariables.getValue(i); Values bodyOutputList = this.bodyOutputLists.getValue(i); ValueList values = bodyOutputList.values; this.putPinValues(loopVariable, values); }