Issue 15988: The fUML subset should include central buffer nodes and data stores (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, FTF Beta 3 (ptc/10-03-14) Unlike pins, the tokens in central buffer nodes and data stores (which are kind of central buffer node) are not consumed when they are accessed. This allows a value to be, e.g., stored in a data store and used repeatedly in a loop that is modeled directly using flows rather than using a loop node. It is more common to create loops using flows than structured nodes when drawing graphical activity diagrams, and fUML should provide reasonable execution semantics for such models using central buffer nodes and data stores. Resolution: Add central buffer nodes and data stores Actually, the tokens in a central buffer node are withdrawn from the central buffer node when offers for them are accepted. On the other hand, values on tokens in data store nodes do effectively "persist". This makes data store nodes the important ones to include. However, since data store nodes are kinds of central buffer nodes, including data store nodes implies the need to also include central buffer nodes. CentralBufferNode is in the IntermediateActivities package in UML 2.4.1, which is already included in the fUML subset. DataStoreNode, however, is in the CompleteActivities package, which, heretofore, has not been part of the fUML subset. Therefore, in order to add DataStoreNode, it is necessary to add a new subclause for the CompleteActivities package, even though only one metaclass is to be included from that package. Further, this package must be added to the L3 merge for fUML. Revised Text: Make the following updates to the specification document and also correspondingly update the normative fUML Syntax and Semantics XMI files. In 2.2 Conformance Levels, in the bullet list following Figure 2.4, add the following as the first bullet: *Activities::CompleteActivities In Figure 2.5, update the diagram to show that the package CompleteActivities (from fUML::Syntax::Activities) is merged into package L3 (from fUML::Syntax). In Figure 2.6, update the diagram to show that the package CompleteActivities (from fUML::Semantics::Activities) is merged into package L3 (from fUML::Semantics). In 7.4.1 Overview, in the bullet list after the first paragraph, add the following as the second bullet: *CompleteActivities Replace the last paragraph with the following: Only data stores are included from the UML 2 Superstructure package CompleteActivities (see 7.4.3). Other capabilities from this package are excluded because they are considered to be more appropriate for "higher level" process modeling and outside the scope of fUML. In Figure 7.19, update the diagram to show that the package CompleteActivities (from fUML::Syntax::Activities) imports the package IntermediateActivities (from fUML::Syntax::Activities). In 7.4.2.1 Overview, remove the line "From Object Nodes (see Figure 7.21):" and the following bullet. In Figure 7.21, add the class CentralBufferNode as a subclass of ObjectNode. Add the following subclause, renumbering subsequent subclauses as appropriate. 7.4.2.2.6 CentralBufferNode Generalizations *ObjectNode Attributes None Associations None Additional Constraints None Add the following subclause, renumbering subsequent subclauses and figures appropriately. 7.4.3 Complete Activities 7.4.3.1 Overview The fUML Activities::CompleteActivities package includes only the class DataStoreNode, as shown in Figure 7.24. All other features from the CompleteActivities package in the UML 2 Superstructure Specification have been excluded and are, therefore, not reflected in the fUML abstract syntax diagrams. Figure 7.24 - Data stores 7.4.3.2 Class Descriptions 7.4.3.2.1 DataStoreNode Generalizations *CentralBufferNode Attributes None Associations None Additional Constraints None In 8.5.1 Overview, in the third paragraph, in the first sentence, change "Subclause 8.5.2 describes" to "Subclauses 8.5.2 and 8.5.3 describe". In the second sentence, change "8.5.3" to "8.5.4" and "8.5.5" to "8.5.6". In Figure 8.19 Activities Semantics Packages, update the diagram to show the package CompleteActivities (from fUML::Semantics::Activities) as importing the package IntermediateActivities (from fUML::Semantics::Activities) and CompleteActivities (from fUML::Syntax::Activities). In 8.5.2.1 Overview, in Figure 8.25, add the class CentralBufferNodeActivation as a subclass of ObjectNodeActivation, with the operation + fire(in incomingTokens: Token[0..*]) Editorial Note. Figures 8.19 and 8.25 are renumbered to Figures 8.20 and 8.26 due to the resolution of issue [1]FUML13-1. In 8.5.2.2.5 ActivityNodeActivationGroup, in the operation run, in the second for loop, in the first nested if statement, replace if (activation instanceof ActionActivation | activation instanceof ControlNodeActivation | activation instanceof ActivityParameterNodeActivation) { with if (!(activation instanceof PinActivation | activation instanceof ExpansionNode)) { Add the following subclause and renumber subsequent subclauses appropriately. 8.5.2.2.7 CentralBufferNodeActivation A central buffer node activation is an object node activation for a node that is a central buffer node. Generalizations *ObjectNodeActivation Attributes None Associations None Operations [1] fire ( in incomingTokens : Token [0..*] ) // Add all incoming tokens to the central buffer node. // Offer any tokens that have not yet been offered. this.addTokens(incomingTokens); this.sendUnofferedTokens(); In 8.5.2.2.16 ObjectNodeActivation (8.5.2.2.17 as renumbered), replace the body of the operation terminate with // Terminate the node activation and remove any held tokens. super.terminate(); this.clearTokens(); Add the following subclause and renumber subsequent subclauses and figures appropriately. 8.5.3 Complete Actions 8.5.3.1 Overview The fUML subset includes only data store nodes from the Complete Activities abstract syntax package (see 7.4.3). Figure 8.28 Data Store Node Activations 8.5.3.2 Class Descriptions 8.5.3.2.1 DataStoreNodeActivation A data store activation is a central buffer node activation for a node that is a data store node. Generalization *CentralBufferNodeActivation Attributes None Associations None Operations [1] addToken ( in token : Token ) // Add the given token to the data store only if it is unique, // that is, if its value is not the same as the value of // another token already held in the data store. Value value = token.getValue(); boolean isUnique = true; if (value != null) { TokenList heldTokens = this.getTokens(); int i = 1; while (isUnique & i <= heldTokens.size()) { isUnique = !heldTokens.getValue(i-1).getValue().equals(value); i = i + 1; } } if (isUnique) { super.addToken(token); } [2] removeToken ( in token : Token ) : Integer // Remove the given token from the data store, but then immediately // add a copy back into the data store and offer it (unless the // node activation has already been terminated). int i = super.removeToken(token); if (this.isRunning()) { super.addToken(token.copy()); this.sendUnofferedTokens(); } return i; ---------------------------------------------------------------------------------------- [1] http://issues.omg.org/browse/FUML13-1 Actions taken: January 26, 2011: received issue January 7, 2013: Deferred December 22, 2015: closed issue April 6, 2017: Resolved Discussion: End of Annotations:===== ubject: The fUML subset should include central buffer nodes and data stores Date: Wed, 26 Jan 2011 12:30:02 -0500 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: The fUML subset should include central buffer nodes and data stores thread-index: Acu9fqn84jHW/qSrQDitrqKiCMEvQg== From: "Ed Seidewitz" To: Specification: Semantics of a Foundational Subset for Executable UML Models, FTF Beta 3 (ptc/10-03-14) Unlike pins, the tokens in central buffer nodes and data stores (which are kind of central buffer node) are not consumed when they are accessed. This allows a value to be, e.g., stored in a data store and used repeatedly in a loop that is modeled directly using flows rather than using a loop node. It is more common to create loops using flows than structured nodes when drawing graphical activity diagrams, and fUML should provide reasonable execution semantics for such models using central buffer nodes and data stores.