You are on page 1of 5

Representation of UML Activity Models as Ontology

Ali Hanzala Khan, Abid Ali Minhas Moazzam Fareed Niazi


Department of Computer & System Sciences Department of Information Technology
Royal Institute of Technology-KTH, Sweden University of Turku, Finland
{hanzala, aaminhas} @kth.se moazzam.niazi@utu.fi

Abstract Ontology is a conceptual model which is used to


represent the concepts in a domain and relationship
Ontology is a conceptual model that is used to across them [6]. Researchers propose the use of
represent the concepts in a domain and relationship ontologies for sharing and reuse of the knowledge that
between the concepts. It can be used for sharing and allows humans and machines to exchange diverse
reuse of the knowledge that allows humans and information [7]. OWL (Web Ontology Language) [8]
machines to exchange diverse information. A process is a current standard for specifying such ontologies.
is a series of activities that result in an outcome. The UML behavioral models are process models
Processes can be shared and reused by creating a that contain information, which can be stored using a
repository that keeps all the information about them. knowledge representation format like ontology. A
Such a repository can serve us independent of the process, business activity or workflow can be
domain for which a process is modeled. Process transformed into ontology for this purpose. Such a
modeling is a technique for the graphical format will aid the information to be shared and reused
representation of a process. Among many process- by domain experts without understanding the concepts
modeling techniques, UML Activity Model is a and notations of ontology.
commonly used process-modeling notation and is Past research regarding UML Models to Ontology
adopted for our research. This research aims at to transformations was limited to mapping UML Class
provide a solution for representing UML Activity diagrams to Ontology [9-11]. Efforts like [9, 12, 13,
Model as an Ontology expressed in OWL. A method is 14, 15, 16] are successful to extent of mapping Static
proposed for this purpose that defines mapping rules Structural Models into ontology. Behavior models like
between a UML Activity Model and Ontology. To Petri Nets [2], UML Activity model [3], UML Sequence
evaluate the validity and usefulness of our research a Diagram [4] and BPMN [5] that illustrates work flow
case study is conducted. Military action scenario, and business processes are not significantly addressed.
modeled using UML Activity Model, is taken as input. UML Activity model is widely used approach for
Consequently they are mapped into ontology, thus process modeling. Consequently we have chosen this
expressing behavioral knowledge captured in the model for our desired purpose. Currently, a limited
process as OWL ontology. research is available on how we should represent the
behavioral knowledge captured in an UML activity
model using the same OWL ontology language.
1. Introduction
2. UML Behavioral model to OWL
Process Modeling is the graphical representation of
processes that capture, manipulate store, and distribute According to our proposed method, a UML activity
data between a system and its environment and among diagram is modeled in a UML modeling tool, for
components within a system [1]. Such a model example, Poseidon for UML, a UML based modeling
identifies constructs that are used to define and tool. The tool exports an XMI, which is embedded
represent a process in graphical form. Commonly used with the behavioral knowledge expressed in a
process models are Petri Nets [2], UML Activity model particular UML activity diagram. This XMI serves as
[3], UML Sequence Diagram [4] and BPMN (Business input to mapping application as shown in Figure 1. On
Process Modeling Notation) [5]. the other hand we have target process ontology
expressed in OWL. This ontology is specially modeled OWL-S process ontology is modified to obtain a
to match the needs of our research. process ontology that will serve the purpose of this
The mapping rules are scripted in form of XML research. We are excluding UAD-OWL target ontology
Style sheet Language Transformation XSLT; XSLT is a figure because of the space reason but it’s accessible
language for transforming XML documents into other on one of the author’s homepage at [24]. Following is
XML documents [17]. XSLT together with XMI a summary of UAD-OWL target ontology.
representation of UML activity diagram is used as
input to the mapping application. The output is OWL • Process class represents a process.
ontology expressing the behavior knowledge • Control Construct is a class concept with sub class
represented by activity diagram; Figure 1 depicts a concepts Merge, Fork, Choice, Perform, Join and
detailed overview of our proposed solution. Decision. These classes represent the UML activity
diagram control constructs.
• Activity is a class concept with sub class concepts
Atomic Activity and Composite Activity. Composite
activity represents the process as whole. Atomic
activity represents the activities or tasks to complete
the process. The sub class concepts of atomic activity
capture detailed information of each activity, for
example, time limit, loop etc.
Figure 1. Proposed solution • List class concept has a sub class concept named as
Control Construct List used to maintain the
2.1. Target Ontology information regarding the sequence of graphical
control constructs of a UML activity diagram.
Translation of UML Activity Diagram into ontology
requires the use of predefined target ontology. Target UAD-OWL ontology will serve as a repository of
ontology needs to be expressive enough to capture the processes. It is capable of expressing the behavioral
information contained in a UML Activity Diagram. knowledge represented by processes modeled using
There exist many process ontologies such as Open UML activity diagram. This repository will facilitate
Source Business Management Ontology [18], sharing and reuse of different processes. UML-OWL
Biological Process Ontology [19], Software Design can be viewed in an ontology-modeling tool such as
Process Ontology [20] and Gene Ontology [21]. But Protégé [25].
they are domain specific and are not readily usable for
representing a generic process. There are some other
2.2. Mapping Rules
ontologies like A Process Ontology [22] and OWL-S
that support generic process representation. None of
This section describes how constructs across the two
these can be used as it is for our research. But a
models are related at conceptual level. This leads to
thorough examination reveals that OWL-S is very
realization of correspondence between source model
suitable for the cause if we modify OWL-S to build our
and target model notations. Table 1 represents an
target ontology.
overview of the way control constructs of OWL
OWL-S is an OWL based ontology proposed for
ontology map to UML Activity Diagram constructs.
description of web services [23]. It enables automatic
A UML activity diagram can have six different
discovery, invocation, composition and interoperation
types of control constructs i.e. Fork, Join, Transition,
of web services for software agents. OWL-S consists
Decision, Merge and State. In UAD-OWL ontology
of three parts i.e. service profile, service grounding and
there is class concept Control Construct that can serve
service process model. Service profile tells what a
this purpose. It has six sub classes named as Fork,
service does where as service grounding enclose
Choice, Perform, Join and Decision. Accordingly
information necessary for a user to interact with the
Fork, Join, Transition, Decision, Merge and State from
service. Process model describes the procedure for
UML activity diagram are mapped onto Fork, Join,
service execution illustrating the input, output and
Transition, Decision, Merge and State class constructs
activities involved in course of action. Service process
of OWL respectively.
model of OWL-S is closely related to what we need as
Table 1 summarizes the correspondence between
target ontology to capture the semantics of UML
above mentioned constructs across two models.
activity diagram.
Type UML 2.0 UAD-OWL
Type UML 2.0 Kim-OWL UAD-OWL
Control Construct Fork Fork
Join Join
Fork Split Fork
Transition Choice Join Join Join
Decision Decision Transition X Choice
Merge Merge Control Decision Choice Decision
State Perform Construct Merge X Merge
Activity State Action Task State X Perform
Model Composite Activity
State X Action Task
Activity Model X Composite
Table 1. Construct mapping at conceptual level. Activity
Table 3. Mapping rules’comparison at conceptual level
A UML activity diagram models activities involved
in a process. The process modeled is labeled as Model
and each activity are labeled as State. Proposed UML-XMI OWL
ontology has class concepts as Atomic Activity and
Composite Activity. State and Model constructs from Construct XML Tag Construct UAD-OWL XML Tag
UML are mapped into Atomic Activity and Composite Model <UML:Activity> Process <Process rdf:ID =
”Process Name">
Activity constructs of OWL respectively. State <UML2:CallAction> Perform <Action-Task rdf:ID =
"Task Name”>
The association between vocabularies of the two Fork <UML2:ForkNode> Fork <Forkrdf:ID = ”Fork Name">
models, as shown in Table 2, tends towards the general Join <UML2:JoinNode> Join <Joinrdf:ID = ”Join Name">
rules for transformation. These rules can be followed Transition <UML2:ActivityEdge> Choice <Choicerdf:ID =
”ChoiceName">
for translation of UML Activity to OWL ontology. Decision <UML2:DecisionNode> Decision <Decisionrdf:ID =
”Decision Name">
Thus mapping at implementation level can be Merge <UML2:MergeNode> Merge <Mergerdf:ID =
achieved. XML Metadata Interchange (XMI) is a ”Merge Name">

standard for exchanging metadata information via Table 4. Mapping rules’comparison at implementation level
XML. OWL is also a XML schema. All we need is to
transform one XML document to another XML
document. For that reason we have identified 4. Case Study
relationship between UML metadata XMI tags and
OWL tags. Summary of the relationship between
source XMI and target OWL is presented in Table 2.
4.1. Base Object Models (BOMs)

The Simulation Interoperability Standards


UML-XMI OWL
Organization (SISO) focuses on facilitating simulation
Construct XML Tag Construct Kim
XML
UAD-OWL XML
Tag
interoperability across governmental and non-
Model <UML:Activity> Process
Tag
X <Process rdf:ID =
governmental application worldwide. SISO has
State <UML2:CallAction> Perform X
”Process Name">
<Action-Task rdf:ID =
proposed Base Object Models (BOMs) [27] as a
Fork <UML2:ForkNode> Fork X
”Task Name”>
<Forkrdf:ID = ”Fork
method to support and promote reuse of simulation
Join <UML2:JoinNode> Join X
Name">
<Joinrdf:ID = ”Join
components.
Transition <UML2:ActivityEdge Choice X
Name">
<Choicerdf:ID =
Base Object Models (BOMs) provide a component
Decision
>
<UML2:DecisionNod Decision X
”Choice Name">
<Decisionrdf:ID =
framework for facilitating interoperability, reuse, and
Merge
e>
<UML2:MergeNode> Merge X
”Decision Name">
<Mergerdf:ID =
compatibility. The assumption behind BOMs is that
”Merge Name"> piece parts of models, simulations, and federations can
Table 2. Construct mapping at implementation level. be extracted and reused as modeling building or
components. The interplay between simulations can be
captured in the form of reusable patterns. The pattern
3. Related Work of interplay is sequence of events between simulation
elements. BOMs capture the representation of the
Woong Kim and Kyong-Ho Lee propose a method pattern. Simulation conceptual model found in BOMs
for “Describing semantic web services: From UML to contain information on how conceptual entities and
OWL-S” [26], they are using XSLT to transform conceptual events, representing real world entities,
activity model into ontology, Table 3 and Table 4 relate or interact with each other in real world. This
shows the comparison of Kim’s method with UAD- information is illustrated in the form of patterns of
OWL method mapping rules at conceptual and interplay and state machines.
implementation level respectively.
4.2. Test Case will be an OWL file which contains output ontology.
The output ontology can be viewed at [24] because of
This section is about the transformation of activity the space limitations.
model for the Target Entity of a Weapon Effects BOM
in to OWL. 5. Conclusion and Future work
4.2.1. State machine of the target entity In this paper, we proposed a solution to problems
of representing behavioral knowledge expressed in
In this case study, the only conceptual entity UML activity diagram as OWL ontology. According to
identified for fulfilling the state machine is the our proposed method, a UML activity diagram is
TargetEntity. The details of a conceptual entity, such modeled in a UML modeling tool. An XMI is exported
as TargetEntity, are defined separately within a BOM. from the tool, which encloses the behavioral
Each state transition is carried out by an exit action. knowledge expressed in a particular UML activity
Details of the exit actions, such as “Weapon Fire diagram. The XMI is the input to XSLT Processor. On
Action”, “Munition Detonation Action”, and “Damage the other hand we have designed target process
State Update Action”, including their dependency on ontology expressed in OWL. This ontology is specially
an event type or BOM to carry out the pattern action, modeled to match the needs of our research.
maybe provided elsewhere in the BOM using the The mapping rules are script in form of XML Style
pattern of interplay template component. sheet Language Transformation XSLT is used to script
the mapping rules in the form of XML. XSLT together
State
Machine
Conceptual
Entity
State
Note
with XMI representation of UML activity diagram is
State Name Exit Condition
Name
Exit Action Next State used as input to the XSLT Processor. The output is
Target
States
Target
Entity
Ready
Under Fire
Weapon Fire Action
Munition Detonation
Under Fire
Impact
Na
Na
OWL ontology expressing the behavior knowledge
Impact
Action
Damage State Update
Detonation
Ready Na
represented by activity diagram.
Detonation Action In future we shall work on other frequently used
Table 5. State machine for target entity. process models like Petri Nets, UML Sequence
Diagram and BPMN (Business Process Modeling
4.2.2. Activity Diagram Notation).

We use “Poseidon for UML PE 5.0.1” for the 6. References


modeling of state machine for Target Entity as mention
in section 4.2.1. [1] “Process Modeling Definition”. Available from:
http://www.cbu.edu/~lschmitt/I351/glossary.htm

[2] “Petri Nets”. Information available from:


http://www.petrinets.info/

[3] Braun et al. “UML Activity model”. Available from:


http://atlas.kennesaw.edu/~dbraun/csis4650/A&D/UM
L_tutorial/activity.htm

[4] Donald Bell. “UML Sequence Diagram”. Available


from:
Figure 2. Weapons’ effect BOM using UML http://www.ibm.com/developerworks/rational/library/3
Activity Diagram. 101.html
Each block identifies a sate, and the message lines
between states represent the pattern action that takes [5] Object Management Group (OMG). “Business Process
Modelling Notation”. Available from:
place, thereby satisfying that exit condition. http://www.bpmn.org/
[6] T. R. Gruber, 1993, A translation approach to portable
4.2.3. Transformation ontologies. KnowledgeAcquisition, 5(2), pp. 199-220.
http://portal.acm.org/citation.cfm?id=173747
After Activity modeling we extract metadata in
form of XMI from Poseidon, then send this XML as [7] Stanislav Ustymenko, 2005, Ontology-Supported
input into XSLT Processor parallel with XSLT Sharing and Reuse of Knowledge in Diverse
Mapping rules. The output of XSLT processor [28] Environments, in Proceedings of the 43rd annual
Southeast regional conference - Volume 2, pp. 347- Available from:
348, Kennesaw, Georgia. http://www.geneontology.org/GO.process.guidelines.sh
tml
[8] W3C Consortium. “Web Ontology Language (OWL)”.
Available from: http://www.w3.org/2004/OWL/ [20] Wongthongtham et al. “Software design process
ontology development” in Meersman, R. and Tari, Z.
[9] Stephen Cranefield. “UML and the Semantic Web”. In and Herrero, P. (ed), 2nd IFIP WG 2.12 & WG 12.4
proceedings of the International Semantic Web International Workshop on Web Semantics (SWWS) in
Working Symposium (SWWS), pages 113-130, 2001. conjunction with OTM 2006, pages 1806-1813,
Montpellier, France, Oct 29 2006. Springer-Verlag,
[10] Baclawski et al. “Extending UML to support ontology USA.
engineering for the semantic web” in the book «UML»
2001 — The Unified Modeling Language. Modeling [21] The GO Consortium. “Gene Ontology”. Available
Languages, Concepts, and Tools, pages 342-360. from: http://www.geneontology.org/

[11] Kabilan, V., Johanneson, P., “UML for ontology [22] Aitken et al. “A Process Ontology”. Springer Berlin /
modeling and interoperability”. Proceeeding of 1st Heidelberg, ISBN: 978-3-540-44268-4, pages 263-270,
INTEROP-EMOI Open Workshop on Enterprise Date: January 01, 2002.
Models and Ontologies for Interoperability, Co
Located with CAiSE, 2004. [23] D. Martin et al. “OWL-S: Semantic Markup for Web
Services”. Available from:
[12] Falkovych et al, 2002, “UML for the Semantic Web: http://www.daml.org/services/owl-s/1.1/overview/
Transformation-based Approaches”. Available from:
http://www.cwi.nl/~media/publications/UML_for_SW. [24] UAD-OWL target ontology figure. Information
pdf. available from:
http://users.utu.fi/moania/Innovation08/
[13] D. Djuric et al “Ontology Modeling and MDA”,
Journal of Object Technology, vol. 4, no. 1, pp. 109- [25] ”Protégé”. http://protege.stanford.edu/
128, 2005. Available from:
http://www.jot.fm/issues/issue_2005_01/article3. [26] Kim et al., “Describing Semantic Web Services: From
UML to OWL-S”. ICWS 2007. IEEE International
[14] Grønmo, R. et al. Transformations between UML and Conference on Web Services. 9-13 July 2007, pp 529-
OWL-S,” Proceedings of the 1st European Conference 536, 2007.
on Model Driven Architecture: Foundations and
Applications, Nuremberg, Germany, pages 269-283, [27] SISO Based Object Model product development group.
2005. “Base Object Model (BOM) Template Specification”.
Available from:
[15] S. Cranefield and M. Purvis, “UML as an ontology www.boms.info/spec/BOM_Specification_v2006_FIN
modeling language”. Proceedings of the Workshop on AL.pdf
Intelligent Information Integration, 16th International
Joint Conference on Artificial Intelligence (IJCAI-99), [28] XSLT Processor XALAN
1999. http://xml.apache.org/xalan-j/

[16] H. Na, O. Choi, J. Lim, “A Method for Building


Domain Ontologies based on the Transformation of
UML Models”, Fourth International Conference on
Software Engineering Research, Management and
Applications (SERA'06) pp. 332-338, 2006.

[17] W3C Consortium. “XML Style sheet Language


Transformation”. Available from:
http://www.w3.org/TR/xslt

[18] Jenz & Partner. “Open Source Business Management


Ontology (BMO)”. Available from:
http://www.bpiresearch.com/Resources/RE_OSSOnt/re
_ossont.htm

[19] The GO Consortium. “Biological Process Ontology”.

You might also like