A Framework For Transforming Artifacts From Data Flow Diagrams To
A Framework For Transforming Artifacts From Data Flow Diagrams To
Technology
{khaled, yichen}@cit.uws.edu.au
The process defined in DFD representing a function is Table 2 illustrates the transformation of data flow of DFD
transformed into use case defined in UML. The to UML
external entities and data stores connected to Table 2. Abstraction level 2
the processes are transformed into actors and SAD OOAD
classes respectively. The external entity in DATA FLOW VARIATIONS UML
DFD has similar characteristics as of an actor in UML. External entity -to-process Interaction diagram
Data store-to-process (sequence diagram /
The data flow between a process and an collaboration diagram)
Process-to-data store
external entity in DFD represents the relationship Process-to-external entity
between a use case and an actor in UML. The data Process-to-process State transition diagram
flow from a process to an external entity has
quite a different characteristic than the relationship The first four types of data flow can be transformed
between a use case and an actor. The transformation into sequence diagrams (interaction diagrams).
of data flow is discussed in the next section. As Data which flows from process to external
mentioned earlier about the broad coverage of DFD, entity or data store or vice versa in DFD can be
data store is transformed into class which is not represented as messages which are sent from one object to
included in the use case diagram. Part of the data another in the sequence diagram. The sequence
store is transformed into attributes of the class. diagram represents the interactions between objects in a
This is the highest abstraction level; hence class obtains use case. In another words, sequence diagram is
all attributes (data at rest) from data store to constructed for a particular function of the system.
show the static structure of data in class diagram. All Therefore it is broad enough to cover all information
processes associated with a particular data store contained in a data flow. Interaction diagrams capture
(e.g., the dataflow that connects external entity – process the flows of data in terms of messages passed between
– data store) are transformed into objects. Interaction diagrams such as sequence diagrams,
collaboration diagrams in UML represent dynamic model when an event occurs. These changes go through different
of the system. Abstraction level 2 is the middle level in states to show the behavior of the system. An event is a
the abstraction hierarchy of our transformation significant or noteworthy occurrence [2]. An event occurs
framework. The transformation of four variations of data to change the system, for instance, from state 0 to state 1.
flows is slightly different each other. We now discuss The example cited in Figure 4 shows the transformation
each of these in turn. of data flow from process-to-process in DFD into
Data flow from external entity to state transition diagram in UML. The figure
process or from data store to process in shows that the flow of data from a process P1.0 to
DFD can be transformed into sequence diagram in another process P2.0 has been transformed into a state
similar way. An external entity or a data in the transition diagram. The data flow DF1 is transformed into
data store may become a class instance. For object1, process P1.0 becomes state1, and P2.0 is
example, Customer (external entity) becomes transformed into a termination of the state diagram.
:Customer (Class Customer Instance). Data flow from
external entity/data store to process Figure 3. Transformation of data flow to sequence
becomes an object which may be sent from the class diagram
instance to the system as a parameter in the message. As
shown in Figure 2, data flow DF1 is transformed into
Object1 as a parameter in the message1() in UML.
Similarly, external entity E1 becomes ClassE1 Instances.
That means, message1(object1) passes object1
instance from :ClassE1 Instance to the :System.
This transformation is depicted in Figure 2.
DFD PORTION
Receive Generate
Customer Order
Customer Customer
Order Receipt
initial state:
"Receive
Customer
Order"
In Store
Checked Out
checkIn( Item )
For Sale
3. Case Study
2.3 Abstraction Level 3
The case study we discuss in this section is an inventory
Entities in ERD are transformed into classes in design system called Hoosier Inventory Control System. This
class diagram. Attributes of the entities become properties case study is used to illustrate the applicability of the
of the corresponding classes. Relationships that connect proposed transformation framework from DFD to UML.
one entity to another are transformed into methods of the Figure 7 cites the DFD for Hoosier Inventory Control
corresponding classes. Table 3 lists the transformation System.
rules.
3.1 Case study: Level 1 transformation
Table 3. Abstraction Level 3
SAD OOAD In the first level of the abstraction, Hoosier DFD [1] is
Component Entity Class analyzed and converted into use case diagram. Table 4
Associated entity Association presents the transformation of each component in DFD
Example Sales – Item Sales – Product - Invoice – into UML.
Component Attribute Attribute/
Identifier attribute property
After the analysis, these components are put into use case
Multi-valued attribute diagram as shown in Figure 8. Note that external entity
Example Sale_Date, Receipt_No, Prod_ID, Prod_Desc “Stock on Hand” and data store “Inventory” can be
Component Relationship Operation/ transformed into “Classes” with corresponding attributes
method/ and operations in “Class Diagram”.
association
Example Sell(), Order(), Receive()
3.2 Case study: Level 2 transformation
The relationship in ERD has two different types which are This level transforms the data flows into sequence
“Is a part of” relationship (aggregation) and “Is diagrams. Data flows in DFD fall into following
a” relationship (generalization). The relationships are the variations: process to external entity (Orders, Payments,
same as the “associations” in design class diagram. Query Result); external entity to process (Invoices,
Another aspect in ERD is cardinality. This is similar to Counts, Request); Process to data store (Amount Added,
the “multiplicity” in the design class diagram. Amount Used, Query); data store to process (Inventory
Levels, Minimum Order Quantities).
Figure 7 Data flow diagram for Hoosier’s Inventory Figure 8. Use case diagram for Hoosier’s Inventory
Control System (Source: Hoffer, George and Valacich Control System (ICS)
[1]) ICS
Store
Generate Order Co-ordinator
Supplier
manages all
"Inventory" activities
(See note below **)
System Boundary
3: generateOrders sells 1
(Orders) 1..*
include
Item Sale 1..*
Quantity_Sold Invoice Item
Quantity_added
sold( )
order( ) receive( )
0..* 0..*
is received for
order
1
Figure 12. Sequence diagram for use case “Query
1 Inventory Item
Inventory Levels” Product Item_ID
Manager System Inventory
Prod_ID Item_Desc
Prod_Desc Item_Type
Quantity_In_Stock
1: generateRequest
order( ) Min_Odered_Quantity
(Request)
1..* receive( )
2: queryInventory
Levels(Query)
1..*
3: check
Inventory(Inventory
Levels) 1 1
Recipy
4: respond
Request(Query Quantity_Used
Result)
References
[1] Hoffer, J.A., George, J.F. and Valacich, J.S., “Modern
System Analysis and Design”.Prentice Hall. New Jersey,
2002.
3.3 Case study: Level 3 transformation [2] Wessels, D.M., Sloane, A.M, and Sommerville, I., “Software
Design”. URL available:
The ERD of the system is cited in Figure 13. It has been http://engr.uark.edu/~wessels/softw/fall99/notes/design.html
transformed into class diagram as shown in Figure 14. . View on 20 September 2002.
[3] Charnick, E.J.,. “Object-Oriented Methods”. URL available:
http://userpages.umbc.edu/~echarn2/cs445/#AD. View on 20
4. Conclusion September 2002.
[4] Khan, K., et al., “Tasks and Methods of Software
Our transformation framework is based on three Maintenance: A Process Oriented Framework”, Australian
abstraction levels. At the first level, DFD components are Journal of Information Systems, Vol. 9-1, September 2001,
transformed into UML representations. Basically, the pp. 51-60.
transformation is done from processes to use cases; from