Service Interaction: Patterns, Formalization, and Analysis
Upcoming SlideShare
Loading in...5
×
 

Service Interaction: Patterns, Formalization, and Analysis

on

  • 1,663 views

Invited Lecture at the 9th International School on Formal Methods for the Design of Computer, Communication and Software Systems: Web Services (SFM-09:WS), Bertinoro, Italy, June 1-6, 2009.

Invited Lecture at the 9th International School on Formal Methods for the Design of Computer, Communication and Software Systems: Web Services (SFM-09:WS), Bertinoro, Italy, June 1-6, 2009.

Statistics

Views

Total Views
1,663
Views on SlideShare
1,662
Embed Views
1

Actions

Likes
1
Downloads
17
Comments
0

1 Embed 1

http://www.slashdocs.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Service Interaction: Patterns, Formalization, and Analysis Service Interaction: Patterns, Formalization, and Analysis Presentation Transcript

  • Service Interaction:Patterns, Formalization, and Analysis9th International School on Formal Methods for the Design ofComputer, Communication and Software Systems: WebServices (SFM-09:WS), Bertinoro, Italy, June 1-6, 2009.prof.dr.ir. Wil van der Aalstwww.vdaalst.orgJoint work with Arjan Mooij,Christian Stahl, and Karsten Wolf
  • BEST: Berlin - Rostock- EindhovenService Technology Program http://www2.informatik.hu-berlin.de/top/best/ PAGE 1
  • Outline• Introduction to Service Interaction• Workflow and Service Interaction Patterns• Challenging Analysis Questions• A "Crash Course" in Petri Nets• Exposing Services• Replacing and Refining Services• Integrating Services Using Adapters• Service Mining• Conclusion PAGE 2
  • Introduction toService Interaction
  • Service-Orientation: Basic Idea invoke service receive service A B reply “buy “sell service side” side” service requester provider PAGE 4
  • Service Networks service Cservice service A B service D “buy “sell “buy “sell service side” side” service side” side” servicerequester provider & providers requestor PAGE 5
  • Choreography service choreography service A D service service B C PAGE 6
  • Orchestration orchestration service B service service C A service D PAGE 7
  • Workflow? workflow in the classical sense service A PAGE 8
  • Some Terminologyservice choreography service definition activity channel activity port channel message port service definition service definition interface interfaceImportant assumption: asynchronous communication. PAGE 9
  • Interaction is a source of errors! PAGE 10
  • p1 p5place accept order order p2 p6 eat cook food food p3 p7 pay collect money money p4 p8 PAGE 11
  • p1 p5place accept order order p2 p6 eat collect food food p3 p7 pay cook money money deadlock p4 p8 PAGE 12
  • restaurant is "uncontrollable"* p1 p5 place accept order order p2 p6 eat cook food food leave p3 p7 get drunk pay collect customer is money money *by any service with only dead"controllable" but will p4 p8 final markings never get any food PAGE 13
  • p1 p5 place accept order order p2 p6 eat cook food foodleave p3 p7 get drunk pay song song collect money money p4 p8 PAGE 14
  • Workflow and ServiceInteraction Patterns
  • MS Workflow Foundation Global 360 BPM Suite YAWL FileNet InConcert Fujitsu Interstage Axxerion BWise Software AG/webMethods casewise COSA XPDL IBM WebSphere BPEL UML ADs Savvion BusinessManagerjBPM BPM|one TIBCO iProcess Suite BPMN EPCs FlowConnect SAP Workflow Pegasystems SmartBPM Suite Ensemble Bizagi TeamWARE Oracle BPEL Promatis BiZZdesignerUltimus BPM Suite PAGE 16
  • Workflow Patterns Initiative• Started in 1999, joint work TU/e and QUT• Objectives: • Identification of workflow modeling scenarios and solutions • Benchmarking − Workflow products (MQ/Series Workflow, Staffware, etc) − Proposed standards for web service composition (BPML, BPEL) − Process modeling languages (UML, BPMN) • Foundation for selecting workflow solutions• Home Page: www.workflowpatterns.com• Primary publication: • W.M.P. van der Aalst, A.H.M. ter Hofstede, B. Kiepuszewski, A.P. Barros, “Workflow Patterns”, Distributed and Parallel Databases 14(3):5-51, 2003.• Evaluations of commercial offerings, research prototypes, proposed standards for web service composition, etc PAGE 17
  • Workflow Patterns Frameworktime 2000 2003 Jun 2005 Oct 2005 Sep 2006 Jun 2006 revised Control-flow P:s 20 Resource P:s - 43 Data P:s - 40 Control-flow P:s 43 Exception P:s W. van der Aalst N. Russell N. Russell N. Russell N. Russell A. ter Hofstede W. van der Aalst A. ter Hofstede A. ter Hofstede W. van der Aalst B. Kiepuszewski A. ter Hofstede D. Edmond W. van Hofstede A. ter der Aalst A. Barros D. Edmond W. van der Aalst N. Mulyar The ordering of Resource definition Data representation Exception handling - 23 new patterns activities in a & work distribution and handling in a inFormalised in - a process process in a process process CPN notation CoopIS’2000 CAiSE’2005 ER’2005 TR CAiSE’2006 DAPD’2003Slides adopted from Nick Russell, et al. PAGE 18
  • Workflow Patterns Frameworktime 2000 2003 Jun 2005 Oct 2005 Control-flow P:s 20 Resource P:s - 43 Data P:s - 40 Exc E COSA Domino Workflow Staffware Staffware Staf v FLOWer Visual Workflow WebSphere MQ MQSeries We a Eastman Forte Conductor FLOWer FLOWer FLO l Meteor MQSeries/Workflow COSA COSA CO Mobile SAR R/3 Workflow iPlanet iPla u I-Flow Verve Workflow a Staffware Changengine t InConcert I o n XPDL, BPEL4WS, BPML, BPEL4WS XPDL, BPEL4WS XPD s WSFL, XLANG, WSCI, UML AD 2.0 UML AD 2.0, BPMN BPE UML AD 1.4 UML AD 2.0, BPMN BPMN Language Development: YAWL/newYAWL PAGE 19
  • Service Interaction Patternsservice choreography service definition activity channel activity port channel message port service definition service definition interface interface • Basic Service Interaction Patterns (SIP-1, ... ,SIP-15) • Correlation Patterns (SIP-16, ... ,SIP-23) • Anti-Patterns (AP-1, AP-2, and AP-3) PAGE 20
  • Send Patterns c1 c1 c1 block sendsend c2 c2 p p p c2 send block c3 c3SIP-1 Send pattern SIP-2 Pre-Blocking SIP-3 Post-Blocking Send pattern Send pattern PAGE 21
  • Receive Patterns remove c1 c1 receive receive p p c2 c2 SIP-4 Receive pattern SIP-5 Lossy Receive pattern PAGE 22
  • Concurrent Send/Receive Patterns c1 c1 AND-split AND-split c2 c3 c2 c3 p1 receive1 receive2 p1send1 send2 p2 c4 c5 p2 c4 c5 AND-join AND-join c6 c6SIP-6 Concurrent Send pattern SIP-7 Concurrent Receive pattern PAGE 23
  • Choice Patterns c1 c1send1 send2 p1 receiving1 receiving2 p1 c2 c3 p2 c2 c3 p2 SIP-8 Sending Choice pattern SIP-9 Receiving Choice pattern c1 internal1 internal2 p1 c2 c3 p2 SIP-10 Internal Choice pattern PAGE 24
  • Choice With a Follow-Up Patterns (1/2) c1 p1 c1 receive1 receive2 p1 send1 send2 p2 c2 c3 p2 c2 c3 p3 send1 send2 p3receive1 receive2 p4 c4 p4 c4 SIP-11 Sending Choice SIP-12 Receiving Choice Receiving Follow-Up pattern Sending Follow-Up pattern PAGE 25
  • Choice With a Follow-Up Patterns (2/2)• SIP-13 Sending Choice Sending Follow-Up• SIP-14 Receiving Choice Receiving Follow-Up, and• SIP-15 Internal Choice Sending Follow-Up. See problem? PAGE 26
  • Anti-Pattern AP-1: Internal Choice ReceivingFollow-Up Anti-Pattern c1 internal1 internal2 c2 c3 receive1 receive2 p1 c4 p2 PAGE 27
  • Another variant of AP-1 c1 send skip c2 p1 receive p2 c3 PAGE 28
  • Two Additional Variants of AP-1 p1 p5 place accept order order p2 p6 eat cook food foodleave p3 p7 get drunk pay collect money money p4 p8 PAGE 29
  • Correlation p1 p5 c1 (me,you) (from,to,content)place accept send order order (me,you) p2 p6 c2 eat cook food food c1 p3 p7 (me,you) (from,to,content) receive pay collect (me,you) money money c2 p4 p8 PAGE 30
  • Correlation Send Patterns c1 c1[from:=me] (me,*) [to:=you] (me,you) (from,*,content) (*,to,content) send send (me,*) p p (me,you) c2 c2 SIP-16 Leading Correlated SIP-17 Following Send pattern Correlated Send pattern PAGE 31
  • Anti-Pattern AP-2:Uncorrelated Send Anti-Pattern c1 (me,you) (*,*,content) send (me,you) p c2 PAGE 32
  • Correlation Receive Patterns (1/2) c1 c1 [me=to] (me,*) [you=from] (me,you) (*,to,content) (from,*,content)receive receive (me,*) p (me,you) p c2 c2 SIP-18 Leading Correlated SIP-19 Following Correlated Receive pattern Receive pattern PAGE 33
  • Correlation Receive Patterns (2/2) c1 [me:=new()] [me=to] (me,*) (from,*,content) (from,to,content) receive receive [you:=from] (me,you) p[you:=from] (me,you) p c1 c2 SIP-20 Learning Correlated SIP-21 Creating Correlated Receive pattern Receive pattern PAGE 34
  • Anti-Pattern AP-3:Uncorrelated Receive Anti-Pattern c1 (me,*) (from,*,content) receive (me,*) p c2 PAGE 35
  • Composite Correlation Patterns (1/2) SIP-22 Correlation [you2:=from1] Swap pattern[from1:=me1] (me1,*) [me2:=new()] send1 receive1 (me1,*) (from1,*,content1) (me2,you2) [me1=to2] [from2:=me2][you1:=from2] (from2,to2,content2) [to2:=you2] receive2 send2 (me1,you1) (me2,*) [to3:=you1] (*,to3,content3) [me2=to3] send3 receive3 (me1,you1) (me2,*) PAGE 36
  • Composite Correlation Patterns (1/2) SIP-16 Leading Correlated SIP-21 Creating Correlated SIP-22 Correlation Send pattern Receive pattern Swap pattern [you2:=from1][from1:=me1] (me1,*) [me2:=new()] send1 receive1 (me1,*) (from1,*,content1) (me2,you2) SIP-20 Learning Correlated Receive pattern [me1=to2] [from2:=me2][you1:=from2] (from2,to2,content2) [to2:=you2] receive2 send2 (me1,you1) (me2,*) [to3:=you1] (*,to3,content3) [me2=to3] send3 receive3 (me1,you1) (me2,*) SIP-17 Following SIP-18 Leading Correlated Correlated Send pattern Receive pattern PAGE 37
  • Composite Correlation Patterns (2/2) [x=from1][from1:=me1] (me1,*) [to1:=y] (me2,*) [me2=to1] relay1 send1 receive1 (me1,*) (from1,*,content1) (x,y) (*,to1,content1) (me2,*) db [me1=to2] (*,to2,content2) (x,y) (from2,*,content2) [from2:=me2] receive2 send2 relay2 (me1,*) [to2:=x] (me2,*) [y=from2] SIP-23 Correlation Broker pattern PAGE 38
  • Composite Correlation Patterns (2/2)SIP-16 Leading SIP-19 Following SIP-17 Following SIP-18 Leading CorrelatedCorrelated Send pattern Correlated Receive pattern Correlated Send pattern Receive pattern [x=from1][from1:=me1] (me1,*) [to1:=y] (me2,*) [me2=to1] relay1 send1 receive1 (me1,*) (from1,*,content1) (x,y) (*,to1,content1) (me2,*) db [me1=to2] (*,to2,content2) (x,y) (from2,*,content2) [from2:=me2] receive2 send2 relay2 (me1,*) [to2:=x] (me2,*) [y=from2]SIP-18 Leading Correlated SIP-17 Following SIP-19 Following SIP-16 Leading CorrelatedReceive pattern Correlated Send pattern Correlated Receive pattern Send pattern SIP-23 Correlation Broker pattern PAGE 39
  • Recommended Reading (1/2)• van der Aalst, W., Mooij, A.J., Stahl C., Wolf, K.. Service Interaction: Patterns, Formalization, and Analysis. In SFM 2009, volume 5569 of Lecture Notes in Computer Science, pages 42-88. Springer-Verlag, Berlin (2009)• Barros, A., Dumas, M., ter Hofstede, A.: Service Interaction Patterns. In: Aalst, W., Benatallah, B., Casati, F. Curbera, F. (eds.) BPM 2005. LNCS, vol. 3649, pp. 302–318. Springer, Heidelberg (2005)• Mulyar, N., Aldred, L., van der Aalst, W.: The Conceptualization of a Configurable Multiparty Multi-message Request-Reply Conversation. In: Meersman, R., Tari, Z. (eds.) OTM 2007, Part I. LNCS, vol. 4803, pp. 735– 753. Springer, Heidelberg (2007)• van der Aalst, W., ter Hofstede, A., Kiepuszewski, B., Barros, A.: Workflow Patterns. Distributed and Parallel Databases 14(1), 5–51 (2003)• Russell, N., ter Hofstede, A., van der Aalst, W., Mulyar, N.: Workflow Control-Flow Patterns: A Revised View. BPM Center Report BPM-06-22, BPMcenter.org (2006)• Mulyar, N.: Patterns for Process-Aware Information Systems: An Approach Based on Colored Petri Nets. Ph.D thesis, Eindhoven University of Technology, Eindhoven (2009) PAGE 40
  • Recommended Reading (2/2)• Hohpe, G., Woolf, B.: Enterprise Integration Patterns. Addison-Wesley Professional, Reading (2003)• Russell, N., van der Aalst, W., ter Hofstede, A., Edmond, D.: Workflow Resource Patterns: Identification, Representation and Tool Support. In: CAiSE 2005. LNCS, vol. 3520, pp. 216–232. Springer, Heidelberg (2005)• Russell, N., ter Hofstede, A., Edmond, D., van der Aalst, W.: Workflow Data Patterns: Identification, Representation and Tool Support. In: ER 2005. LNCS, vol. 3716, pp. 353–368. Springer, Heidelberg (2005)• Russell, N., van der Aalst, W., ter Hofstede, A.: Workflow Exception Patterns. In: Dubois, E., Pohl, K. (eds.) CAiSE 2006. LNCS, vol. 4001, pp. 288–302. Springer, Heidelberg (2006)• Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Professional Computing Series. Addison Wesley, Reading (1995)• Alexander, C.: A Pattern Language: Towns, Building and Construction. Oxford University Press, Oxford (1977) PAGE 41
  • Challenging AnalysisQuestions
  • Questions Addressed in this Tutorial1. Exposing Services  How to inform others about me such that cooperation is possible?  Two approaches: (a) expose own behavior and (b) provide operating guideline.2. Replacing and Refining Services  How to replace or refine a service without introducing problems?  Inheritance, accordance, transformation rules, etc.3. Integrating Services Using Adapters  How to resolve behavioral incompatibilities?  Adapter generation.4. Service Mining  How to analyze the run-time behavior? PAGE 43
  • Additional Questions• Verification (e.g., various types of soundness)• Controllability (Is there a compatible partner?)• Instance migration (Can I replace a service at run- time?)• Querying software repositories (Is there a service that ... ?)• Similarity of services (What is the least incompatible service? How many edit steps are needed to transform one into the other?)• How to generate/compose services to meet specific requirements and goals? PAGE 44
  • Design-time analysis of processesProtos BPMN linear algebraic analysis techniquesYAWL Flower Markov chain Petri net analysis techniquesStaffware SAP Workflow state-space analysis techniques BPEL simulation .... PAGE 45
  • From BPEL to Petri Nets and Back• Feature complete mappings from BPEL to Petri nets: • WofBPEL (TU/e & QUT) • BPEL2oWFN (Rostock & Humboldt)• Mappings from Petri nets to BPEL: • WorkflowNet2BPEL4WS (TU/e & Aarhus) • oWFN2BPEL (Rostock & Humboldt)• Similar results hold for the BPMN, EPCs, etc.!• Be critical! Not all reported results exist :-) PAGE 46
  • Recommended Reading (1/3)• van der Aalst, W., Mooij, A.J., Stahl C., Wolf, K.. Service Interaction: Patterns, Formalization, and Analysis. In SFM 2009, volume 5569 of Lecture Notes in Computer Science, pages 42-88. Springer-Verlag, Berlin (2009)• van der Aalst, W., Lohmann, N., Massuthe, P., Stahl, C., Wolf, K.: From Public Views to Private Views: Correctness-by-Design for Services. In: Dumas, M., Heckel, H. (eds.) WS-FM 2007. LNCS, vol. 4937, pp. 139–153. Springer, Heidelberg (2008)• Massuthe, P., Reisig, W., Schmidt, K.: An Operating Guideline Approach to the SOA. Annals of Mathematics, Computing & Teleinformatics 1(3), 35–43 (2005)• Wolf, K.: Does my service have partners? In: ToPNoC II 2008. LNCS, vol. 5460, pp. 152–171. Springer, Heidelberg (2008)• Massuthe, P., Reisig, W., Schmidt, K.: An Operating Guideline Approach to the SOA. In: Proceedings of the 2nd South-East European Workshop on Formal Methods 2005 (SEEFM 2005), Ohrid, Republic of Macedonia (2005)• van der Aalst, W.M.P. et al.: Life After BPEL? In Formal Techniques for Computer Systems and Business Processes, LNCS, vol. 3670, pp. 35–50. Springer, Heidelberg (2005)• www.service-technology.org PAGE 47
  • Recommended Reading (2/3)• Lohmann, N., Massuthe, P., Wolf, K.: Operating guidelines for finite-state services. In: Kleijn, J., Yakovlev, A. (eds.) ICATPN 2007. LNCS, vol. 4546, pp. 321–341. Springer, Heidelberg (2007)• Stahl, C., Massuthe, P., Bretschneider, J.: Deciding substitutability of services with operating guidelines. In: ToPNoC II 2008. LNCS, vol. 5460, pp. 172–191. Springer, Heidelberg (2008)• Massuthe, P., Serebrenik, A., Sidorova, N., Wolf, K.: Can I find a partner? Undecidablity of partner existence for open nets. Information Processing Letters 108(6), 374–378 (2008)• van der Aalst, W.M.P., et al.: Soundness of Workflow Nets with Reset Arcs is Undecidable! In J. Kleijn and M. Koutny, editors, Proceedings of the International Workshop on Concurrency Methods Issues and Applications (CHINA08), pages 57-72 (2008)• Trcka, N., van der Aalst, W.M.P., Sidorova, N.: Data-Flow Anti-Patterns: Discovering Data-Flow Errors in Workflows, CAiSE 2009, LNCS, 2009.• Rozinat, A., van der Aalst, W.M.P.: Conformance Checking of Processes Based on Monitoring Real Behavior. Information Systems, 33(1):64-95, (2008)• van der Aalst, W.M.P., Dumas, M., Ouyang, C., Rozinat, A., Verbeek, H.M.W.: Conformance Checking of Service Behavior. ACM Transactions on Internet Technology, 8(3):29-59 (2008) PAGE 48
  • Recommended Reading (3/3)• Ouyang, C., van der Aalst, W.M.P., Breutel, S., Dumas, M., ter Hofstede, A.H.M., Verbeek, H.M.W.: Formal Semantics and Analysis of Control Flow in WS-BPEL. Science of Computer Programming, 67(2-3):162-198, 2007.• C. Ouyang, E. Verbeek, W.M.P. van der Aalst, S. Breutel, M. Dumas, and A.H.M. ter Hofstede. WofBPEL: A Tool for Automated Analysis of BPEL Processes. In B. Benatallah, F. Casati, and P. Traverso, editors, Proceedings of Service-Oriented Computing (ICSOC 2005), volume 3826 of Lecture Notes in Computer Science, pages 484-489. Springer-Verlag, Berlin, 2005.• H.M.W. Verbeek and W.M.P. van der Aalst. Analyzing BPEL Processes using Petri Nets. In D. Marinescu, editor, Proceedings of the Second International Workshop on Applications of Petri Nets to Coordination, Workflow and Business Process Management, pages 59-78. Florida International University, Miami, Florida, USA, 2005.• Lohmann, N., Massuthe, P., Stahl, C., Weinberg, D.: Analyzing interacting WSBPEL processes using flexible model generation. Data & Knowledge Engineering, 64(1), 38–54 (2008)• van der Aalst, W.M.P., Lassen, K.B.: Translating Unstructured Workflow Processes to Readable BPEL: Theory and Implementation. Information and Software Technology, 50(3):131-159 (2008)• C. Ouyang, M. Dumas, A.H.M. ter Hofstede, and W.M.P. van der Aalst. Pattern- Based Translation of BPMN Process Models to BPEL Web Services. International Journal of Web Services Research, 5(1):42-62 (2007) PAGE 49
  • A "Crash Course" inPetri Nets
  • Rules free wait enter before make_picture after leave gone occupied• Connections are directed.• No connections between two places or two transitions.• Places may hold zero or more tokens.• First, we consider the case of at most one arc between two nodes. PAGE 51
  • Enabled• A transition is enabled if each of its input places contains at least one token. free wait enter before make_picture after leave gone occupied enabled Not Not enabled enabled PAGE 52
  • Firing• An enabled transition can fire (i.e., it occurs).• When it fires it consumes a token from each input place and produces a token for each output place. free wait enter before make_picture after leave gone fire occupied Etc. PAGE 53
  • Example: Traffic Lights rg1 rg2 g1 g2 r1 go1 x go2 r2 o1 o2 or1 or2 PAGE 54
  • Example: Producers and Consumers start_production start_consumption free producer wait consumer product end_production end_consumption PAGE 55
  • Example: Four Philosophers st1 e1 t1 se1 c4 c1 t4 e2 st4 se4 se2 st2 e4 t2 c3 c2 se3 t3 e3 st3 PAGE 56
  • Definition: Petri Net start_production start_consumption free producer wait consumer product end_production end_consumption PAGE 57
  • Pre- and Post-Set start_production start_consumption free producer wait consumer product end_production end_consumption PAGE 58
  • Firing Rule start_production start_consumption start_production start_consumptionfree producer wait consumer free producer wait consumer product product end_production end_production end_consumption end_production end_consumption PAGE 59
  • Open Nets p5 p1 accept place order p6 p2 eat cook food p3 p7 pay collect money p4 p8 PAGE 60
  • Example p1 place p2 order O I eat food leave p3 pay song money p4 Ω={[p4]} PAGE 61
  • Some More Definitions start_production start_consumption free free producer wait consumer product end_production end_consumption PAGE 62
  • Interface Compatible p1 p5 p1 p5 place accept place accept order order order p2 p6 p2 p6 eat cook eat cook food food food foodleave p3 p7 get drunk leave p3 p7 get drunk pay song song collect pay song song collect money money money p4 p8 p4 p8 PAGE 63
  • Composition PAGE 64
  • Compose p1 p5 place accept order p2 p6 eat cook food food leave p3 p7 get drunk pay song song collect money p4 p8 Ω={[p4]} Ω={[p8]} PAGE 65
  • Composed Net p1 order p5 place accept p2 p6 eat cook food leave p3 p7 get drunk pay song collect p4 money p8Ω={[p4,p8]} PAGE 66
  • Deadlock Free p1 p5 place accept order p2 p6 eat cook food leave p3 p7 get drunk pay song collect moneyΩ={[p4,p8]} p4 p8 PAGE 67
  • Deadlock Free ? p1 p5 place accept order p2 p6 eat cook food p3 p7 get drunk pay song collect moneyΩ={[p4,p8]} p4 p8 PAGE 68
  • Strategy & Controllability p1 p5 M p1 p5 N place accept place accept order p2 p6N in Strat(M) order order p2 p6 M in Strat(N) eat cook food leave p3 p7 get drunk eat cook pay song collect food food leave p3 p7 get drunk money song song p4 p8 pay collect money money p4 p8 M N M is controllable N is controllable PAGE 69
  • Controllable ? N c1Ω={[c4]} Strat(N) = ø internal1 internal2 c2 c3 receive1 receive2 p1 c4 p2 AP-1: Internal Choice Receiving Follow-Up Anti-Pattern PAGE 70
  • Controllable? p1 p1 p1place place place order order order p2 p2 p2 eat eat eat food food food p3 leave p3 leave p3 pay pay song pay money money money p4 p4 p4 PAGE 71
  • Controllable? p5 p5 p5 accept accept acceptorder order order p6 p6 p6 cook collect cook food food food p7 p7 p7 get drunk song collect collect cookmoney money money p8 p8 p8 PAGE 72
  • Controllable? p1 p5 place accept order order p2 p6 eat cook food food p3 p7 get drunk pay collectΩ={[p2,p4]} money money p4 p8 PAGE 73
  • Possible Additional Requirements toRule Out Undesirable Strategies p1 p5 place accept order order p6 p2 eat cook food foodleave p7 get drunk p3 pay collect money money p4 p8 No dead transitions / Ω states need to be dead interface places PAGE 74
  • Recommended Reading• van der Aalst, W.: The Application of Petri Nets to Workflow Management. The Journal of Circuits, Systems and Computers 8(1), 21–66 (1998)• van der Aalst, W.M.P.: Business Process Management Demystified: A Tutorial on Models, Systems and Standards for Workflow Management. In J. Desel, W. Reisig, and G. Rozenberg, editors, Lectures on Concurrency and Petri Nets, volume 3098 of Lecture Notes in Computer Science, pages 1-65. Springer-Verlag, Berlin, 2004.• Desel, J., Esparza, J.: Free Choice Petri Nets. Cambridge Tracts in Theoretical Computer Science, vol. 40. Cambridge University Press, Cambridge (1995)• Murata, T.: Petri Nets: Properties, Analysis and Applications. Proceedings of the IEEE 77(4), 541–580 (1989)• Reisig, W.: Petri Nets: An Introduction. EATCS Monographs in Theoretical Computer Science, vol. 4. Springer, Berlin (1985) PAGE 75
  • Exposing Services
  • Exposing Services Service Broker repository find publish exposed bindService Requester Service ProviderServices also need to be exposed in the bilateral case! PAGE 77
  • Two main approaches• Selecting a service means to find for a given service R (whose behavior is given) a compatible service S in the repository.• One approach is to expose the behavior of S (this needs to be done for all services in the repository).• Well-behavior of the composition of R and S can be verified using standard state space verification techniques.• However, organizations usually want to hide the trade secrets of their services and thus need to find a proper abstraction of S which is published.• Another approach is to not expose the behavior of S, but a class of services R that is compatible with S, e.g., the set Strat(S).• Then the composition of R and S is compatible if Strat(S) contains R. From the set of strategies it is in general not possible to derive the original service. PAGE 78
  • First Approach p5 p1 accept p5 repositoryplace ? p6 accept cook order p6 p2 p7 p5 collect collect accept eat p8 p7 order p6 food cook ? S cook p3 p8 food get drunk p7 song collect S pay ? money p8 money p4 S R PAGE 79
  • Second Approach p1 repositoryplace ? Strat(S) order p2 eat food Strat(S) p3 ? pay ? Strat(S) money p4 R PAGE 80
  • Operating Guidelines• We advocate the second approach for reasons of efficiency and hiding trade secrets.• Problem: Strat(S) is typically infinite!• Operating guidelines provide a finite representation of a possibly infinite set of compatible services.• Here we do not explain how the operating guideline is computed (see recommended reading) and focus on its application. PAGE 81
  • Basic Idea p1 ? p5 acceptplace order order p6 p2 !order r2 ?food cook eat r3 food food !money p7 p3 r4 collect pay TS(GS1) OG(RS1) money money p8 p4 RS1 PAGE 82 GS1
  • (2) constraints ofMatching corresponding states are satisfied (1) simulation relation (weak simulation) !order r2 ?food r3 !money r4 TS(GS1) OG(RS1) PAGE 83
  • Weak simulation• R weakly simulates P iff R can mimic any behavior of P.• Formally, there exists a weak simulation relation such that: p r p rτ τ ∗ a τ ∗ p’ r’ p’ r’ a r’ PAGE 84
  • R does not weakly simulate P P R 1 1 ask ask ask question question question 2 2a 2b p r yes no yes no 3 4 3 4 p PAGE 85
  • R weakly simulates P, but ...P does not weakly simulate R P R 1 1 smoke smoke 2 smoke 2 smoke die diesmoke live rip rip die PAGE 86
  • Evaluating Expressions expr1 = a! or b? or c! or d? or f? expr1 = (a! or b? or c!) and d? expr1 = (a! and final) or d! s1: expr1 a! e?a! c! b? d? b? s2: expr2 s6: expr6 c! s3: expr3 s5: expr5 s4: expr4 PAGE 87
  • GS1 is a Strategy for RS1 p1 ? p5 acceptplace order order p6 p2 !order r2 ?food cook eat r3 food food !money p7 p3 r4 collect pay TS(GS1) OG(RS1) money money p8 p4 RS1 PAGE 88 GS1
  • Operating Guideline• N is an open net• BΦ is a Boolean Annotated Service Automaton (BSA), i.e., an automaton with annotated states that aims to describe (possible infinite) sets of open nets• Match(BΦ) is the set of all open nets that match with BΦ (all nets that are weakly simulated by BΦ such that constraints of corresponding states are satisfied)• OG(N) is the operating guideline for N, i.e., a BSA BΦ such that Match(BΦ) = Strat(N) PAGE 89
  • Another Example ? order order r5 !order food r6 food ?food ? τ r7 !money money money r8 PAGE 90
  • Not Matching r5 !order r6 ?foodτ r7 !money r8 PAGE 91
  • Repaired Service Behavior r5 !order r6 ?food r7 !money r8 PAGE 92
  • Most Permissive Strategy PAGE 93
  • Recommended Reading• van der Aalst, W., Mooij, A.J., Stahl C., Wolf, K.. Service Interaction: Patterns, Formalization, and Analysis. In SFM 2009, volume 5569 of Lecture Notes in Computer Science, pages 42-88. Springer-Verlag, Berlin (2009)• van der Aalst, W., Lohmann, N., Massuthe, P., Stahl, C., Wolf, K.: From Public Views to Private Views: Correctness-by-Design for Services. In: Dumas, M., Heckel, H. (eds.) WS-FM 2007. LNCS, vol. 4937, pp. 139–153. Springer, Heidelberg (2008)• Massuthe, P., Reisig, W., Schmidt, K.: An Operating Guideline Approach to the SOA. Annals of Mathematics, Computing & Teleinformatics 1(3), 35–43 (2005)• Wolf, K.: Does my service have partners? In: ToPNoC II 2008. LNCS, vol. 5460, pp. 152–171. Springer, Heidelberg (2008)• Massuthe, P., Reisig, W., Schmidt, K.: An Operating Guideline Approach to the SOA. In: Proceedings of the 2nd South-East European Workshop on Formal Methods 2005 (SEEFM 2005), Ohrid, Republic of Macedonia (2005) PAGE 94
  • Replacing andRefining Services
  • Replacing or Refining Services service replace service or A refine D service service B C PAGE 96
  • Accordance service service service A’ A DStrat(A) subset of Strat(A) Strat(C) subset service service service of Strat(C) B C’ C PAGE 97
  • Projection Inheritance is Too Strict p5 p5 accords with accept accept order order p6 (while there is p6 no inheritance cook relation) cook food food p7 p7 collect collect money money p8 p8 PAGE 98
  • Refinement Accordance can be checked using operating guidelines! Details not important at this stage. PAGE 99
  • Transformation Rules P P A B X Y Strat(X) = Strat(Y) PAGE 100
  • Inheritance Preserving TransformationRules (1/2)R R R Ai Ai Aia a a Ao Ao Ao d p1p1 p3 p1 Bi Bi Bib b d b Bo Bo Bop2 p2 p4 p2 Ci Ci Cic c c Co Co CoS S S PAGE 101
  • Inheritance Preserving TransformationRules (2/2)R R Inheritance Ai Ai preservinga a Ao Ao transformation rules alsop1 p3 p1 preserve Bi Bi accordance! b d b Bo Bop2 p2 Ci Ci c c But are too Co Co strong ...S S PAGE 102
  • Accordance Preserving TransformationRule 1 R R t1 a a p = t12 t2 b b S S PAGE 103
  • Accordance Preserving TransformationRule 2 R R t1 a a p = t12 t2 b b S S PAGE 104
  • Accordance Preserving TransformationRule 3 R R t1 a a p = t12 t2 b b S S PAGE 105
  • Accordance Preserving TransformationRule 4 R R t1 t1 a p1 p2 a p = t2 t3 b p3 p4 b t2 t4 S S PAGE 106
  • Another Type of Anti Pattern R R t1 a t1 a p p t2 b t2 b S S PAGE 107
  • Strategy for one net and not the other p1 p1 R t3 R t3R R p2 p2t1 a a t4 t1 a a t4p p3 p p3t2 b b t5 t2 b b t5 p4 p4S S S t6 S t6PAGE 108
  • Strategy for one net and not the other p1 p1 R t3 R t3R R p2 p2t1 a t1 a a t4 t7 a t4 t7p p3 p5 p p3 p5 b t5 b t5t2 b t2 b p4 p4S S S t6 S t6 PAGE 109
  • Accordance Preserving TransformationRule 5 R R t1 a t6 t1 a p1 f p4 p1 f ⊆ t2 t3 t7 t2 t3 b b c c p2 p3 p2 p3 t4 t5 t4 t5 d d e e S S PAGE 110
  • Recommended Reading• van der Aalst, W., Mooij, A.J., Stahl C., Wolf, K.. Service Interaction: Patterns, Formalization, and Analysis. In SFM 2009, volume 5569 of Lecture Notes in Computer Science, pages 42-88. Springer-Verlag, Berlin, (2009)• van der Aalst, W., Lohmann, N., Massuthe, P., Stahl, C., Wolf, K.: From Public Views to Private Views: Correctness-by-Design for Services. In: Dumas, M., Heckel, H. (eds.) WS-FM 2007. LNCS, vol. 4937, pp. 139–153. Springer, Heidelberg (2008)• Basten, T., Aalst, W.: Inheritance of Behavior. Journal of Logic and Algebraic Programming 47(2), 47–145 (2001)• van der Aalst, W.M.P., Basten, T.: Inheritance of Workflows: An Approach to Tackling Problems Related to Change. Theoretical Computer Science, 270(1-2):125-203 (2002) PAGE 111
  • Integrating ServicesUsing Adapters
  • The Need For Adapters ?service service A Bservice service adapter A B PAGE 113
  • Example tourist cook cOrder tFood ? cFood tMoney cMoney PAGE 114
  • Adaptertourist cook cOrder cOrder tFood tFood cFood cFood tMoney tMoney cMoney cMoney adapter PAGE 115
  • Adapter ?????tourist cook cOrder cOrder tFood tFood cFood cFood tMoney tMoney cMoney cMoney adapter PAGE 116
  • Specification of Elementary Activities (SEA)• To avoid creating money, deleting evidence, confusing meters with liters, etc. PAGE 117
  • SEA Example tourist cook cOrder tFood cFood cOrder tFood cFood tMoney cMoney tMoney cMoney PAGE 118
  • Overall Idea Controller cOrder tFood cFood SEA- Based Engine tMoney cMoney PAGE 119
  • SEA-Based Engine n = notify e = enable (tFood,e) (tMoney,n) (food,e) (food,n) (order,e) (order,n) (money,e) (money,n) (cFood,n) (cOrder,e) (cMoney,e) (order,c) (cOrder,c) (cOrder,s) cOrder (tFood,s) (tFood,c) (food,c) (cFood,c) (cFood,r)tFood cFood (tMoney,r) (tMoney,c) (money,c) (cMoney,c) (cMoney,s)tMoney cMoney s=send n = notify r=receive e = enable c=actual transformation PAGE 120
  • Business As Usual ...• Selecting a controller is like selecting a strategy.• One approach is to construct "the" most permissive one Controller (tFood,e) (tMoney,n) (food,e) (food,n) (order,e) (order,n) (money,e) (money,n) (cFood,n) (cOrder,e) (cMoney,e) (order,c) (cOrder,c) (cOrder,s) cOrder cOrder tFood tFood (tFood,s) (tFood,c) (food,c) (cFood,c) (cFood,r) cFood cFood tMoney (tMoney,r) (tMoney,c) (money,c) (cMoney,c) (cMoney,s) tMoney cMoney cMoney PAGE 121
  • Recommended Reading• van der Aalst, W., Mooij, A.J., Stahl C., Wolf, K.. Service Interaction: Patterns, Formalization, and Analysis. In SFM 2009, volume 5569 of Lecture Notes in Computer Science, pages 42-88. Springer-Verlag, Berlin, 2009.• Gierds, C., Mooij, A., Wolf, K.: Specifying and generating behavioral service adapters based on transformation rules. Preprints CS-02-08, Institut fur Informatik, Universität Rostock (2008)• Mooij, A., Voorhoeve, M.: Proof techniques for adapter generation. In: Proc. WSFM (2008) PAGE 122
  • Service Mining
  • Correctness at "model-time" is irrelevant! PAGE 124
  • PAGE 125
  • PAGE 126
  • Process Mining • Process discovery: "What is really happening?" • Conformance checking: "Do we do what was agreed upon?" • Performance analysis: "Where are the bottlenecks?" • Process prediction: "Will this case be late?" • Process improvement: "How to redesign this process?" • Etc. PAGE 127
  • • Process discovery: "What is the real curriculum?"• Conformance checking: "Do students meet the prerequisites?"• Performance analysis: "Where are the bottlenecks?"• Process prediction: "Will a student complete his studies (in time)?"• Process improvement: "How to redesign the curriculum?" PAGE 128
  • Screenshot of ProM 5.0 PAGE 129
  • Example Setting for Service Mining BPEL choreography PAGE 130
  • PAGE 131
  • Recommended Reading• van der Aalst, W.M.P., Dumas, M., Ouyang, C., Rozinat, A., Verbeek, H.M.W.: Conformance Checking of Service Behavior. ACM Transactions on Internet Technology, 8(3):29-59, 2008.• Rozinat, A., van der Aalst, W.M.P.: Conformance Checking of Processes Based on Monitoring Real Behavior. Information Systems, 33(1):64-95, 2008.• van der Aalst, W.M.P., Reijers, H.A., Weijters, A.J.M.M., van Dongen, B.F., Alves de Medeiros, A.K., Song, M., Verbeek, H.M.W.: Business Process Mining: An Industrial Application. Information Systems, 32(5):713-732, 2007.• www.processmining.org• Process Mining: Discovery, Conformance and Enhancement of Business Processes by W.M.P. van der Aalst, Springer Verlag, 2011 (ISBN 978-3- 642-19344-6). http://www.processmining.org/book/ PAGE 132
  • Conclusion
  • Service Interaction Demystified service service A D service service• Patterns and B C Anti-Patterns• Formalization• Analysis PAGE 134
  • Questions Addressed1. Exposing Services  How to inform others about me such that cooperation is possible?  Two approaches: (a) expose own behavior and (b) provide operating guideline.2. Replacing and Refining Services  How to replace or refine a service without introducing problems?  Inheritance, accordance, transformation rules, etc.3. Integrating Services Using Adapters  How to resolve behavioral incompatibilities?  Adapter generation.4. Service Mining  How to analyze the run-time behavior? PAGE 135
  • Relevant WWW sites• http://www2.informatik.hu-berlin.de/top/best/• http://www.service-technology.org• http://www.workflowpatterns.com• http://www.processmining.org• http://promimport.sourceforge.net• http://prom.sourceforge.net• http://www.workflowcourse.com• http://www.vdaalst.com PAGE 136