WS-BPEL




                                                        A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
  Web   Service Business Process Execution Language

  Language
          to describe business processes
  implemented as Web services

  Described   as XML document

              <process  name="example">
                  <sequence>
                      <receive  partnerLink="p1"  />
                      <invoke  partnerLink="p2"  />
                      <reply  partnerLink="p1"  />
                  </sequence>
              </process>
                                                                       2
Petri Net Semantics for WS-BPEL




                                         A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
   Goal:
        a formal semantics for WS-BPEL
     … to understand WS-BPEL
     … to analyze WS-BPEL processes

   Formal   model: open workflow nets

     workflow nets
   + interface
   – structural constraints
   = open workflow nets

                                                         3
Example: <receive> Activity
                      initial




                                                                                     A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                                                                   stop
                                                         t4
    channel
              x
                       t1

                  x
                      running          x
                                                         t5
                  x           x
                                                     x                    variable
                                                                             v
                      t2                             y
                                                                   stopped
                                  t3       faulted       t6


                              faultName
                                                              t7
                                                                   failed
                      final
                                                                                                  4
Example: <flow> Activity




                                                            A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                          initial

                                                  stop
                    t1                  t3



                running                      t4




        A                           B



                                        t5
                            sync
                                                  stopped
                                             t6

                          final                                              5
New Features of WS-BPEL 2.0




                                                      A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
   Semanticclarifications
     What happens during compensation?


   Syntactic
           sugar
     <repeatUntil> activity, inline validation, …


   Some new activities and features
     <forEach> activity, termination handlers, ...




                                                                    6
Implementation




                                                                                         A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                                         BPEL2oWFN
                            meta model           Petri net model

                           Abstract                  Petri Net
                          Syntax Tree                  API

      BPEL process                                                        Petri net


                          Control/Data            Pattern
Input Formats:            Flow Graph             Repository          Output Formats:
  WS-BPEL 2.0                                                         Fiona oWFN
                           static analysis       pattern selection
  BPEL4WS 1.1                                                         LoLA
  Abstract WS-BPEL 2.0                                                PNML
  BPEL4Chor                                                           INA, PEP, SPIN
  WSDL 1.1                                                            …



           http://www.gnu.org/software/bpel2owfn
                                                                                                         7
Applications of the Semantics (1)




                                                         A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
 Open workflow nets allow for…

   Analysis  of the inner of the oWFN (w/o interface)
      Deadlock freedom
      (relaxed) Soundness
      Temporal logics
      …


   Analysis   results can be mapped back to WS-BPEL



                                                                        8
Tools4BPEL Tool Chain (1)




                                                         A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                        BPEL2oWFN




              WS-BPEL                 Petri Net
              Process                  Model



  LoLA2BPEL                                       LoLA
                            Witness
                             Path



                                                                       9
Applications of the Semantics (2)




                                                          A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
 Open workflow nets allow for…

   Analysis of the open workflow net
      Consistency
      Controllability
      Partner synthesis
      …


   Synthesis   results can be re-translated to WS-BPEL



                                                               10
Tools4BPEL Tool Chain (2)




                                                      A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                        BPEL2oWFN




              WS-BPEL                 oWFN
              Process                 Model



 oWFN2BPEL                                    Fiona
                            Partner
                            oWFN



                                                               11
Summary (1)




                                                      A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
   Feature-complete semantics for WS-BPEL 2.0
   and its predecessor specification

   Simplified   patterns for important constructs

   Case study:
                      Old Semantics   New Semantics
        Places             410             242
        Transitions       1,069            397
        States          6,261,648        304,007

   Compiler   BPEL2oWFN
                                                             12
Summary (2)




                                                           A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
   Petri
       net semantics allows to formally analyze
   WS-BPEL processes

   Analysis   results can be re-translated into WS-BPEL

   Completetool chains help to “conceal” formal
   methods from the WS-BPEL designer

   Danger:
         new semantics needed for future versions
   WS-BPEL 2.1, WS-BPEL 3.0, WS-BPEL 4.0, …

                     Thank you very much!                          13
Parallel <forEach>




                                                                                                                               A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                                                                            initial


                                                               initialize
                                                                                      running




                                                                                                 stop1
                 initial stop                                                                                        stop
                                      stop3                     x
                                                                        b                        stop2
                    stopped                                      active
                                                                                                          stopping
                                        t1
                                                                                                                     stopped
         scope




                  Successful    x=0
                                                                                      skipping
                                                                                                    all stopped
                                                          x
                                 t2
                                                    x
                 !Successful    x=0                             c
                                                    x-1       counter
                                                                                      finish2
                                 t3                  x
                        final   x>0

                                 t4                              finish1


                                             done
     instance 1

                                                                            final




                                                                                                                                       15
<scope>




                                                                                                                                                                                                                      A Feature-Complete Petri Net Semantics for WS-BPEL 2.0
                                                                                                                                                                            !Exiting             Exiting
                initial                         fault in                     ch fault up                              compensate


                                                                                                     Active
                                                        fn              fn                                                                                                 inner stopped
                                                                                     fn
                                                      fn              ignore
                                                                      fault
  !Active            initialize   Active      term                                                            Successful        !Successful               Active               !Active
                                                                                         pass
                                                                                            handle
                                                      fn     !Active                                               start ch                skip ch             start th             skip th
                                                                    inner
                                                        fsave       stopped                                                                                                            stop
                                   stop                                      stop                                                            ch stop                                                       stop
             inner activity        inner                                                                             activity of the
                                                                             stopped              skip                                       ch stopped             termination                            stopped
                 and               stopped           fault handlers                                                  compensation
                                                                                                                                                                      handler
            event handlers                                                                                              handler                                                        stopped
                                   fault in                                  fault up           fn                                                                                                         fault up

                                                                                                                                       ch fault up
                                                           final                                                     compensated                                     stopped
                     finalize



                                                                                    fn                 fn
!Successful                Successful




                 final                                                                   ch fault in                                         compensated


       positive control flow                                       fault handling                                 compensation handling                            termination handling

                                                                                                                                                                                                                           16

A Feature-Complete Petri Net Semantics for WS-BPEL 2.0

  • 2.
    WS-BPEL A Feature-Complete Petri Net Semantics for WS-BPEL 2.0   Web Service Business Process Execution Language   Language to describe business processes implemented as Web services   Described as XML document <process  name="example">    <sequence>        <receive  partnerLink="p1"  />        <invoke  partnerLink="p2"  />        <reply  partnerLink="p1"  />    </sequence> </process> 2
  • 3.
    Petri Net Semanticsfor WS-BPEL A Feature-Complete Petri Net Semantics for WS-BPEL 2.0   Goal: a formal semantics for WS-BPEL … to understand WS-BPEL … to analyze WS-BPEL processes   Formal model: open workflow nets workflow nets + interface – structural constraints = open workflow nets 3
  • 4.
    Example: <receive> Activity initial A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 stop t4 channel x t1 x running x t5 x x x variable v t2 y stopped t3 faulted t6 faultName t7 failed final 4
  • 5.
    Example: <flow> Activity A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 initial stop t1 t3 running t4 A B t5 sync stopped t6 final 5
  • 6.
    New Features ofWS-BPEL 2.0 A Feature-Complete Petri Net Semantics for WS-BPEL 2.0   Semanticclarifications   What happens during compensation?   Syntactic sugar   <repeatUntil> activity, inline validation, …   Some new activities and features   <forEach> activity, termination handlers, ... 6
  • 7.
    Implementation A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 BPEL2oWFN meta model Petri net model Abstract Petri Net Syntax Tree API BPEL process Petri net Control/Data Pattern Input Formats: Flow Graph Repository Output Formats:   WS-BPEL 2.0   Fiona oWFN static analysis pattern selection   BPEL4WS 1.1   LoLA   Abstract WS-BPEL 2.0   PNML   BPEL4Chor   INA, PEP, SPIN   WSDL 1.1   … http://www.gnu.org/software/bpel2owfn 7
  • 8.
    Applications of theSemantics (1) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 Open workflow nets allow for…   Analysis of the inner of the oWFN (w/o interface)   Deadlock freedom   (relaxed) Soundness   Temporal logics   …   Analysis results can be mapped back to WS-BPEL 8
  • 9.
    Tools4BPEL Tool Chain(1) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 BPEL2oWFN WS-BPEL Petri Net Process Model LoLA2BPEL LoLA Witness Path 9
  • 10.
    Applications of theSemantics (2) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 Open workflow nets allow for…   Analysis of the open workflow net   Consistency   Controllability   Partner synthesis   …   Synthesis results can be re-translated to WS-BPEL 10
  • 11.
    Tools4BPEL Tool Chain(2) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 BPEL2oWFN WS-BPEL oWFN Process Model oWFN2BPEL Fiona Partner oWFN 11
  • 12.
    Summary (1) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0   Feature-complete semantics for WS-BPEL 2.0 and its predecessor specification   Simplified patterns for important constructs Case study: Old Semantics New Semantics Places 410 242 Transitions 1,069 397 States 6,261,648 304,007   Compiler BPEL2oWFN 12
  • 13.
    Summary (2) A Feature-Complete Petri Net Semantics for WS-BPEL 2.0   Petri net semantics allows to formally analyze WS-BPEL processes   Analysis results can be re-translated into WS-BPEL   Completetool chains help to “conceal” formal methods from the WS-BPEL designer   Danger: new semantics needed for future versions WS-BPEL 2.1, WS-BPEL 3.0, WS-BPEL 4.0, … Thank you very much! 13
  • 15.
    Parallel <forEach> A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 initial initialize running stop1 initial stop stop stop3 x b stop2 stopped active stopping t1 stopped scope Successful x=0 skipping all stopped x t2 x !Successful x=0 c x-1 counter finish2 t3 x final x>0 t4 finish1 done instance 1 final 15
  • 16.
    <scope> A Feature-Complete Petri Net Semantics for WS-BPEL 2.0 !Exiting Exiting initial fault in ch fault up compensate Active fn fn inner stopped fn fn ignore fault !Active initialize Active term Successful !Successful Active !Active pass handle fn !Active start ch skip ch start th skip th inner fsave stopped stop stop stop ch stop stop inner activity inner activity of the stopped skip ch stopped termination stopped and stopped fault handlers compensation handler event handlers handler stopped fault in fault up fn fault up ch fault up final compensated stopped finalize fn fn !Successful Successful final ch fault in compensated positive control flow fault handling compensation handling termination handling 16