[IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai,...

5
Flexible Services Composition based on ECA Rule in Grid Yi Wang, Minglu Li, Jian Cao, Feilong Tang Department of Computer Science and Engineering Shanghai Jiao Tong University Shanghai, China {wangsuper, li-ml, cao-jian, tang-fll}cs.sjtu.edu.cn Abstract-Services composition is a way to integrate a group of individual grid services into one more powerful service so that the time and efforts to develop a new application can be reduced greatly. Workflow modeling and enactment is one of the most important methods for service composition. However, the existing approaches do not provide enough functionality to support workflow modeling and enactment for flexible services composition. We have developed a system named ECA (Event-Condition-Action)-rule-based workflow management system (EWMS) for grid services composition. The system architecture is introduced in detail in the paper. An image processing application is used to validate the feasibility and efficiency of the systemn Keywords-services compostioin;ECA rule; workflow modeling; workflow enactment; EWMS I. INTRODUCTION More and more interesting services are moving online and the web is being fast transformed into a service oriented environment, we called as service grid. In service grid, software components are available online in the form of grid services. The emergence of grid technology has led to more interest into grid services composition, which means composing different grid services to a more complex and useful service that can provide new functions to achieve the users' needs. All services developed with different developing tools keep the standard protocols, which makes it possible to integrate them into a common framework. Now, the formidable problem of efficient and effective composition of existing services is the subject catching current attentions [1]. Workflow technology is one of the key technologies for services composition [2]. There have been many ways to define and describe workflow model, such as WFMC define language, RAD graph, EPC model, etc. In this paper, we present an ECA-rule-based workflow management system to enable users to construct and instantiate workflow models for composition of grid services easily. There are at least three good reasons for using ECA rule for Web services workflow modeling and analysis: easily understood by end-users, be able to express complicated logical relationship of Web services, and fits in with graphic realization. The rest of this paper is organized as follows. Next section overviews the related work about our research. Section 3 redefines some basic definitions of ECA rule to meet the need of our system. Section 4 introduces the architecture of our workflow management system EWMS. A demo for services composition is discussed in detail in Section 5. The last Section concludes the whole paper and points out some future works briefly. II. RELATED WORK To date, several approaches have been proposed and investigated to solve the problem of services composition. In this section, we briefly overview the approaches and methods closely related to our work and introduce the evolvement of ECA rule in workflow research. DAML-S [3] is a part of DARPA Agent Markup Language project that aims at making Web services computer- interpretable, which means being described with sufficient information to enable automated services discovery, invocation, aggregation into a process, and execution monitoring. However, DAML-S is a very complex procedural language to implement and deploy. Some people want to use Petri net [4] or extended Petri net [5] to describe the model of services composition. Although Petri net has a solid mathematical basis for specifying and verifying the model of grid services composition, it is difficult to instantiate. On the other side, the industrial world has developed a number of XML-based standards to formalize the specification of Web services, their flow composition and execution. For example, the recently released Business Process Execution Language for Web Services (BPEL4WS) [6] merged of IBM's Web Services Flow Language (WSFL) [7] and Microsoft's XLANG [8]. Some workflow management systems have developed based on BPEL4WS such as BPEL4J by IBM or BPEL Process Manager by Oracle. But we find the function of these utilities is not so good and needs the workflow designers to write too much script, and BPEL4WS is also difficult to implement completely. Event-Condition-Action (ECA) rule is put forward in the research field of active database [9,10]. The rule makes the data repositories react to internal or external events and trigger a chain of activities that includes notifying users and applications or performing data base updates. This process is similar to the business process, so the workflow researchers believed that we

Transcript of [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai,...

Page 1: [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai, China (2007.08.22-2007.08.24)] 2007 Second International Conference on Communications

Flexible Services Compositionbased on ECA Rule in Grid

Yi Wang, Minglu Li, Jian Cao, Feilong TangDepartment of Computer Science and Engineering

Shanghai Jiao Tong UniversityShanghai, China

{wangsuper, li-ml, cao-jian, tang-fll}cs.sjtu.edu.cn

Abstract-Services composition is a way to integrate a group ofindividual grid services into one more powerful service so that thetime and efforts to develop a new application can be reduced greatly.Workflow modeling and enactment is one of the most importantmethods for service composition. However, the existing approachesdo not provide enough functionality to support workflow modelingand enactment forflexible services composition. We have developeda system named ECA (Event-Condition-Action)-rule-basedworkflow management system (EWMS) for grid servicescomposition. The system architecture is introduced in detail in thepaper. An image processing application is used to validate thefeasibility and efficiency ofthe systemn

Keywords-services compostioin;ECA rule; workflow modeling;workflow enactment; EWMS

I. INTRODUCTION

More and more interesting services are moving online andthe web is being fast transformed into a service orientedenvironment, we called as service grid. In service grid,software components are available online in the form of gridservices. The emergence of grid technology has led to moreinterest into grid services composition, which meanscomposing different grid services to a more complex and usefulservice that can provide new functions to achieve the users'needs. All services developed with different developing toolskeep the standard protocols, which makes it possible tointegrate them into a common framework. Now, the formidableproblem of efficient and effective composition of existingservices is the subject catching current attentions [1].

Workflow technology is one of the key technologies forservices composition [2]. There have been many ways to defineand describe workflow model, such as WFMC define language,RAD graph, EPC model, etc.

In this paper, we present an ECA-rule-based workflowmanagement system to enable users to construct and instantiateworkflow models for composition of grid services easily. Thereare at least three good reasons for using ECA rule for Webservices workflow modeling and analysis: easily understood byend-users, be able to express complicated logical relationshipofWeb services, and fits in with graphic realization.

The rest of this paper is organized as follows. Next sectionoverviews the related work about our research. Section 3

redefines some basic definitions of ECA rule to meet the needof our system. Section 4 introduces the architecture of ourworkflow management system EWMS. A demo for servicescomposition is discussed in detail in Section 5. The last Sectionconcludes the whole paper and points out some future worksbriefly.

II. RELATED WORK

To date, several approaches have been proposed andinvestigated to solve the problem of services composition. Inthis section, we briefly overview the approaches and methodsclosely related to our work and introduce the evolvement ofECA rule in workflow research.

DAML-S [3] is a part ofDARPA Agent Markup Languageproject that aims at making Web services computer-interpretable, which means being described with sufficientinformation to enable automated services discovery, invocation,aggregation into a process, and execution monitoring. However,DAML-S is a very complex procedural language to implementand deploy. Some people want to use Petri net [4] or extendedPetri net [5] to describe the model of services composition.Although Petri net has a solid mathematical basis forspecifying and verifying the model of grid servicescomposition, it is difficult to instantiate.

On the other side, the industrial world has developed anumber of XML-based standards to formalize the specificationof Web services, their flow composition and execution. Forexample, the recently released Business Process ExecutionLanguage for Web Services (BPEL4WS) [6] merged of IBM'sWeb Services Flow Language (WSFL) [7] and Microsoft'sXLANG [8]. Some workflow management systems havedeveloped based on BPEL4WS such as BPEL4J by IBM orBPEL Process Manager by Oracle. But we find the function ofthese utilities is not so good and needs the workflow designersto write too much script, and BPEL4WS is also difficult toimplement completely.

Event-Condition-Action (ECA) rule is put forward in theresearch field of active database [9,10]. The rule makes the datarepositories react to internal or external events and trigger achain of activities that includes notifying users and applicationsor performing data base updates. This process is similar to thebusiness process, so the workflow researchers believed that we

Page 2: [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai, China (2007.08.22-2007.08.24)] 2007 Second International Conference on Communications

can take advantage ofECA rule and propose the framework ofECA rule-based workflow [11]. But as some other workflowframeworks, the former framework can't fit the development ofInternet applications based on virtual organizations.

III. RELATED DEFINITIONS FOR ECA RULE

The semantics of ECA rules can be describedstraightforward, that is, when the event occurs (is signaled), thesystem evaluates the specified condition; and, if the conditionis satisfied, the corresponding actions are executed. For thepurpose of using ECA rule in our system, we redefine somebasic definitions ofECA rule.

Definition 1. Event presents a function that map time toboolean value and can be presented as follows:

E: T -{ True ,False}- True, if Event ofE kind happen at time t

E(t) = -

False, others

Event can be differed as atomic event and composite event.

Definition 2. Atomic event means the one that can bedetected directly by the workflow management system. InEWMS, the main type of atomic event includes the change ofthe state of any activity in a workflow process, such as theinitialization, start, end, overtime, abortion and error of anactivity.

Definition 3. A composite event is the composition ofatomic events and other composite events through composingoperators. Two basic composing operators are as follows:

* AND: el AND e2 means el and e2 both happened.

* OR: el OR e2 means at least one of el and e2happened.

Definition 4. Object means workflow control data andworkflow related data, includes four types in EMWS:

* XML document is the input and output XMLdocuments of a Web service method.

Definition 6. Action means the actual operation based onthe navigation of ECA rule. In EWMS, an action means doingan activity.

Definition 7. Activity is a term of workflow. An activity isa software application or a procedure set executed in order toaccomplish a mission. According to the different function, aworkflow commonly has several activity types. In EWMS, wedefined the activity types such as start, end, invoking Webservice, delay, setting value, transferring XML document, etc.

Definition 8. ECA rule is a triple R=<E, C, A>, where E isan event set to trig the rule and events can be atom orcomposite, C is the condition set to reflect the status of thesystem and environment and will be evaluated when the rule istriggered by its event, and A is the action set that is executedwhen the rule is triggered and its condition is satisfied. AnECA rule states that if E happens and the condition set C canbe satisfied then all the actions ofA will be executed [12].

IV. ARCHITECTURE OF EWMS

We have realized an ECA rule-based workflowmanagement system, called EWMS, for composing gridservices. In this section, we will discuss the architecture ofEWMS (see Figure 1).

Monitor Tool

------__S T_ __

Workflow Modeling Tool

Engine Layer

Multi-Agent Platforin

Adapter MiddlewareWeb Service Grid Service -] Database -1 Java ClassAdapter Adapter Adapter Adapter .....

GridFTP DCOM Command Line Globus JobAdapter Adapter Adapter Adapter

Adapter Layer

Grid Middleware

Grid Middleware Layer

* Other document means the documents except the XMLdocument.

* Object variable is the one can be bound with theelement in an document by using a query tree such asXPath.

* Inherent variable can be seemed as independentvariable defined by user in a workflow.

Both object variable and Inherent variable have five types:string, integer, float, double and Boolean.

Definition 5. Condition presents the limitation of therelationship among objects or relationship of objects andconstants defined by processor designer. In general, a conditionpresented by a relation expression with relation operators lookslike >, <, , etc.

AResource Layer

Figure 1. Architecture ofEWMS

EWMS includes six layers: user layer, engine layer, agentlayer, adapter layer, grid middleware layer and resource layer.User layer supply the interfaces for people to design workflowprocesses, enact the engine, and monitor the executing ofengine. Workflow engine receives the invoking requests,creates workflow instances, executing the instances and savesthe executing log to the database for monitoring. Multi-agentplatform can automated discovering, integrating and invokingservices as the user's request. Adapter layer provides variousadapters for different application types in order to hide theinvoking details to the users. Note that this layer includes notonly grid service and Web service adapter, but also some otherapplication adapter such as DCOM adapter, database adapter.

Workflow Enine

/Re-so~urc,,

Page 3: [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai, China (2007.08.22-2007.08.24)] 2007 Second International Conference on Communications

Grid middleware is some related software for using gridresources directly. Resource layer mainly involves but notlimited the service resource in a service grid. We will describetwo components in the architecture in detail.

A. Workflow Modeling ToolIn our approach, we use an ECA rule-based workflow

approach to realize the graphical workflow modeling tool. Thetool is very flexible and easy to use. It supports the drag anddrop to introduce new components to the workflow model. Toassist the user to compose a complicated workflow, a powerfulvalidation mechanism is supported. It can verify the inputinformation on the spot. In order to provide more knowledgesupport of components, the right-click menu is used forshowing the properties of the selected components. The Outputof the modeling tool is saved in database and it can be loadedfrom the database. Figure 2 gives the class view of all the maincomponents and their relationships for ECA-based workflowmodeling. We will show a screenshot of our modeling tool andgive more detail about the classes in section 5.

Figure 2. Class View of ECA-based Workflow

B. Workflow Engine

Web Browser

communicates and transforms data with service layer through aJini network which uses RMI as communication protocol.Every engine service is a Jini service. Jini is a distributedcomputing technique based on Java platform. Compare totraditional Web service technology, A Jini service is dynamic,ad hoc and autonomous. The engine framework based on Jinitechnique has a high stability, scalability and usability.

V. CASE STUDY

In this section, we will use a demo to illustrate how tocompose services through EMWS.

A. Design of Workflow ModelWe demonstrate the process of design of a workflow model

by means of a complex image processing, which needs thesupport from three different image processing services. Reverseservice takes charge of reversing the color of every pixel of animage, Smooth service is used to smooth an image, andSharpen service can sharpen an image. In the implementation,we use an ID number to denote an image. Each imageprocessing service has an input and an output XML documents.The services can get the image ID from an input XMLdocument, read the image from an image repository, processthe image, save the processed image to the repository, andfinally return the processed image ID through an output XMLdocument.

,i

PC or PDA Standard Application CLayenrt

Workf lowServices'

HTTP RMI Local

Web Service Jini Service

Workftow Manager ManagerWorkflow Manager Workf ow Manager Laye

RMJIF

RMT RMT

Service Proxy ce Proxy

Service Implementation tmp lemService Properties rice Proper-

ce Prox

ServLay

ice Properties

Figure 3. Framework ofEWMS Engine

As be shown in Figure 3, workflow manager is provided asa key component, which can be encapsulated with differentforms to satisfy different clients' access requests, such asHTTP, SOAP, RMI and local invoking. Management layer

Figure 4. Image Processing Modelntenter Now, we used the workflow design tool to design a

Jini workflow model for an image processing, as shown in Figure 4.Net The model described the following workflow:

* reverse the color of an image selected by user, usingrice reverse service,

* choose the next Web service according to the user'srequirements,

* process the image which has been processed by reverseservice by smooth service and/or sharpen service, and

* return the final processed image.

Page 4: [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai, China (2007.08.22-2007.08.24)] 2007 Second International Conference on Communications

The right side of Figure 4 is a graphic design panel to showthe workflow model. Icon 9 is the symbol of the activity toinvoke a Web service,M means the activity of setting value toobject, ? means control flow, @, 0 and 0 indicate threedifferent logic nodes, i.e., and-and, and-or , and or-and nodesrespectively.

Logic node acts an important role in our design toolbecause it takes the charge of creating ECA rule, which meansresponding events, judging conditions and deciding actions.We defined four logic node types in our system: and-and node,and-or node, or-and node, and or-or node. In our design tool, acontrol flow must connect an activity and a logic node. We canfind that each logic node has two logic operators. The firstoperator presents the logic relation of the triggering eventsreflecting different states of relevant activities, and the secondone presents the relation of invoked activities. When we draw acontrol flow from an activity to a logic node, the system willask us to choose a triggering event. If we draw a control flowfrom a logic node to an activity in which the second operator is"or"l, we must construct a judging condition to help systemchoose the flow direction. For example, an and-or nodepresents that all triggering events indicate the logic node musthappen to invoke the ECA rule, and the system will judge thecondition defined by the designer to decide the next activity tobe executed. On the contrary, an or-and node presents anytriggering event that indicates the logic node will invoke theECA rule, and all activities that the node indicates must beexecuted.

The left side of Figure 4 is a navigating tree of the model.In the sub-tree of workflow object, we can find followingobjects: six XML document related with the Web services; twoinherent variables-choice means the user's decision of whichtwo services to execute, as well as OutputlmagelD means theID of final processed image; six object variables binding withthe image ID in the six XML document, e.g. InputlmagelDbinds with the image ID in the input XML document of reverseservice-ReverselnputXML through the XPath"/INPUT/PARAMETER/VALUE". In order to transfer theintermediate result, we use setting value activity, e.g. activityRevToSmo set the value of object variable SmoothlnputIDwith the value of ReverseOutputID. Because of the bindingrelationship, the input XML document of smooth service willget the image ID from the output XML document of reverseservice. We also use setting value activity to set the outputimage ID.

B. Instantiating and Result AnalysisWhen finishing the design of the medical image processing

workflow, it can be submitted through user portal to theworkflow engine for running. Figure 5 shows a managementtool for workflow engine. It supports to deploy, start andmonitor workflow engine service and process service. Whenthe workflow request is coming, workflow engine obtains acopy of the workflow model from database and then takescharge of the specific invocation and routing according to ECArules defined in the workflow model.

In the experiment, we use a brain image as the input image,chose two different executing paths of the process shown in

Figure 4, and got different result, so we can find two instancerecords in Figure 5. Figure 6 shows the results of these twoinstances. In The left image is source image, the left image issource image, the middle image is the result when we chooseinvoking Reverse and Smooth services sequently, the right oneis the result when we choose invoking Reverse and Sharpenservices sequently. This experiment validates the feasibility andefficiency of our system.

Figure 5. Screenshot of Engine Monitor

Figure 6. Workflow Enact Result

VI. CONCLUSIONS AND FUTURE WORK

Web service composition provides methods for Web-basedcooperation and receives much attention. We have proposed anECA rule-based workflow model and developed a system toimplement the idea. The experiment results proved thefeasibility of our system.

The system we developed is just a part of a big project. Innear future, we will extend it to compose kinds of applications,including grid services, COM component, agent, etc. We arealso planning to revise our design tool for the use of the agenttechnology.

ACKNOWLEDGMENT

This paper is supported by National Basic ResearchProgram of China (2006CB303000), National Scientific Fundof China (60503041, 60473092 and 90612018), National HighTechnology Research and Development Program of China(2006AA01A124, 2006AA04Z152, and 2006AAOlZ172),ShanghaiGrid grand project of Science and TechnologyCommission of Shanghai Municipality (05DZ15005) andScientific Research Project for Shanghai 2010 World Expo(2005BA908B09).

REFERENCES

[1] Srivastava, B., Koehler, J., "Web service composition-current solutionsand open problems", in Proc of ICAPS 2003 Workshop on Planning forWeb Services, pp. 28-35, 2003.

[2] Dickson K.W. Chiu, Shing-Chi Cheung, Kamalakar Karlapalem, QingLi, Sven Till, "Workflow view driven cross-organizational

Page 5: [IEEE 2007 Second International Conference on Communications and Networking in China - Shanghai, China (2007.08.22-2007.08.24)] 2007 Second International Conference on Communications

interoperability in a web service environment", in Proc ofWES 2002, pp.41-56, 2002.

[3] Ankolekar, A., Burstein, M., Hobbs, J., et al, "DAML-S: web servicedescription for the semantic web", in Proc of ISWC 2002, pp. 348-363,2002.

[4] Hamadi, R., Benatallah, B., "A petri aet-based model for web servicecomposition", in Proc of ADC 2003, Workshop on Planning for WebServices, pp. 191-200, 2003.

[5] Yu Tang, Luo Chen, Kai-Tao He, Ning Jing, "SRN: an extended petri-net-based workflow model for web service composition", in Proc ofICWS 2004, pp. 591-599, 2004.

[6] Andrews, T., Curbera, F., Dholakia, H., et al, "Specification: businessprocess execution language for web services version 1. 1.", Web of IBMCorporation. http: /www.ibm.com/developerworks/library/ws-bpel.

[7] Leymann, F, "Web services fow language (WSFL) version 1.0",http w/www.ibm.com/software/solutions/webservices/pdf/WSFL.pdf

[8] Thatte, S, "XLANG: web services for business process design",http://www.gotdotnet.com/team/xml wsspecs/xlang-c/default.htm.

[9] McCarthy, D. R., Dayal, U., "The architecture of an active databasemanagement system" in Proc. Of ACM-SIGMOD 1989 Int'l Conf.Management of Data, Portland, Oregon, pp. 215-224, 1989.

[10] Dayal, U., Buchmann, A. P., McCarthy, D. R., "Rules are objects too: aknowledge model for an active object-oriented database system", in Proc.of the 2nd Intl. Workshop on Advances in Object-Oriented DatabaseSystem, LNCS 334. Springer-Verlag Berlin Heidelberg, pp. 129-143,1988.

[11] Goh, A., Koh, Y.-K., Domazet, D.S., "ECA rule-based support forworkflows", Artificial Intelligence in Engineering, vol. 15, no. 1, pp. 37-46, 2001.

[12] Jian Cao, Minglu Li, Shensheng Zhang, Qianni Den, "Composing webservices based on agent and workflow", in Proc of GCC2003, LNCS3032. Springer-Verlag Berlin Heidelberg, pp. 948-955, 2003.