III. Complexity Metrics

advertisement
Survey Complexity Metrics for Reusable
Business Process
Kanjan Thammarak
Department of Business Computer, Faculty of Business Administrator,
Bangkok Suvarnabhumi College,
Bangkok, Thailand
Email: Dhammaraksa@gmail.com
Abstract - Reusing is a novel approach for business
process engineering. It can increase value and usability
of existing business processes. The successful of reusing
business processes among various projects, at present,
depends on knowledge and skills of developers. In order
to measure the quality of business process reuse, a
proper metric needs to be developed. Many business
process metrics are available today, however the
purposes of these metrics are to measure aspects such as
complexity, size, and quality. In the authors view,
complexity is an important factor that should be
considered to assess reusable properties of a business
process. The purpose of this paper is to survey some
well known complexity metrics, compare and contrast
their features. The information gains from this survey
can form a basic knowledge to develop an appropriate
reuse metric suit that can be used by business process
developers to improve both quantitative and qualitative
aspects of business process reuse.
I. INTRODUCTION
System development using business process
[1][2][18] is a new development approach that is
now widely used and considered easier than the
traditional coding styles. A business process is a set
of linked activities that are designed to develop
software or services. The main idea of this approach
is to separate a process mechanism from its workflow
and environments (goal, business rule, data, etc.). As
a result, a system is more freely to develop and
maintain, loosely coupled, more supporting to
change, programming languages independent and
closet to the real world operation. Almost all
companies today, however, always implement a
whole new business process when an application is
modified or developed. The major problems to this
approach are the number of business processes will
be increased dramatically moreover some of them
may contain redundant information. This leads to
management decision in term of maintenance cost. If
a company decides to keeps all versions, therefore, it
may waste a lot of spaces to store the duplicate
information and some of these business processes
may never be used again. On the other hand, if the
company decides not to keep some versions, a
question is what version should be kept or discarded.
If a company removes a business process that has
high potential to be reused, the company may need to
pay the cost of re-implementing such a process again
and again. Some groups of business process
researchers try to solve this problem by applying the
software reuse concept to business process reuse.
Some of these researches for examples [3] and [12]
focus on finding the generic business process
component.
Architectural
and
programming
languages aspects are considered in [14] [16] and
[17]. Models for storing and retrieving a business
process are discussed in [22].
In the authors view, however, an appropriate
metric is also needed to judge the reusable
characteristics of a business process. Base on the
authors’ knowledge so far, there is no research that
centers on this issue. Complexity can be considered
an important factor for reusing a business process.
Although many complexity metrics for examples, [7]
[8] [9] [10] [11] are available today, none of them
take reusable aspects into their accounts. This paper,
as the first step for developing a reuse metric suit,
surveys existing complexity metrics, compares and
contrasts their features to gain the information about
the properties that can be chosen to be included in a
reuse metric. The remaining contents of this paper
can be discussed as follows. The second section is
about the related works in the fields of business
process reuse and metrics. The third section presents
survey information on various complexity metrics.
The fourth section is summarization and discussion
on the advantages and disadvantages of each metric
and their features that can be applied to measure
reuse aspects. The final section is the conclusion and
future works.
II. RELATED WORKS
Business process rely on two areas are SOA
[17][22] concept, Business process used as supply
chain for integration and operation services. And, the
business process [8][18] as a building block for
software developer can use it as operation box to
2
push any software artifacts such as requirements
specification, class or component and structure
source code for analysis, designing, coding and
testing software. (This aspect is very flexible
approach for reuse approach).
In current year, the reusing business process
[3][12][14][16][17][22] is a novel approach to
increase value of existing business process that
exploited in new business process development or
other business process. Moreover, this approach can
reduce cost from the business changing and improve
productivity for company. The paper are available in
this area 3 groups are: finding the generic business
process models; Storage and retrieve an existing
business process models; most papers paper in this
group focus on creating repository and defining
query language for retrieve business process such as
repository for Business Processes [22]. and the last
group is the architecture, languages such as Barros
show his idea for use the business process pattern for
reusing knowledge process innovation [14] and etc.
While, metric is standard term of tool to measure
both quantitative and quality for software
development. In business process, the metrics are
available in complexity metrics [7][8][9][10][11],
cohesion and coupling metrics[4][6], quality metrics,
error detection metrics and GQM metrics and etc.
This paper will present metrics both business process
metrics and other software metrics that can be adopt
to reuse business process.
III. COMPLEXITY METRICS
One part of all available metrics in recently years
is to build for measuring complexity of software.
Certainly, there complexity metrics have been used in
reusing too. Because of, the complexity is one factor
in reusable component task to identify complexity
between candidate components. For example, we will
choose component that have lower rate of complexity
than the components that have high complexity rate.
For business process, the complexity metrics is an
early step. Most metrics [7][8][9][10][11] aim to
measure complexity of single product. In this paper
present the complexity metrics both business process
metrics and others that can use in reusing business
process.
A. LOC (Line of code) and other size metrics
LOC (Line of Code) metric is a very simply
metric for measuring size of code. It can be apply for
detecting size and complexity of software. Moreover,
the LOC is a basic metric for other metrics such as
using in error detection and maintenance or to define
reusable metric [21]. LOC metric works by counting
each line of statement. The total line is an indicator
to indicate complexity or size of program. For
Business Process Models [7][8], each activities of
process viewed like a statement of programming.
Thus, an applying LOC metric for BPM is very
simply and more directly are counting total number
of various components in processes. For example, J.
Cardoso [7] defines the LOC metric for business
process model in three sub-metrics are Number of
activities in a process (NOA), Number of activities
and control-flow component in a process (NOAC),
Number of activities, joins, and splits in a process
(NOAJS). Are:
In addition, some size metrics [21] can use:
- NII - Number of incoming invocations:
Counting number of all incoming edges in process.
- NOI - Number of outgoing invocations:
Counting number of all Outgoing edges in process
B. McCabe’s Cyclomatic Complexity
McCabe’s cyclomatic Complexity is one basic
measurement method that applied and represented in
business process model by [7] and [10]. This method
is to relate to the counting number of control flow of
program and represent it with graph. The definition
of McCabe’s cyclomatic is to calculate the number of
linearly independent paths in a program. For each
module is to be e − n + 2, where e is the number of
edges that represent transfer of control between
nodes (Both ingoing and outgoing paths) and n is the
number of nodes. For example, if one program has
14 edges and 11 nodes then this program have
complexity is 14-11+2=5. a low of cyclomatic
number is means the program is easy to understand
and modify even, a high cyclomatic number is
indicates to the difficult of program. For business
process can adopted this metric directly. While, node
is applied to activities and edges is flow between
activities. For example one ordering process has 10
edges and 8 activities. The complexity of this
program is 10-8+2= 4. Certainly, process that has
low cyclomatic number will be chosen.
C. The CFC Metric
Control-flow Complexity (CFC) metric created by
J. Cardoso. It’s like a McCabe’s cyclomatic
complexity metric but more appropriate and can
evaluate with business process than MCC metric.
These approaches based on calculating the various
control flow type in business process model are
XOR-splits are any n outgoing arcs that have an
exactly one from n paths must taken. , OR-splits have
n outgoing arcs and 2n−1 possibilities path will be
executed., and AND-splits is all outgoing arcs from
an AND-split must be processed and choose one arc
of all results. The formula of this metric is a simple
formulate by counting number of all sprit types,
where P is a process and a is an activity.
3
Figure 2. CFC metric [7]
The next researches of the CFC metric are finding
a powerful method that can assign appropriate weight
for nested and non- nested flow that harder to
understand. From this problem, may can solve by
using cognitive complexity of Volker Gruhn and Ralf
Laue
D. Cognitive Complexity for Business Process
Volker Gruhn and Ralf Laue present “Adopting
the Cognitive Complexity Measure for Business
Process Models” [6]. The purpose of this paper is to
present a new metric which can support the
measuring complexity of control flow structure in
business process model (include nested structure).
Cognitive complexity is metric that apply from
cognitive weight of Shao and Wang and integrate to
CFC metric.This metric start its operation in software
component by assigning weight for each component
of control structure e.g. user define function,
exception, if branch, for and while loop and etc. For
business process model, the cognitive complexity
metric is the summation of the cognitive weights of
its elements. Each business process will be assumed
as a building blocks and modeled in a graphic form
such as BPMN [2] Petri Net UML Activity Diagram
YAWL (In this paper using YAWL model). An
assignment of cognitive weight of BP control flow
will be mapped directly to cognitive weight of
software control structure. For example, sequences
flow in a BPM is mapping to a sequence in a piece of
software. Follow as table 2
Table 2 Weight for BPM Control structure for Business
process [6]
BPM control structure
W
Sequence steps
XOR-split/join (exactly one of two branches
is chosen)
XOR-split/join (exactly one of ≥ 3 branches
is chosen)
An AND-split/join or parallel flow (all
branches is chosen)
OR-split/join ( ≥ 2 branches is chosen )
1
2
Composite task (subtask, can be used for
decomposing a BPM into modules)
Multiple Instance Activity (multiple
instances of an activity can run
concurrently)
Cancellation (by activating an activity one
deactivates another one)
Cancellation (by activating an activity one
deactivates all elements within another part
of the model)
2
3
4
7
6
1
2 or 3
However, the concerning nested process
complexity is an important problem of control flow.
An interesting approach is DCT in OO metrics is one
choice that should be analyzed in next time.
E. The Halstead Complexity Metric
The Halstead metric is a composite measure of
software complexity. These measures concentrate in
a function of program operands (variables and
constants) and operators (arithmetic operators and
keywords which can change the control-flow). For
business process, this metric will be modified as:
- n1 = the number of unique activities, splits and
joins and control-flow elements (sequence, switch,
while, etc. in BPEL) of a business process.
- n2 = the number of unique data variables that are
manipulated by the process and its activities.
- N1 = total number of n1
- N2 = total number of n2
From the Halstead primitive process metric can
applies to Halstead-based Process Complexity (HPC)
measures for estimating process length, volume, and
difficulty by:
– Process Length: N = n1*log2(n1) +
n2*log2(n2)
– Process Volume: V = (N1+N2)*log2(n1+n2)
– Process Difficulty: D = (n1/2)*(N2/n2)
A low-high complexity rate is an indicator for
selecting reusable business process component. In
addition, this measure has more simple to calculate
and usually for predicting error and maintenance rate
for reusing business process.
F. Fan-in Fan-Out Metric
Henry and Kafura [12] present a metric that
measures the information flow in a software
structure. This technique is identifying the number of
local information is entering to a module (fan-in) and
the number of local information is leaving from a
module (fan-out). The complexity of a procedure
(PC) is:
PC = Length * (Fan-in * Fan-out)2
PC is used to establish module (Procedure in data
structure) complexities. Adapting this metric to
support business process measurement can separate
into two steps are finding lengths of activities by
assume the each activities as a black box or white
box and calculate it lengths. While:
-if activities are black box is to have only one
interface length is 1
-if activities are white box then length is based on
its source code that can use existing metrics (LOC
and MCC).
4
And second step is to find interface complexity
(IC) is concentrate in inputs (fan-in) and outputs
(fan-out) of activities. Defined as:
IC = Length * (number of inputs * number of
outputs)2
This metric can support data-driven processes
approach, predict the prior to coding during the
design phase and the modeling abstraction level in
business process model (BPMN) [bpms spec].
However, if an activity not have interaction to other
activities then this metric can not to find complexities
(complexities = 0)
G. Adopting use case metric for business use case
In 2000 J. García at el.[8] presents a new diagram
for business process by applying UML-Use case
diagram. A business use case diagram defined for
each business process. Use case activities represent
process activity in business process model. Use case
boundary can use as an organization or scope.
Business process Actor may be a person, system, or
other processes. Moreover, some use case description
format can describe more information such as
business rule/condition, goal, exception and etc. in
business process modeling. This research can help to
model business process and the transforming from
requirement to executing business process more
smoothies. For today, it not has a directly metric for
business use case even it can help to predict and
estimate business process project at early time.
However, we can adopt some existing use case
metrics for measuring. For example, the metrics–
based approach for use case of Beatriz Bernárdez at
el that shows in table 2.
Table 2. Metric for use case
Metric
Description
Number of steps of the use case
NOS
(NOS=NOAS*+NOSS*+NOUS)
Number of actor action steps of
NOAS*
the use case
Number of system action steps of
NOSS*
the use case
Number of sub-use case, inclusion
NOUS
and extensions action steps
Number of conditional steps of
NOCS
the use case
Number of exceptions of the use
NOE
case
Rate of actor action steps of the
NOAS_RATE*
use case (NOAS/NOS)
Rate of system action steps of the
NOSS_RATE*
use case (NOSS/NOS)
Rate of use case action steps of
NOUS_RATE
the use case (NOUS/NOS)
CC
Cyclomatic complexity of the use
case (NOCS+NOE+1)
IV. CONCLUSION AND FUTURE WORKS
An appropriate reuse metric can help selecting
high potential reusable business processes from their
candidates. Complexity metrics, if apply properly can
be used in the context of business process reuse. Our
on going research is to apply the knowledge gains
from this paper to develop an appropriate reuse
metric suit for business process.
References
[1] Business Process, Available :
www.wikipedia.org.
[2] Business Process Management Initiative
(BPMI), “Business Process Modeling Notation
(BPMN)”, Version 1.0 - May 3, 2004, Available:
www.omg.org.
[3] Hafedh Mili, Guitta Bou Jaoude, Éric Lefebvre1
and Guy Tremblay, “Going beyond MDA:
Business Process Modeling for Software
Reuse”,OOPSLA'2004, Canada, 2004, pp1-15.
[4] H.A. Reijers, “A Cohesion Metric for the
Definition of Activities in a Workflow Process”,
Proceedings EMMSAD, 2003, pp. 116-125.
[5] Hironori Washizaki, Hirokazu Yamamoto and
Yoshiaki Fukazawa, “A Metrics Suite for
Measuring Reusability of Software Components”,
Proceedings of the Ninth International Software
Metrics Symposium,2003,pp. 211- 223.
[6] Irene Vanderfeesten, Jorge Cardoso, Hajo A.
Reijers, “A weighted coupling metric for business
process models”, Proceedings of the CAiSE'07
Forum at the 19th International Conference on
Advanced Information Systems Engineering,
Norway, 2007. pp. 41-44.
[7] J. Cardoso, J. Mendling, G. Neumann, and H.A.
Reijers,” A Discourse on Complexity of Process
Models (Survey Paper)”, BPM 2006 Workshops,
LNCS 4103, Springer-Verlag Berlin Heidelberg
2006, pp. 115–126.
[8] J. García Molina, M. José Ortín, Begoña Moros,
Joaquín Nicolás, and Ambrosio Toval, “Towards
Use Case and Conceptual Models through
Business Modeling”, ER2000 Conference, LNCS
1920, Springer-Verlag Berlin Heidelberg, 2000,
pp. 281-294.
[9] Jorge Cardoso, “Control-flow Complexity
Measurement of Processes and Weyuker’s
Properties”, 6th International Enformatika
Conference. Transactions on Enformatika, Systems
Sciences and Engineering, Vol. 8, Hungary, 2005,
pp. 213-218.
[10] Jorge Cardoso, “Process control-flow complexity
metric: An empirical validation”, IEEE
International Conference on Services Computing
(SCC'06), 2006, pp. 167-173.
[11] Jorge Cardoso, “Approaches to Compute
Workflow Complexity”, Dagstuhl Seminar
Proceedings 06291 The Role of Business
Processes in Service Oriented Architectures,
Germany, 2006, pp.1-15.
5
[12] Jorge Cláudio Cordeiro Pires Mascena, Eduardo
Santana de Almeida, Sílvio Romero de Lemos
Meira, “A Comparative Study on Software Reuse
Metrics and Economic Models from a Traceability
Perspective”, Information Reuse and Integration,
IEEE International Conference, 2005,pp. 72-77.
[13] Nael SALMAN, “Complexity Metrics as
Predictors of Maintainability and Integrability of
Software components”, Journal of Arts and
Sciences, 2006, pp. 39-50.
[14] Oscar Barros, “Business Process Patterns and
Frameworks: Reusing Knowledge in Process
Innovation”, Business Process Management
Journal, Volume 13, 2007 , pp. 47-69.
[15] Pablo Rossi and George Fernandez, “Definition
and Validation of Design Metrics for Distributed
Applications”, Proceedings of the Ninth
International Software Metrics Symposium
(METRICS’03), 2003, pp. 124- 132.
[16] Sergiy Zlatkin and Roland Kaschek, “Towards
Amplifying Business Process Reuse ”, ER
Workshops 2005, LNCS 3770, Springer-Verlag
Berlin Heidelberg , 2005, pp. 364–374.
[17] Souvik Barat, Vinay Kulkarni, D Janakiram, “A
safety criterion for reusing a business process in
the desired integrated process”, IEEE
International Conference on Services Computing
(SCC'06), 2006, pp. 381-389.
[18] Tomoyuki Arao, Eiji Goto, Tomoko Nagata,
“Business Process Oriented Requirements
Engineering Process”. Proceedings of the 2005
13th IEEE International Conference on
Requirements Engineering (RE’05), 2005, pp.
395- 399.
[19] Woei-Jiunn Tsaur, Shi-Jinn Horng, “A new
generalized software complexity metric for
distributed programs ”, Information and
Software Technology 40, 1998, pp. 259-269.
[20] Zhilei Ma, Branimir Wetzstein, Darko Anicic,
Stijn Heymans, Frank Leymann, “Semantic
Business Process Repository”, Proceedings of the
Workshop on Semantic Business Process and
Product Lifecycle Management (SBPM 2007) in
conjunction with the 3rd European Semantic
Web Conference (ESWC 2007), Austria ,july
2007, pp92-100.
Download