Академический Документы
Профессиональный Документы
Культура Документы
First A. Jiju P, Second B. Amith Hariharan, Third C. Prashobh Balakrishnan, Fourth D. Vijith K, Fifth E.
Manas Kumar Singh, and Sixth F. Vivek R Nath
Abstract— This paper aims at designing a conceptual model for part of cooperative workflow systems to ensure consistencies
inter organizational cooperative workflows based on Bonita among the various shared results and synchronization among
workflow model. Even though many workflow models have been the activities sharing some results and should check for the
proposed in the literature, Most of the models lack a sound deadlock deadlock and should recover from it.
detection and recovery mechanism. In virtual enterprise scenario To ensure coordination and cooperation between various
where parallel activities from various participating organizations inter organizational activities, we have adopted a conceptual
collaboratively work on accomplishing a common goal, there is often
a chance for occurrence of dead lock. In this context, an algorithm for
model of inter-organizational cooperative workflows proposed
detecting possible deadlocks and recovering from it is designed in in [1] which is based on Bonita model. Bonita [2], is open
this paper. This paper also details the various modifications done to source workflow software from Object Web consortium,
the Bonita work flow model so as to incorporate the newly designed which supports cooperation, though it has been mainly used
algorithm. for traditional applications. Still this model does not have a
provision for deadlock detection and recovery. We are
Keywords— workflow model, cooperative workflow, Inter- modifying this model to incorporate deadlock detection and
Organizational workflows, deadlock, Bonita. recovery technique into it.
Rest of this paper is organized as follows. Section II
I. INTRODUCTION explains Proposed Cooperative Workflow Model, section III
The boom in Internet and distributed computing describes Modified version of the Transaction Protocol [8,9]
technologies has helped the business organization to conduct which maintains consistency among the activities of various
business over the Internet. Workflow management systems are business organizations, section IV details Deadlock Detection
widely used to manage business in distributed environment. and Recovery mechanism, section V gives Algorithm for
Workflow management systems play an immense role in this deadlock detection and Recovery and section VI concludes the
inter-organizational collaboration to automate the participating paper followed by references.
business process.
When two or more organizations come together over the II. COOPERATIVE WORKFLOW MODEL
internet and work together for a common mission, a high Cooperative workflow model allows the activities to share
degree of cooperation and coordination among the various their intermediate results not only at the beginning or end, but
participating business activities and members are unavoidable also in the middle of execution. In an inter-organizational
which may lead to deadlock among the participating activities. scenario, where activities from different organization may
A cooperative workflow can be defined as a workflow in work collaboratively on some common task/project, there
which activities executing in parallel can share some should be a proper cooperation mechanism underlying the
intermediary results along with resources during execution. In model. Here we adopted the conceptual model of inter
the inter-organizational environment, the participating organisational cooperative workflow [1], and modified it to
Manuscript received September 20, 2010. An Algorithmic Approach for add some more states.
Deadlock Detection and Recovery in Inter Organizational Cooperative Different stages of life cycle of an the activity are explained
Workflows below.
F. A. Jiju P is with MEA Engineering College, Perinthalmanna, india Initial: In this state, an activity waiting for some processing
(94978100114; e-mail: jijupnair2000@ yahoo.co.in).
S. B. Amith hariharan, was with MEA Engineering College, to be completed before being ready to run. In the case of
Perinthalmanna, india (e-mail: amithhariharan@gmail.com). normal activities, at least one of the parent activities is still
T. C. Prashobh Balakrishnan, was with MEA Engineering College, executing. In the case of anticipatable activities, if at least one
Perinthalmanna, india (9496364549,e-mail:prashobh.e@gmail.com). of the parent activities has not yet started.
F. D Vijith K, was with MEA Engineering College, Perinthalmanna,
india(email: vijithk999@gmail.com). Ready: Activity is ready to start. There are two possible
F. E Manas Kumar Singh was with MEA Engineering College, situations for this state to occur. In the first situation, an
Perinthalmanna, india(email: manassingh64@gmail.com). activity has no parent activity (this is the first activity of the
F. F Vivek R Nath was with MEA Engineering College, Perinthalmanna,
india(email: vivekrnad@gmail.com).
INITIAL
P3
6. Activities involved in a cyclic dependency graph form a
group.
Fig.2 A Normal deadlock involving three activities
7. A group-member activity can start a group completion by deadlock, we introduce a new method called as dummy
trying to complete it. The complete operation in this case activity method. As per this algorithm we create a replica of
produces a set of potentially final results and changes the an activity which is termed as initiator activity (an activity
state of the activities from executing to ready to complete which starts cycle termination process), which is in the
(RTC). Deadlocked state. Once the dummy activity is created, the
states of all the group member activities will be changed to
8. When a group-member activity tries to complete and all DeadlockRecovery state and the procedure will freeze the
the other group-members are in the RTC state, then all the
activities are completed simultaneously. P1
D.P1
IV. DEADLOCK DETECTION AND RECOVERY initiator activity. An input for the initiator activity is given to
In computer science, deadlock refers to a specific the dummy activity which will start to run and produce some
condition when two or more processes are each waiting for results, then output produced by the initiator activity will be
each other to release a resource, or more than two processes compared against the pattern which we already defined and
are waiting for resources in a circular chain. Deadlock is a stored as part of the expected inputs of next activity. Then the
common problem in multiprocessing where many processes second activity will continue the same and finally the activity
share a specific type of mutually exclusive resource known as to which initiator activity is dependant will produce its final
a software lock or soft lock. Computers intended for the time- result. Now this result will be given to initiator activity after
sharing and/or real-time markets are often equipped with unfreezing it and which in turn will trigger the group
a hardware lock (or hard lock) which guarantees exclusive completion.
access to processes, forcing serialized access. Deadlocks are In Figure 2, we have a normal dead lock situation with three
particularly troubling because there is no general solution to concurrent activities p1, p2, and p3. They could run to
avoid (soft) deadlocks. completion only if any of the deadlocked activity produces its
This situation may be like two people who are final result. A copy of the activity p1 will be created and
drawing diagrams, with only one pencil and one ruler between assume an input is given to the dummy activity D.P1 as shown
them. If one person takes the pencil and the other takes the in the figure 3.
D.P1 P1
P2
P3
Using that input the activity will run and produce an activity. Set of activities present in cyclic graph is output of
output which is given to activity p2 as its input according to cycleDetector procedure.
that p2 will produce some results consequently the others and Fig.4. Replace P1 with D.P1 and freeze P1
we keep these out puts in to a buffer. As per the algorithm, a
stack will be kept which will store the predefined output of Procedure cycleDetector()
each process.
Input : Digraph G, Activity1, Activity2.
We compare each output with these patterns and check the
correctness of the process. Then initiator will be given the Output : A set of vertices CycleSet.
output produced by the activity P3 and the group termination
will be occurred. The figures show how it can be recovered
from a deadlocked situation. marked[1..n] : boolean array used for marking whether a node
7: Deadlock-2; 6. end if
11: if one Executing state & others are RTC 10: end if
state then 11: else if done[w]! = TRUE then
12: request for group completion; 12: if done[Activity2] != TRUE then
13: end if 13: add w to CycleSet;
14: end if 14: done[w] = TRUE;
15: end if 15: end if
16: end if 16: end if
A flowchart for procedure deadlockHandle is shown in Fig-3 17: end for
which gives more clear description about the main role of
deadlock handling procedure. 18: if done[Activity2] != TRUE then
A. Procedures for deadlock Handle 19: remove Activity1 from CycleSet;
Here cycleDetector and groupCompletion procedure are 20: end if
played supporting role for deadlockHandle procedure.
21: done [Activity1] = TRUE;
B. Cycle Detection
22: return CycleSet.
In cycleDetector procedure, Depth First Search (DFS)
algorithm is used for detecting cyclic dependency. Digraph, Start
Activity1 and Activity2 are the inputs for cycleDetector. At
beginning parameters Activity1 & Activity2 are set to same
Detect Cy
C. Request for Group Completion Output : Modified Digraph G.
groupCompletion procedure will remove the cyclic 1: if Activity1& Activity2 ∈ G then
dependency from the Digraph. Digraph and Activity1 are the
2: remove an edge between Activity1 &Activity2;
inputs for groupCompletion procedure.
3: else End
Procedure groupCompletion()
4: abort the request;
Input : Digraph G, Activity1.
t 5: end if
Output : Modified Digraph G.
Procedure addVertex()
Input : Digraph G, Activity1.
1: allRTC=TRUE;
Output : Modified Digraph G.
2: if Activity1 ∈ G then
1: if Activity1 ∉ G then
3: if Activity1 ∈ any cycle of G then
2: add Activity1 in G;
4: CycleSet = CycleDetector(G, Activity1);
3: associate time stamp TActvity1for that activity;
5: while vi ∈ CycleSet do 4: else
6: if vi ! = RTC then 5: abort the request;
7: allRTC = FALSE; 6: end if
8: end if
9: end while Procedure removeVertex()
10: if allRTC = TRUE then Input : Digraph G,Actvity1.
11: Initiator=findInitiator (G, CycleSet); Output : Modified Graph G.
Some extra procedures like addEdge, removeEdge, addVertex Input: Diagraph G, Set of activities CycleSet.
and removeVertex are also used. Digraph, Activity1 and Output: Initiator Activity.
Activity2 are the inputs for addEdge and removeEdge. But ∈ CycleSet
only Digraph and Activity1 are the inputs for addVertex and 1: for all vi , vj
removeVertex procedure. 2: If T vi> T vj then
Procedure addEdge()
3: Initiator=Vi
Input : Digraph G, Activity1, Activity2.
4: else
Output : Digraph G with new vertices.
5: Initiator=Vj
Output: null
1: Make the egde (vi, vj) active
2: end Procedure
VI. CONCLUSION
Lot of research is going on in the area of workflow
technology, as it has become an essential part of the business
organizations. Emphasis is given to design and incorporate
deadlock detection and recovery algorithm into the traditional
workflow model to provide a deadlock free environment
having flexibility and cooperation in inter organizational
workflow models. The cooperative workflow model, which
we proposed here, releases the burden of the user by
automatically recovering from the deadlock. We successfully
incorporated algorithm and verified.
REFERENCES
[1] Annappa, Dr.K.Chandrasekaran, K C Shet, “A Conceptual
Model of an Inter-Organizational Cooperative Workflow
“,International jouranl of Coimbatore Instistute of Information
Technology ,July 2009.