6.2 Flows in the AADL Meta Model
This section describes the representation of flow in the AADL Meta model. This provides an indication of how flows can be processed. In addition the Meta model defines how this part of an AADL model is stored as part of an XML document. The representation of flow declarations is defined in the Flow meta model package of the AADL Meta model. Flow instance related information is defined in the Instance meta model package.
6.2.1 Flow Specification Declarations
Flow specifications are represented by an abstract FlowSpec class, which itself is a subclass of the PropertyHolder class, and a concrete class for flow source (FlowSourceSpec), flow sink (FlowSinkSpec), and flow path (FlowPathSpec). These classes have references to members of the AbstractPort class in the same component type, represented by a source and destination reference association - as appropriate. A flow specification can also refer to an element of a port group. In that case, the port group is referenced as the context (srcContext or dstContext) of the source ( src) or destination ( dst) reference.
Figure 34: Flow Specification Declaration in the AADL Meta Model.
6.2.2 Flow Implementations and End-To-End-Flows
Figure 35 illustrates the representation of flow implementation declarations and end-to-end flow declarations in declarative AADL models. The abstract FlowSequence class represents both flow implementations and end-to-end flows. It is a subclass of the ModeMember class. A FlowSequence class contains a sequence of FlowElement objects that alternately represent a reference to a connection or reference pair to a subcomponent and its flow specification.

Figure 35: Flow Implementation & End-To-End Flow in the AADL Meta Model.
Flow implementations are represented by the abstract FlowImpl subclass and the concrete subclasses FlowSourceImpl, FlowSinkImpl, and FlowPathImpl. Each of these concrete subclasses has a reference association to its respective flow specification class it implements.
Flow implementations contain a sequence of FlowElement objects that alternately reference a Connection object or a FlowSpec object and the subcomponent it is contained in as the flowContext. The originating source and the final destination port of a flow implementation are identified by the flow specification being implemented, thus, are not explicitly recorded as a FlowElement object. Note that these ports are referenced by the first and last connection of the FlowElement sequence.
A FlowSinkImpl specifies a path from the flow sink spec portthrough zero or more connection and subcomponent flow specification pairs (FlowElement) with the last subcomponent flow specification referring to a flow sink. A FlowSourceImpl specifies a path from a subcomponent flow source specification represented by one FlowElement through zero or more connection and subcomponent flow specification pairs (FlowElement) followed by a FlowElement containing the connection to the destination port of the flow source implementation. A FlowPathImpl specifies a path from the (incoming) source port to the (outgoing) destination port of the flow path spec through zero or more connection and subcomponent flow specification pairs (FlowElement) ending with a FlowElement that contains the connection to the destination port of the flow path implementation.
End-to-end flows are represented by the concrete EndToEndFlow class through a sequence of FlowElement objects with the first referring to the originating subcomponent and flow specification pair and the remainder representing connection and subcomponent flow specification pairs (FlowElement).
6.2.3 End-To-End Instance Flows
End-to-end instance flows are represented by the EndToEndFlowInstance class (shown in Figure 36). Objects of this class are contained in the component instance that corresponds to the component implementation with the end-to-end flow declaration. Each end-to-end instance flow object contains a sequence of alternating references to ConnectionInstance objects and FlowSpecInstance objects.
Figure 36: Flow Instance Representation
Note that the flow instance representation has been added to the AADL Meta model as result of the AADL Meta model & XML/XMI Interchange Format Annex review in Jan 2005. An implementation of end-to-end flow instantiation will become available with the next release of OSATE. This capability has not been made use of in the OSATE plug-in development presentation series.