A Petr Net-based Mdel fr Web Servce Cmpstn Rachd Hamad Bualem Benatallah Schl f Cmputer Scence and Engneerng The Unversty f New Suth Wales Sydney NSW 2052, Australa {rhamad,bualem}@cse.unsw.edu.au Abstract The Internet s gng thrugh several majr changes. It has becme a vehcle f Web servces rather than just a repstry f nfrmatn. Many rganzatns are puttng ther cre busness cmpetences n the Internet as a cllectn f Web servces. An mprtant challenge s t ntegrate them t create new value-added Web servces n ways that culd never be freseen frmng what s knwn as Busness-t-Busness (B2B) servces. Therefre, there s a need fr mdelng technques and tls fr relable Web servce cmpstn. In ths paper, we prpse a Petr net-based algebra, used t mdel cntrl flws, as a necessary cnsttuent f relable Web servce cmpstn prcess. Ths algebra s expressve enugh t capture the semantcs f cmplex Web servce cmbnatns. Keywrds: Web servces, Petr net, Web servce cmpstn. 1 Intrductn In rder t survve the massve cmpettn created by the new nlne ecnmy, many rganzatns are rushng t put ther cre busness cmpetences n the Internet as a cllectn f Web servces fr mre autmatn and glbal vsblty. The cncept f Web servce has becme recently very ppular, hwever, there s n clear agreed upn defntn yet. Typcal examples f Web servces nclude n-lne travel reservatns, prcurement, custmer relatnshp management (CRM), bllng, accuntng, and supply chan. In ths paper, by Web servce (r smply servce) we mean an autnmus sftware applcatn r cmpnent,.e., a semantcally well defned functnalty, unquely dentfed by a Unfrm Resurce Lcatr (URL). The ablty t effcently and effectvely share servces n the Web s a crtcal step twards the develpment f the new nlne ecnmy drven by the Busness-t-Busness (B2B) e-cmmerce. Exstng enterprses wuld frm allances and ntegrate ther servces t share csts, sklls, and resurces n fferng a value-added servce t frm what s knwn as B2B servces. Brefly stated, a B2B servce s a cnglmeratn f mstly utsurced servces wrkng n tandem t acheve the busness gals f the desred enterprse. An example f an ntegrated B2B servce s a fnancal management system that uses payrll, tax preparatn, and cash management as cmpnents. The cmpnent servces mght all be utsurced t busness partners. Cpyrght c 2003, Australan Cmputer Scety, Inc. Ths paper appeared at Furteenth Australasan Database Cnference (ADC2003), Adelade, Australa. Cnferences n Research and Practce n Infrmatn Technlgy, Vl. 17. Xafang Zhu and Klaus-Deter Schewe, Ed. Reprductn fr academc, ntfr prft purpses permtted prvded ths text s ncluded. T date, the develpment f B2B servces has been largely ad-hc, tme-cnsumng, and requrng enrmus effrt f lw-level prgrammng (Benatallah, Medjahed, Buguettaya, Elmagarmd & Beard 2000, Benatallah, Dumas, Sheng & Ngu 2002). Ths task wuld bvusly be tedus and hardly scalable because f the vlatlty and sze f the Web. As servces are mst lkely autnmus and hetergeneus, buldng a B2B servce wth apprprate nter-servce crdnatn wuld be dffcult. Mre mprtantly, the fast and dynamc cmpstn f servces s an essental requrement fr rgansatns t adapt ther busness practces t the dynamc nature f the Web. As pnted ut befre, Internet and Web technlges have pened new ways f dng busness mre cheaply and effcently. Hwever, fr B2B e-cmmerce t really take ff, there s a need fr effectve and effcent means t abstract, cmpse, analyze, and evlve Web servces n an apprprate tme-frame. Ad-hc and prpretary slutns n the ne hand, and lack f a canncal mdel fr mdelng and managng Web servces n the ther hand, have largely hampered a faster pace n deplyng B2B servces. Current technlges based n Unversal Descrptn, Dscvery, and Integratn (UDDI) 1, Web Servce Descrptn Language (WSDL) 2, and Smple Object Access Prtcl (SOAP) 3 d nt realze cmplex Web servce cmbnatns, hence prvdng lmted supprt n servce cmpstn. SOAP s a standard fr exchangng XML-frmatted messages ver HTTP between applcatns. WSDL s a general purpse XML language fr descrbng what a Web servce des, where t resdes, and hw t nvke t. UDDI s a standard fr publshng nfrmatn abut Web servces n a glbal regstry as well as fr Web servce dscvery. In ths paper, we prpse a Petr net-based algebra fr mdelng Web servces cntrl flws. The mdel s expressve enugh t capture the semantcs f cmplex servce cmbnatns and ther respectve specfctes. The btaned framewrk enables declaratve cmpstn f Web servces. We shw that the defned algebra caters fr the creatn f dynamc and transent relatnshps amng servces. The remander f ths paper s rganzed as fllws. Web servce mdelng and specfcatn usng Petr nets are presented n Sectn 2. Sectn 3 s devted t the algebra fr cmpsng Web servces and ts Petr net-based frmal semantcs. Sectn 4 dscusses the analyss and verfcatn f Web servces. Sectn 5 gves a bref vervew f related wrk. Fnally, Sectn 6 prvdes sme cncludng remarks. 1 http://www.udd.rg/. 2 http://www.w3.rg/tr/wsdl/. 3 http://www.w3.rg/tr/sap12-part1/.
2 Web Servces as Petr Nets Petr nets (Petr 1962, Petersn 1981) are a wellfunded prcess mdelng technque that have frmal semantcs. They have been used t mdel and analyze several types f prcesses ncludng prtcls, manufacturng systems, and busness prcesses (Aalst 1999). A Petr net s a drected, cnnected, and bpartte graph n whch each nde s ether a place r a transtn. Tkens ccupy places. When there s at least ne tken n every place cnnected t a transtn, we say that the transtn s enabled. Any enabled transtn may fre remvng ne tken frm every nput place, and depstng ne tken n each utput place. Fr mre elabrate ntrductn t Petr nets, the reader s referred t (Murata 1989, Resg 1985, Petersn 1981). The use f vsual mdelng technques such as Petr nets n the desgn f cmplex Web servces s justfed by many reasns. Fr example, vsual representatns prvde a hgh-level yet precse language whch allws t express and reasn abut cncepts at ther natural level f abstractn. A Web servce behavr s bascally a partally rdered set f peratns. Therefre, t s straghtfrward t map t nt a Petr net. Operatns are mdeled by transtns and the state f the servce s mdeled by places. The arrws between places and transtns are used t specfy causal relatns. We can categrse Web servces nt materal servces (e.g., delvery f physcal prducts), nfrmatn servces (create, prcess, manage, and prvde nfrmatn), and materal/nfrmatn servces, the mxture f bth. We assume that a Petr net, whch represents the behavr f a servce, cntans ne nput place (.e., a place wth n ncmng arcs) and ne utput place (.e., a place wth n utgng arcs). A Petr net wth ne nput place, fr absrbng nfrmatn, and ne utput place, fr emttng nfrmatn, wll facltate the defntn f the cmpstn peratrs (see Sectn 3.2) and the analyss as well as the verfcatn f certan prpertes (e.g, reachablty, deadlck, and lveness). At any gven tme, a Web servce can be n ne f the fllwng states: NtInstantated, Ready, Runnng, Suspended, r Cmpleted (smlar t the nes defned n (Schuster, Gergakpuls, Cchck & Baker 2000)). When a Web servce s n the Ready state, ths means that a tken s n ts crrespndng nput place, whereas the Cmpleted state means that there s a tken n the crrespndng utput place. Defntn 2.1 (Servce Net) A servce net s a labeled Place/Transtn net,.e., a tuple SN = (P, T, W,,, l) where: P s a fnte set f places, T s a fnte set f transtns representng the peratns f the servce, W (P T ) (T P ) s a set f drected arcs (flw relatn), s the nput place wth = {x P T (x, ) W } =, s the utput place wth = {x P T (, x) W } =, and l : T A {τ} s a labelng functn where A s a set f peratn names. We assume that τ / A and dentes a slent peratn. The flw relatn W can als be nterpreted as a functn W : (P T ) (T P ) {0, 1}. We wll use bth nterpretatns thrughut ths paper. Slent peratns are transtn frngs that cannt be bserved. They are used t dstngush between external and nternal behavr f the servce. Nte that the servce net, defned abve, s an rdnary Petr net, that s, there s at mst ne drected arc lnkng a place t a transtn r a transtn t a place. We gve nw a frmal defntn f a Web servce. Defntn 2.2 (Web Servce) A Web servce s a tuple S = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the servce, used as ts unque dentfer, Desc s the descrptn f the servce prvded. It summarzes what the servce ffers, Lc s the server the servce s lcated n, URL s the nvcatn f the Web servce, CS s a set f ts cmpnent servces. If CS = {N ames} then S s a basc servce. Otherwse S s a cmpste servce, and SN = (P, T, W,,, l) s the servce net mdelng the dynamc behavr f the servce. The place s cnsdered as the ntal markng f the servce S (.e., nly cntans a tken). The executn f S starts when a tken s n the place and termnates when a tken reaches the place. 3 Cmpsng Web Servces A Web servce has a specfc task t perfrm and may depend n ther Web servces, hence beng cmpste. Fr example, a cmpany that s nterested n sellng bks culd fcus n ths aspect whle utsurcng ther aspects such as payment and shpment. The cmpstn f tw r mre servces generates a new servce prvdng bth the rgnal ndvdual behavral lgc and a new cllabratve behavr fr carryng ut a new cmpste task. Ths means that exstng servces are able t cperate althugh the cperatn was nt desgned n advance. Servce cmpstn culd be statc (servce cmpnents nteract wth each ther n a pre-negtated manner) r dynamc (they dscver each ther and negtate n the fly). In ths sectn we present an algebra that allws the creatn f new value-added Web servces usng exstng nes as buldng blcks. Sequence, alternatve, teratn, and arbtrary sequence are typcal cnstructs specfed n the cntrl flw. Mre elabrate peratrs, dealt wth n ths paper, are parallel wth cmmuncatn, dscrmnatr, selectn, and refnement. We als gve a frmal semantcs t the prpsed algebra n terms f Petr nets as well as sme nce algebrac prpertes. 3.1 Web Servce Algebra We descrbe belw the syntax and nfrmal semantcs f the servce algebra peratrs. The cnstructs were chsen t allw cmmn and advanced Web servce cmbnatns. The set f servces can be defned by the fllwng grammar n BNF-lke ntatn: S ::= ε X S S S S S S µs S C S (S S) S [S(p, q) : S(p, q)] Ref(S, a, S) where: ε represents an empty servce,.e, a servce whch perfrms n peratn. X represents a servce cnstant, used as an atmc r basc servce n ths cntext.
S 1 S 2 represents a cmpste servce that perfrms the servce S 1 fllwed by the servce S 2,.e., s an peratr f sequence. S 1 S 2 represents a cmpste servce that behaves as ether servce S 1 r servce S 2. Once ne f them executes ts frst peratn the secnd servce s dscarded,.e., s an alternatve (r a chce) peratr. S 1 S 2 represents a cmpste servce that perfrms ether the servce S 1 fllwed by the servce S 2, r S 2 fllwed by S 1,.e., s an unrdered sequence (r an arbtrary sequence) peratr. µs represents a servce that perfrms a certan number f tmes the servce S,.e., µ represents an teratn peratr. S 1 C S 2 represents a cmpste servce that perfrms the servces S 1 and S 2 ndependently frm each ther wth pssbltes f cmmuncatn ver the set C f pars f peratns, that s, C s a parallel peratr wth cmmuncatn. (S 1 S 2 ) S 3 represents a cmpste servce that wats fr the executn f ne servce (amng the servces S 1 and S 2 ) befre actvatng the subsequent servce S 3,.e., s a dscrmnatr peratr. Nte that S 1 and S 2 are perfrmed n parallel and wthut cmmuncatn. [S 1 (p 1, q 1 ) : S n (p n, q n )] s a cmpste servce that dynamcally selects ne servce prvder amng n avalable servces S 1,, S n and executes t. It behaves as fllws: frst a request s sent by a cmpser t n avalable servce prvders f a gven tradng cmmunty thrugh ther entry access pnts p 1,, p n. Then based n the receved respnses, frm ther ext access pnts q 1,, q n, and accrdng t gven rankng crtera (e.g. prce, delvery date/tme, r a cmbnatn f bth) the best servce prvder s chsen. Fnally the needed peratns are perfrmed. [:] s an peratr f selectn. Ref(S 1, a, S 2 ) represents a cmpste servce that behaves as S 1 except fr peratns n S 1 wth label a that are replaced by the nn empty servce S 2. Ref s a refnement peratr. The prpsed algebra verfes the clsure prperty. It guarantees that each result f an peratn n servces s a servce t whch we can agan apply algebra peratrs. We are thus able t buld mre cmplex servces by aggregatng and reusng exstng servces thrugh declaratve expressns f servce algebra. 3.2 Frmal Semantcs In ths sectn, we gve a frmal defntn, n terms f Petr nets, f the cmpstn peratrs. Let S = (NameS, Desc, Lc, URL, CS, SN ) wth SN = (P, T, W,,, l ) fr = 1,.., n be n Web servces such that P P j = and T T j = fr j. It s mprtant t nte that servce cmpstn, as wll be descrbed belw, apples t syntactcally dfferent servces. Ths s due t the fact that the places and transtns f the cmpnent servces must be dsjnt fr prper cmpstn. Hwever, a servce may be cmpsed wth tself. Typcally, ths stuatn ccurs when servces descrbe varants f the same peratn (e.g., nrmal executn and exceptnal stuatns) r, fr nstance, f a sngle suppler ffers tw dfferent gds, the requests may be handled ndependently, as thugh they were frm tw dfferent supplers. In ths case, the verlappng must be reslved prr t cmpstn. Ths can be accmplshed by renamng the sets P and T f ne f the equal servces. The tw servces reman equal up t smrphsm n the names f transtns and places. Nte als that, n case f slent peratns, we represent graphcally the crrespndng transtns as black rectangles. 3.2.1 Basc Cnstructs Empty Servce. The empty servce ε s a servce that perfrms n peratn. It s used fr techncal and theretcal reasns. Defntn 3.1 The empty servce ε s defned as ε = (NameS, Desc, Lc, URL, CS, SN) where: NameS = Empty, Desc = Empty Web Servce, Lc = Null, statng that there s n server fr the servce, URL = Null, statng that there s n URL fr ε, CS = {Empty}, and SN = ({p},,, p, p, ). Graphcally, ε s represented by the Petr net f Fgure 1 cntanng nly ne place. ε p 1 2 2 α 1 Fgure 1: Servces ε, S 1, S 2, and S 3 Sequence. The sequence peratr allws the executn f tw servces S 1 and S 2 n sequence, that s, ne after anther. S 1 must be cmpleted befre S 2 can start. Ths s typcally the case when a servce depends n the utput f the prevus servce. Fr example, the servce Payment s executed after the cmpletn f the servce Delvery. Defntn 3.2 The servce S 1 S 2 s defned as S 1 S 2 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the new servce, Desc s the descrptn f the new servce, Lc s the lcatn f the new servce (may be at the same server as ne f the tw cmpnent servces), URL s the nvcatn f the new servce, CS = CS 1 CS 2, SN = (P, T, W,,, l) where: β P = P 1 P 2, T = T 1 T 2 {t}, W = W 1 W 2 {( 1, t), (t, 2 )}, = 1, = 2, and l = l 1 l 2 {t, τ}. Graphcally, gven S 1 and S 2 (see Fgure 1), S 1 S 2 s represented by the Petr net shwn n Fgure 2. Alternatve. The alternatve peratr permts, gven tw servces S 1 and S 2, t mdel the executn f ether S 1 r S 2, but nt bth. Fr nstance, the assess clam servce s fllwed by ether the servce ndemnfy custmer r the servce cnvke custmer. γ S3 3 3
= 1 α 1 2 Fgure 2: Servce S 1 S 2 Defntn 3.3 The servce S 1 S 2 s defned as S 1 S 2 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the new servce, Desc s the descrptn f the new servce, Lc s the lcatn f the new servce, URL s the nvcatn f the new servce, CS = CS 1 CS 2, SN = (P, T, W,,, l) where: γ β = 2 P = P 1 P 2 {, }, T = T 1 T 2 {t 1, t 2, t 1, t 2 }, W = W 1 W 2 {(, t 1 ), (, t 2 ), (t 1, 1 ), (t 2, 2 ), ( 1, t 1 ), ( 2, t 2 ), (t 1, ), (t 2, )}, and l = l 1 l 2 {(t 1, τ), (t 1, τ), (t 1, τ), (t 2, τ)}. Graphcally, gven S 1 and S 2 (see Fgure 1), S 1 S 2 s represented by the Petr net shwn n Fgure 3(a). (a) 1 α β γ 2 (b) p1 1 p3 α β γ p2 2 CS = CS 1 CS 2, SN = (P, T, W,,, l) where: P = P 1 P 2 {,, p 1, p 2, p 3, p 4, p 5 }, T = T 1 T 2 {t, t 1, t 2, t 3, t 4, t }, W = W 1 W 2 {(, t ), (t, p 1 ), (t, p 2 ), (t, p 3 ), (p 1, t 1 ), (p 2, t 2 ), (p 3, t 1 ), (p 3, t 2 ), (p 3, t ), (t 1, 1 ), (t 2, 2 ), ( 1, t 3 ), ( 2, t 4 ), (t 3, p 3 ), (t 4, p 3 ), (t 3, p 4 ), (t 4, p 5 ), (p 4, t ), (p 5, t ), (t, )}, and l = l 1 l 2 {(t, τ), (t 1, τ), (t 2, τ), (t 3, τ), (t 4, τ), (t, τ)}. Graphcally, gven S 1 and S 2 (see Fgure 1), S 1 S 2 s represented by the Petr net shwn n Fgure 3(b). Iteratn. The teratn peratr mdels the executn f a servce fllwed a certan number f tmes by tself. Typcal examples where teratn s requred are cmmuncatn and qualty cntrl where servces are executed mre than nce. Anther example s when rderng several prcessrs, the servce Order Prcessr s executed several tmes. Defntn 3.5 The servce µs 1 s defned as µs 1 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the new servce, Desc s the descrptn f the new servce, Lc s the lcatn f the new servce, URL s the nvcatn f the new servce, CS = CS 1, SN = (P, T, W,,, l) where: P = P 1 {, }, T = T 1 {t, t, t}, W = W 1 {(, t ), (t, 1 ), ( 1, t ), (t, ), ( 1, t), (t, 1 )}, and l = l 1 {(t, τ), (t, τ), (t, τ)}. Graphcally, gven S 1 (see Fgure 1), µs 1 s represented by the Petr net shwn n Fgure 4(a). 1 2 1 p4 2 p5 (a) 1 ( )( ) (b) 1 * +* + """" """" """" ### ### ### 2 Fgure 3: Servces (a) S 1 S 2 and (b) S 1 S 2 Arbtrary Sequence. The arbtrary sequence peratr specfes the executn f tw servces that must nt be executed cncurrently, that s, gven tw servces S 1 and S 2, we have ether S 1 fllwed by S 2 r S 2 fllwed by S 1. Suppse, fr nstance, that there are tw gds, then acqurng a sngle gd s useless unless the rest f the cnjuncts can als be acqured. Mrever, wthut a deadlne, there s n beneft by makng the tw requests n parallel, and dng s may lead t unnecessary csts f ne f the cnjuncts s unavalable r unbtanable. Therefre, the ptmal executn s necessarly an arbtrary seral rderng f requests t supplers. Defntn 3.4 The servce S 1 S 2 s defned as S 1 S 2 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the cmpste servce, Desc s the descrptn f the cmpste servce, Lc s the server where the cmpste servce s lcated, U RL s the nvcatn f the cmpste servce, α!!!!!!!!!!!! p1 α β γ p2 1 1 2 $$$$ $$$$ $$$$ %%% %%% %%% &&& &&& &&& ''' ''' ''' Fgure 4: Servces (a) µs 1 and (b) S 1 C S 2 3.2.2 Advanced Cnstructs Parallelsm wth Cmmuncatn. The parallel peratr represents the cncurrent executn f tw servces. Cncurrent servces may synchrnze and exchange nfrmatn. Fr nstance, n an Onlne Cmputer Stre Web servce, after recevng an rder fr a cmputer frm a custmer, tw parallel servces are trggered: Order Mntr and Order Prcessr.
Defntn 3.6 Let C = {(α, β) (α, β) T 1 T 2 T 2 T 1 } be a set f cmmuncatn elements. The servce S 1 C S 2 s defned as S 1 C S 2 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the cmpste servce, Desc s the descrptn f the cmpste servce, Lc s the lcatn f the cmpste servce, U RL s the nvcatn f the cmpste servce, CS = CS 1 CS 2, SN = (P, T, W,,, l) where: P = P 1 P 2 {, } {p / (α, β ) C}, T = T 1 T 2 {t, t }, W = W 1 W 2 {(, t ), (t, 1 ), (t, 2 ), ( 1, t ), ( 2, t ), (t, )} {(α, p ), (p, β ) / (α, β ) C}, and l = l 1 l 2 {(t, τ), (t, τ)}. Gven S 1, S 2 (see Fgure 1), and C = {(α, β), (γ, α)}, S 1 C S 2 s represented graphcally by the Petr net shwn n Fgure 4(b). Dscrmnatr. Web servces are unrelable; they have a relatvely hgh prbablty f falng r f beng unacceptably slw. Delays f nly a few secnds culd result n servce prvders lsng sgnfcant sums f mney r dsappntng ther custmers. Dfferent servce prvders may prvde the same r smlar servces. Therefre, t shuld be pssble t cmbne unrelable servces t btan mre relable servces. The dscrmnatr peratr s used, fr nstance, t place redundant rders t dfferent supplers fferng the same servce t ncrease relablty. The frst t perfrm the requested servce trggers the subsequent servce and all ther late respnses are gnred fr the rest f the cmpste servce prcess. Ths cnstruct s smlar t the dscrmnatr pattern ntrduced n (Aalst, Hfstede, Kepuszewsk & Barrs 2002) but ur mplementatn, n terms f Petr nets, s dfferent. Defntn 3.7 The servce (S 1 S 2 ) S 3 s defned as (S 1 S 2 ) S 3 = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the new servce, Desc s the descrptn f the new servce, Lc s the lcatn f the new servce, URL s the nvcatn f the new servce, CS = CS 1 CS 2 CS 3, SN = (P, T, W,,, l) where: P = P 1 P 2 P 3 {,, p 1, p 2 }, T = T 1 T 2 T 3 {t, t 1, t 2, t 3, t }, W = W 1 W 2 W 3 {(, t ), (t, 1 ), (t, 2 ), (t, p 2 ), ( 1, t 1 ), ( 2, t 2 ), (t 1, p 1 ), (t 2, p 1 ), (p 1, t 3 ), (p 1, t ), (p 2, t 3 ), (t 3, 3 ), ( 3, t ), (t, )}, and l = l 1 l 2 l 3 {(t, τ), (t 1, τ), (t 2, τ), (t 3, τ), (t, τ)}. Graphcally, gven S 1, S 2, and S 3 (see Fgure 1), (S 1 S 2 ) S 3 s represented by the Petr net shwn n Fgure 5(a). Nte that, n (S S) S, s smlar t a parallel peratr wthut cmmuncatn,.e.,. Selectn. Relyng n a sngle suppler puts a cmpany at ts mercy. T reduce rsk, a cmpany shuld mantan relatnshps wth multple supplers. These supplers may, e.g., charge dfferent prces, prpse dfferent delvery dates and tmes, and have dfferent relabltes. The selectn cnstruct allws t chse the best servce prvder, by usng a rankng crtera, amng several cmpetng supplers t utsurce a partcular peratn. Defntn 3.8 Let p, q P be servce access pnts f S fr = 1,.., n. The servce [S 1 (p 1, q 1 ) : S n (p n, q n )] s defned as [S 1 (p 1, q 1 ) : S n (p n, q n )] = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the cmpste servce, Desc s the descrptn f the cmpste servce, Lc s the lcatn f the cmpste servce, U RL s the nvcatn f the cmpste servce, CS = n CS, =1 SN = (P, T, W,,, l) where: P = n P =1 {,, p, q}, T = n T {t, u, v} {t, t 1 n}, =1 W = n W =1 {(, t), (u, p), (q, v), (v, )} {(t, p j ), (q j, u), (p, t j ), (t j, j), ( j, t j ), (t j, q) 1 j n}, and n l = l {(t,send req serv), =1 (u,select serv), (v, τ)} {(t, τ), (t, τ) 1 n}. Graphcally, gven S 1,, S n, and p, q P fr = 1,.., n, [S 1 (p 1, q 1 ) : S n (p n, q n )] s represented by the Petr net shwn n Fgure 5(b). T allw the dscvery f the servce, we assume that servce prvders regster ther servces wth a partcular tradng cmmunty (Benatallah et al. 2000, Benatallah et al. 2002) and that nfrmatn abut avalable servces s knwn. We als assume that each servce prvder cntans tw dstnct parts, ne part t prcess the servce request and the ther part t perfrm the servce tself. The par f peratns send req serv and select serv represents a predefned selectn strategy chsen, amng thers, by the desgner f the cmpste servce. The selectn decsn may als be based n autmated negtatn and auctns (e.g, sealed bd and pen-cry auctns) where the partes nvlved, that s, the cmpser (auctneer) and the servce prvders, are autmated. By dng s, autmated nlne auctns becme a fundamental buldng blck fr selectn decsn. Refnement. The refnement cnstruct, n whch peratns are replaced by mre detaled nn empty servces, s used t ntrduce addtnal cmpnent servces nt a servce. Refnement s the transfrmatn f a desgn frm a hgh level abstract frm t a lwer level mre cncrete frm hence allwng herarchcal mdelng. Defntn 3.9 Let a A. The servce Ref(S 1, a, S 2 ) s defned as Ref(S 1, a, S 2 ) = (NameS, Desc, Lc, URL, CS, SN) where: NameS s the name f the refned servce, NameS s the name f the refned servce, Desc s the descrptn f the refned servce, Lc s the lcatn f the refned servce (may be at the same lcatn as S 1 ), URL s { the nvcatn f the refned servce, C CS CS = 2 f a l 1 (T 1 ) CS 1 therwse, SN = (P, T, W,,, l) where: P = P 1 {< p, t > p P 2 \ { 2, 2 }, t l 1 1 (a)},
(a) (b) 1 2 t send_req_serv 1 n Sn α β γ p 1 p n rec_req_1 rec_req_n 1 2 send_resp_1 send_resp_n p1 p2 q 1 q n S3 3 1 n u select_serv p q 3 Fgure 5: Servces (a) (S 1 S 2 ) S 3 and (b) [S 1 (p 1, q 1 ) : S n (p n, q n )] T = T 1 \ l 1 1 (a) {< x, t > x T 2, t l 1 1 (a)}, W 1 (x, y) f x, y P 1 T 1 \ l 1 1 (a) W 2 (x, y ) f x =< x, t >, y =< y, t > fr t l1 1 (a) W 1 (x, t) f y =< y, t >, x W (x, y) = t fr t l 1 1 (a) and y 2 W 1 (t, y) f x =< x, t >, y t fr t l 1 1 (a) and x 2 0 therwse = 1, = 1, and l 1 (t) f t T 1 \ l 1 1 (a) l(t) = l 2 (x) f t =< x, t > fr x T 2 and t l 1 1 (a) Fgure 6 shws an example f a refned servce where S 2 (perfrmng ether assess smple clam r assess cmplex clam) s a refnement (.e., specalzatn) f the generc peratn assess clam n S 1. Anther nterestng use f the refnement peratr s ts cmbnatn wth the selectn peratr fr best utsurcng peratns. In ndemnfy_custmer assess_clam 1 1 cnvke_custmer assess_smple_clam Ref(,assess_clam,) 2 assess_cmplex_clam 2 assess_smple_clam ndemnfy_custmer Fgure 6: An Example f Refnement assess_cmplex_clam cnvke_custmer Ref(S 1, assess clam, [A 1 : A n ]), fr nstance, assess clam s perfrmed by the sutable servce chsen amng n avalable assessrs. The cmpste Web servce generated by usng the abve cnstructs s a servce net that has tw specal places, whch crrespnd t the begnnng and termnatn f the prcessng f the cmpste Web servce. Ths nterestng prperty relates t the structure f the underlyng Petr net. Prpstn 3.1 (Preservatn) The servce net f a cmpste Web servce S btaned usng the abve defned cnstructs cntans ne nput place and ne utput place. Prf. Immedate cnsequence f Defntn 2.2 and f the defntns f the cmpstn cnstructs defned prevusly. In what fllws, we gve an example f a cmpste servce mdeled as a Petr net t llustrate sme f the cnstructs defned abve.
Example 3.1 Fgure 7 shws a Web servce cmpsed f three basc servces, OCS representng an Onlne Cmputer Stre and SM and IP, representng respectvely the Sny Mntrs and the Intel Prcessrs. Upn receptn f an rder rec rd PC fr a cmputer frm a custmer, OCS starts, n parallel, the utsurced servces SM t rder a mntr and IP t rder a prcessr by perfrmng the peratns send rd mn and send rd pr respectvely. The set f cmmuncatn elements are C 1 = {(send rd mn, rec rd mn), (send del mn, rec del mn)} and C 2 = {(send rd pr, rec rd pr), (send del pr, rec del pr)}. Once the requested tems are receved, OCS perfrms the assemble PC peratn. Nte that, fr the sake f smplcty and clarty, nt all the peratns f the scenar (e.g, delvery and bllng) are represented and labels are used nstead f names fr the transtns. SM COS rec_rd_pc OCS IP C2 IP S 1 (S 2 S 3 ) = (S 1 S 2 ) S 3 (1) ε S = S (2) S ε = S (3) S 1 S 2 = S 2 S 1 (4) S 1 (S 2 S 3 ) = (S 1 S 2 ) S 3 (5) S S = S (6) (S 1 S 2 ) S 3 = (S 1 S 3 ) (S 2 S 3 ) (7) S 1 S 2 = (S 1 S 2 ) (S 2 S 1 ) (8) µε = ε (9) S 1 C S 2 = S 2 C S 1 (10) S 1 (S 2 S 3 ) = (S 1 S 2 ) S 3 (11) S ε = S (12) (S 1 S 2 ) S 3 = (S 2 S 1 ) S 3 (13) (S 1 ε) S 2 = S 1 S 2 (14) (S 1 S 2 ) ε = S 1 S 2 (15) { 1,..., n } = {1,..., n} S = n S (16) { 1,..., n} n If S j = ε then n S = =1 =1, j =1 S (17) Ref(S 1, a, S 2 ) = S 1 f a / l 1 (T 1 ) (18) S 1 S 2 = S 2 S 1 (frm (8) and (4)) (19) S S = S S (frm (8) and (6)) (20) S ε = S (frm (8), (2), (3), and (6)) (21) Table 1: Desred Prpertes f the Servce Algebra rec_rd_mn send_rd_pr rec_rd_pr send_del_mn send_rd_mn rec_del_pr rec_del_mn assemble_pc send_del_pr Smple prpertes can be easly derved, fr example (2), (3), (9), and (12). A range f ther equatns can be derved, each by an easy case analyss. An nterestng bservatn s that ur semantcs equates the servces S 1 S 2 and (S 1 S 2 ) (S 2 S 1 ) (prperty (8)). Ths means that arbtrary sequence can be expressed usng sequence and alternatve. Hwever, t s stll useful t nclude the arbtrary sequence peratr n the algebra snce the bvus mplementatn wll be neffcent fr the servce (S 1 S 2 ) (S 2 S 1 ). Fgure 7: Servce SM C1 (OCS C2 IP ) Let us assume nw that, nstead f a basc servce Sny Mntrs, we use a cmpste servce Mntrs. The mntr prvder can be dynamcally selected amng the avalable servces (e.g., M 1,, M n ) whch are members f Mntrs (see Fgure 8). Nte that C 3 = {(send rd mn, send req serv), (τ, rec del mn)}. 3.3 Algebrac Prpertes =1 Our semantcs can be used t prve algebrac prpertes f the cnstructs. As a general bservatn, t may be the case that a desgner prduces a cmplex Web servce by cmbnng a set f exstng Web servces usng the algebra peratrs. The algebrac prpertes culd then be used t transfrm and ptmze cmpsed Web servces based n cmpnent Web servces peratnal metrcs such as cst and duratn, althugh nt nvestgated n ths paper. A descrptn f the algebrac prpertes f the peratrs ntrduced abve s gven n Table 1 (where n S stands fr [S 1 (p 1, q 1 ) : S n (p n, q n )]). The algebrac peratrs satsfy sme usual prpertes, such as cmmutatvty, asscatvty, and reflexvty. 4 Web Servce Analyss A cmpste Web servce s a system that cnssts f several cnceptually autnmus but cperatng unts. It s dffcult t specfy hw ths system shuld behave and ensure that t behaves as requred by the specfcatn. The reasn s that, gven the same nput and ntal state, the system may prduce several dfferent utputs. Web servces nteract wth each ther fr cnductng a specfc task althugh they are created and deplyed by ndependent servce prvders. The peces f wrk wthn the specfc task are tghtly cupled. Fr example, an Onlne Cmputer Stre may need servces prvded by Mntr and Prcessr Web servces. The busness lgc f thse tw Web servces are ndependent f each ther but, fr a partcular cmputer request, the tw peces f wrk, that s, the mntr rderng and the prcessr rderng, are related. Snce Web servces whch cntan errrs may lead t angry custmers and lss f gdwll, t s thus mprtant t analyze Web servces befre they are put nt peratn. The gal s t prvde mechansms t supprt crrect Web servce cmpstn. The prpertes t be verfed may be general, such as absence f deadlcks and lvelcks, r applcatnspecfc, such as f a custmer keep reservng and cancelng the reservatn ndefntely, n an Onlne Tcket Sales Web servce, a sphstcated system mght deny servng such a custmer after a certan
[M1(p1,q1):Mn(pn,qn)] M1 send_req_serv Mn COS OCS IP C2 IP rec_rd_mn_1 rec_rd_mn_n rec_rd_pc p1 p n send_rd_pr rec_rd_pr send_rd_mn rec_req_1 rec_req_n rec_del_pr rec_del_mn send_del_pr send_resp_1 send_resp_n q1 q n assemble_pc send_del_mn_1 send_del_mn_n select_serv Fgure 8: Servce [M 1 (p 1, q 1 ) : M n (p n, q n )] C3 (OCS C2 IP ) number f reservatn r cancellatn requests. The crrectness f servces s vtal t cmpanes. A Web servce whch cntans errrs (e.g., a deadlck) may lead t angry custmers and lss f gdwll. It s thus mprtant t analyze a servce befre t s put nt peratn. The crrect termnatn, s ne f the man prpertes a prper Web servce shuld satsfy. The verfcatn f the crrectness prperty cnssts n checkng whether the underlyng Petr net s lve and bunded (Murata 1989). Behavral equvalences are useful n verfcatn as they lay the cnceptual bass fr decdng that the behavr f tw Web servces can be cnsdered t be the same. They can als be used as a tl fr reducng verfcatn effrt by replacng the Petr net f a servce by a smaller (n sze), but equvalent ne. The bsmulatn equvalence (Park 1981, Mlner 1989) between tw Web servces s a relatn between ther evlutns such that fr each evlutn f ne f the servces there s a crrespndng evlutn f the ther servce such that the evlutns are bservatnally equvalent and lead t servces whch are agan bsmlar. Ths characterzatn f the behavr f Web servces usng the ntn f bsmulatn helps servce desgner ptmze cmpste servces by, e.g., changng ther cmpnent Web servces wth equvalent nes. Anther mtvatn s custmzatn f servces. T enhance cmpettveness a servce prvder may mdfy hs/her servce fr a custmer s cnvenence (e.g., t cnfrm t hs/her wn busness mdel) and ths custmzed servce must cnfrm t the rgnal ne. 5 Related Wrk Several appraches nvestgated the ssue f sharng Web servces. Hwever, nne f them ffers a general theretcal framewrk fr the cmpstn f Web servces. In ths sectn, we brefly vervew the appraches that are clsely related t ur wrk. Wrkflw management systems (Gergakpuls, Hrnck & Sheth 1995, WfMC 1999) are based n the premse that the success f an enterprse requres the management f busness prcesses n ther entrety. Indeed, an ncreasng number f rganzatns have already autmated ther nternal prcess management usng wrkflw technlgy and enjyed substantal benefts n dng s. Hwever, B2B e-cmmerce requres the flexble supprt f crssenterprses relatnshps. Current research effrts n the wrkflw area prmse t delver a next generatn wrkflw systems that has the ablty t easly thread tgether crss-rganzatnal busness prcesses, supprtng the ntegratn f dverse users, applcatns, and systems. The purpse f crssrganzatn wrkflws s t autmate busness prcesses that ntercnnect and manage cmmuncatn amng dsparate systems. Early prjects n ths drectn fcus mstly n the ntegratn f small numbers f tghtly cupled busness prcesses. Recent emergng wrkflw prjects such as CMI (Gergakpuls, Schuster, Cchck & Baker 1999), eflw (Casat, Ilnck, Jn & Shan 2000), and CrssFlw (Ludwg & Hffner 1999, Hffner, Ludwg, Gulcu & Grefen 2000) fcus n lsely cupled prcesses. Hwever, they lack a frmal mdel fr specfyng and verfyng Web servces. They als d nt address the semantcs f Web servce cmpstn peratrs. Other appraches mdelng busness prcesses usng Petr nets are n the wrkflw settng. Wrkflw nets, a class f Petr nets smlar t ur servce net, have been ntrduced n (Aalst 1997, Aalst 1998) fr the representatn and verfcatn f wrkflw prcesses. In (Adam, Altur & Huang 1998), the authrs develped a Petr net-based apprach that uses several structural prpertes fr dentfyng ncnsstent dependency specfcatn n a wrkflw, testng fr
ts safe termnatn, and checkng fr the feasblty f ts executn fr a gven startng tme when tempral cnstrants are present. An mplementatn s prvded fr cnductng the abve analyses. Hwever, the apprach s restrcted t acyclc wrkflws. Nevertheless, these prevus appraches treat every wrkflw prcess as a separate entty. They d nt cnsder busness prcess cmpstn. Web servce ntegratn requres mre cmplex functnalty than SOAP, WSDL, and UDDI can prvde. The functnalty ncludes transactns, wrkflw, negtatn, management, and securty. There are several effrts that am at prvdng such functnalty, fr example, the recently released Busness Prcess Executn Language fr Web Servces (BPEL4WS) 4, whch represents the mergng f IBM s Web Servces Flw Language (WSFL) (Leymann 2001) and Mcrsf s XLANG (Thatte 2001), s pstned t becme the bass f a standard fr Web servce cmpstn. These languages are based n SOAP+WSDL+UDDI basc stack, are cmplex prcedural languages, and very hard t mplement and deply. There are als sme prpsals such as DAML- S 5 whch s a part f DARPA Agent Markup Language prject that ams at realzng the Semantc Web cncept. Hwever, DAML-S s a cmplex prcedural language fr Web servce cmpstn. 6 Cnclusns In ths paper, we prpsed a Petr net-based algebra fr cmpsng Web servces. The frmal semantcs f the cmpstn peratrs s expressed n terms f Petr nets by prvdng a drect mappng frm each peratr t a Petr net cnstructn. Thus, any servce expressed usng the algebra cnstructs can be translated nt a Petr net representatn. By means f a set f algebra prpertes, we are able t transfrm and ptmze Web servce expressns guaranteeng the same semantcs f ntal expressns. In addtn, the use f a frmal mdel allws the verfcatn f prpertes and the detectn f ncnsstences bth wthn and between servces. There are ther ssues n B2B e-cmmerce whch, we beleve, culd be successfully addressed by extendng the framewrk presented n ths paper, e.g., t nclude management f tme and resurces. We expect that these prblems can be dealt wth usng a sutable hgh-level Petr net, such as tmed and clured Petr nets (Jensen 1997). Anther ssue s that a strng lnk wth prcess algebras, such as CCS (Mlner 1989) and ACP (Bergstra & Klp 1985), shuld allw ne t mprt prcess algebra specfc verfcatn technques (e.g., axmatzatns f behavral equvalences) nt the Petr net based framewrk. Fnally, cmpsng Web servces that satsfy requrements such as transactnal prcess, negtatn, exceptn handlng, and securty thrugh externally vsble nteractn r cnversatn s a challengng ssue. Acknwledgments The authrs wuld lke t thank Asscate Prfessr Arthur ter Hfstede frm Queensland Unversty f Technlgy fr hs cnstructve crtcsms n an earler versn f ths paper. References Aalst, W. v. d. (1997), Verfcatn f Wrkflw Nets, n P. Azema & G. Balb, eds, Prceedngs f 4 http://www.bm.cm/develperwrks/lbrary/ws-bpel/. 5 http://www.daml.rg/servces/. the Applcatn and Thery f Petr Nets 97, Tuluse, France. Aalst, W. v. d. (1998), The Applcatn f Petr Nets t Wrkflw Management, The Jurnal f Crcuts, Systems and Cmputers 8(1), 21 66. Aalst, W. v. d. (1999), Interrganzatnal Wrkflws: An Apprach based n Message Sequence Charts and Petr Nets, Systems Analyss - Mdellng - Smulatn 34(3), 335 367. Aalst, W. v. d., Hfstede, A. t., Kepuszewsk, B. & Barrs, A. (2002), Wrkflw Patterns, Techncal Reprt FIT-TR-2002-02, Queensland Unversty f Technlgy, Brsbane, Australa. Adam, N., Altur, V. & Huang, W.-K. (1998), Mdelng and Analysng f Wrkflws Usng Petr Nets, Jurnal f Intellgent Infrmatn Systems 10(2), 131 158. Benatallah, B., Dumas, M., Sheng, Q. & Ngu, A. (2002), Declaratve Cmpstn and Peer-t- Peer Prvsnng f Dynamc Web Servces, n Prceedngs f the 18th Internatnal Cnference n Data Engneerng (ICDE 02), IEEE Cmputer Scety, Calfrna, USA, pp. 297 308. Benatallah, B., Medjahed, B., Buguettaya, A., Elmagarmd, A. & Beard, J. (2000), Cmpsng and Mantanng Web-based Vrtual Enterprses, n Prceedngs f the Wrkshp n Technlges fr E-Servces (n Cperatn wth VLDB 00), Car, Egypt. Bergstra, J. & Klp, J. (1985), Algebra f Cmmuncatng Prcesses wth Abstractn, TCS 37, 77 121. Casat, F., Ilnck, S., Jn, L. & Shan, M.-C. (2000), An Open, Flexble, and Cnfgurable System fr E-Servce Cmpstn, Techncal Reprt HPL- 2000-41, HP Labs. Gergakpuls, D., Hrnck, M. & Sheth, A. (1995), An Overvew f Wrkflw Management: Frm Prcess Mdelng t Wrkflw Autmatn Infrastructure, Dstrbuted and Parallel Databases 3(2). Gergakpuls, D., Schuster, H., Cchck, A. & Baker, D. (1999), Managng Prcess and Servce Fusn n Vrtual Enterprses, Infrmatn Systems, Specal Issue n Infrmatn Systems Supprt fr Electrnc Cmmerce 24(6), 429 456. Hffner, Y., Ludwg, H., Gulcu, C. & Grefen, P. (2000), Archtecture fr Crss-Organzatnal Busness Prcesses, Research reprt, IBM, Zurch, Swtzerland. Jensen, K. (1997), Clured Petr Nets: Basc Cncepts, Analyss Methds and Practcal Use. Vl. 1, Basc Cncepts, EATCS Mngraphs n Theretcal Cmputer Scence, Sprnger-Verlag. Leymann, F. (2001), Web Servces Flw Language (WSFL) versn 1.0, IBM Sftware Grup. http://bm.cm/sftware/slutns/webservces /pdf/wsfl.pdf/. Ludwg, H. & Hffner, Y. (1999), Cntract-based Crss-Organsatnal Wrkflws - The Crss- Flw Prject, n D. Gergakpuls, W. Prnz & A. Wlf, eds, Prceedngs f the Internatnal Jnt Cnference n Wrk Actvtes Crdnatn and Cllabratn (WACC 99), San Franssc, USA.
Mlner, R. (1989), Cmmuncatn and Cncurrency, Prentce Hall Int. Murata, T. (1989), Petr Nets: Prpertes, Analyss and Applcatns, n Prceedngs f the IEEE, Vl. 77(4), pp. 541 580. Park, D. (1981), Cncurrency and Autmata n Infnte Sequences, n P. Deussen, ed., Prceedngs f the 5th GI Cnference, LNCS 104, Sprnger Verlag. Petersn, J. (1981), Petr Net Thery and the Mdelng f Systems, Prentce Hall, Englewd Clffs. Petr, C. (1962), Kmmunkatn mt Autmaten, PhD thess, Unversty f Bnn, Germany. (In German). Resg, W. (1985), Petr Nets: An Intrductn, EATCS Mngraphs n Theretcal Cmputer Scence Vl.4, Sprnger-Verlag, Berln, Germany. Schuster, H., Gergakpuls, D., Cchck, A. & Baker, D. (2000), Mdelng and Cmpsng Servce-based and Reference Prcess-based Mult-enterprse Prcesses, n Prceedngs f the 12th Cnference n Advanced Infrmatn Systems Engneerng (CASE 00), Stckhlm, Sweden. Thatte, S. (2001), XLANG: Web Servces fr Busness Prcess Desgn, Mcrsft Crpratn. http://www.gtdtnet.cm/team/xml wsspecs /xlang-c/default.htm/. WfMC (1999), Wrkflw Management Caltn, Termnlgy and Glssary, Dcument Number WFMC-TC-1011. http://www.wfmc.rg/standards/dcs.htm/.