Elements of Web Services Choreography by kwd15566

VIEWS: 11 PAGES: 32

									       Elements of
Web Services Choreography
       Jean-Jacques Dubray




       WS-CHOR f2f 3/13/03
       Redwood Shores, CA
                     Bio
• Got interested by B2B, BPM and XML in 1998 at
  NEC System Laboratories
• 1999 - eXcelon to develop a B2B Integration
  Server based on a Business Process Engine
• 2001 - Eigner (PLM vendor) to design next
  generation architecture
• Contributor to OAG (IF), ebXML (BPSS), and
  BPML (ebXML binding)
• Represent no particular interest, just want to
  learn, share ideas and experiences
                          Outline
•   Introduction
•   Paradigm Shifts
•   WS-Choreography and SOA
•   Collaboration, Choreography and Orchestration
•   Elements of WS-Choreography
    –   Message Exchange Patterns
    –   Choreography protocol
    –   Transactional behavior
    –   Message content
    –   Control flow
    –   Technical Binding
• Conclusions
              Introduction
• XML, Web Service and BPM will
  revolutionize the way we built applications
• Applications as we know it will disappear
  – 1990-1999 looking for a better way to build
    applications (CORBA/DCOM, J2EE, but also
    EDOC, BOCA, …)
  – 2000-2010 found the better way
• Towards a new “component model”: SOA
             Paradigm Shifts
• Can the web do for applications what it had
  done for humans?
  – From a given application access any service (data,
    transaction, computation) regardless of its location
• Can the web give us hints on a better application
  model?
  – Loosely coupled, plug & play, Message based
  – REST?
• Meta, Meta, Meta
  – Current programming languages show lots of
    limitations when developing business applications
    (e.g Java/J2EE, C#/.NET)
       WS-Choreography is at the
           convergence of
•   B2B
•   EAI
•   Distributed computing model
•   Applications models (s.a. J2ee and .NET)
WS-Choreography and SOA


               Request

Web Services             Internet            Web Services
       This is the WRONG
 Provider                           Response  Provider

         Picture for SOA
  J2EE™               SOAP
 AppServer           Messages                  .NET
                     What is a Service?

                                                                         Load Payable




                                         Accounts       Sync Party           Human                               Accounts
                                        Receivable                          Resources                            Payable

                                                       Lo                   Sync
                                                         ad
                                                            R               Employee       Sync
                                                            ec
                                                              eiv           Work         Personnel
                                                                  ab
                                                                    le      Schedule


                                       Order
                                                     Update SalesOrder
                                                     Sync SalesOrder
                                                                      This isCustomer
                                     Management      Add SalesOrder
                                                                      A    r
                                                                              Service

                                                                         te
                                                                      as

                      Sync ItemMaster                          Ite
                                                                  Service
                                                                   m
                                                                     M
                                                                          o
                                                                               en
                                                                              m t
                                                                            ve en
                                                                                 t
                                                                                       Create
                                                                                     ProductionOrder
                                                                                                         Post JournalEntry
                                                           nc           M m                          Sync ChartOfAccounts
                                                         Sy           ry v e
                                                                    to o
                                                                 en yM
                                                             Inv tor
                    Get PickList                          ue en                                Sync ExchangeRate     General
                                                        ss Inv
                                                       I e                         Production
                   Show PickList                          iv                                                          Ledger
                                        Inventory
       Receiving                                        ce
                   Update PickList                   Re



OAGIS 8.0 Scenario 41
  SOA’s Foundation is “Peer-to-Peer”
                                                                                Sync ItemMaster
                                                                             Sync ProductionOrder
                                                                                                                                Manufacturing
                                                                                  Sync Routing                                 Capacity Analysis
                                                                              Sync BillOfMaterial

                                 No Application
                     Sync ItemMaster
                                 Or Corporation
                   Sync ProductionOrder




                                                                                                                                                                                Confirm InventoryIssue
                                  Boundaries
                            Sync Routing
                       Sync BillOfMaterial
                                                          ERP




                                                                                                                                                            Update WIPConfirm
                                                                                                                               Sync Prodorder
                                                                                                                Sync Routing
                                                                                                     Sync BOM




                                                                                                                                                Sync Item
                                                    Confirm InventoryIssue



                                                                                 Update WIPConfirm
           Manufacturing/
            Production
             Planning



                                Sync DispatchList                                                     Manufacturing
                                Get DispatchList                                                     Execution (MES)

                                Show DispatchList

OAGIS 8.x Scenario 50
         Intra / Inter Company
          Message Exchange
• Message exchange between corporation
  boundaries is sufficiently different to justify
  special treatments:
  – State alignment (no shared “memory”)
  – Legal aspects (non-repudiation)
  SOA as an Application Model
Thin
       (MVC Revisited)
 Fat
Other
                              Firewall

        Task Engine


              Process & Data
                 Process Engine
                Federation


  ERP                 PLM1               PLM2
  Model               Model              Model
           Key Takeaway
• Ws-chor is a major enabler of SOA
• Ws-chor foundation is peer-to-peer
Collaboration, Executable Business
     Processes and Services
        Start

Buyer           Supplier           Order Entry             ROLE
                                                         Manager      Billing
                  (Self)


        PO                 PO
        AckPO              PO


        BTA1               Wit1
                                     Executable
                                      Business
                                       Process
      B2B
                           PO                    Sales
  Collaboration            AckPO                 order     Message
                                                           Exchange
                           OpA1                  OpA2
   Collaboration And Executable
         Business Process
• Both are state machine
• A collaboration has no engine associated
  with it (nothing is in the middle)
  – It is merely the execution of activities of the
    executable business processes in each party
    that advances the state of the collaboration
   Collaboration And Executable
        Business Processes
• The Process Engine is responsible for:
  – Mapping (many-to-one-one-to-many)
  – Decoupling services via message routing
     • sequence, flow, switch, while
  – Monitoring (coupled) interaction between services to
    advance the state of the process instance
• A Collaboration “service” is responsible for
  ensuring that an incoming/outgoing message is
  expected at this point in time
  – No mapping, no routing, no “advancement”
                (Business) Components
                    a.k.a. Services
        Start

Buyer           Supplier            Order Entry           Manager    Billing
                  (Self)

                                                            Review
        PO          Map     PO
        AckPO               PO                                PO
                    Route
                                                             Task
        BTA1                Wit1




                                                                        Process
                            PO       Process      Sales
                            AckPO                 order                  Sales
                                       PO
                                                                         Order
                            OpA1                  OpA2


                                               Orchestration
 Choreography and Orchestration
• Business component can exhibit a long running
  behavior and looking from the perspective of
  such component, the flow of messages between
  itself and other components can also be
  expressed using a meta language.
  – This is orchestration
• The confusion is that Components are typically
  very coarse and can directly be exposed to
  partners. The long-running behavior might also
  be complete.
Choreography and Orchestration
  Eigner PLM      BPM                         SAP

          Sync
          BOM        Transform
                       Route


                                 [for each]


                                 Sync Item


                                                         exists?
                                                    no
                                 Sync BOM                          yes
                                                Create BOM
                                                          Update BOM
                   [any error]
                                                     Create History




                 Failure          Success
           Key Takeaway
• ws-chor applies to Collaboration and
  executable business processes
• Orchestration might be different
Elements of WS-Choreography
•   What do we choreograph, how?
•   What is a message content?
•   Choreography between who/what?
•   Choreography technical binding
              Choreograph Messages or
             Message Exchange Patterns?

  One way


Notification

   Solicit
Response

 Request
Response
Message Exchange Pattern
     Choreography
                                              This is far easier
                                               than trying to
                    PO                         choreograph
                                              Notifications and
                                                 One ways
                           AckPO


        Change                       Change
Buyer     PO                           PO        Seller

                 AckPO      AckPO


                           Invoice


                 Payment
       Choreography Protocol
• There is a need, specially in B2B scenario to
  exchange signals in addition to messages
• Signals feature typically a fixed format and carry
  special meaning
   – Message structure and content is valid
   – Message was successfully processed by the
     receiving application
• Signals are typically part of the Message
  Exchange Pattern
• Exception associated to signal content:
  business, technical exception
Choreograph Exceptions
Buyer             Supplier             Order Entry            Billing
                   (Self)
                                               [TechnicalFailure]
          PO



         BTA1
                               PO
                                                 [BusinessFailure]

                             OpA1




                             Invoice
                                                                          [AnyFailure]


                                          OpA2
        Invoice

                                                               [AnyFailure]
         BTA2                            [Success]




                                         Success                         Failure
      Transactional Behavior
• WSCI, BPEL4WS features transaction
  specifications as part of the choreography
  – BPEL4WS scopes
• BPSS doesn’t, all compensating
  transactions must be explicit
• Transactional behavior sounds reasonable
  to be within the scope of WS-Chor
• First step is expressing meaningful
  exceptions: timeout, technical, business,…
         Message Content
• Any number of XML or Binary documents
• XML document type or content might be
  used to specify condition expressions in
  the control flow
      Control Flow Specification
•   Prof. van der Aalst patterns
•   BPEL4WS
•   WSCI
•   BPSS
•   Receive / Reply issue
    – BPML spawns a new sub process altogether
    – BPSS has an onInitiation condition
    – BPEL correlates a reply with a receive. The reply can
      be located anywhere in the choreography
• Should consolidate to one control flow, no need
  for half-baked overlapping specification there.
   Control Flow Specification
        Start

Buyer           Supplier               Order Entry           Manager         Billing
                  (Self)


        PO                     PO
        AckPO                  PO

                      Collaboration Control Flow
        BTA1                Wit1
                     Semantics are different from
                         the semantics of an
                     executable business process
                               PO                    Sales
                               AckPO                 order


                              OpA1                   OpA2



                           [BusinessFailure]                   [Success]


                                       Failure                         Success
          Technical Binding
• Two approaches
  – Start with WSDL specification and express a
    choreography of these services
  – I suggest an alternative approach which I
    think will work better
    • Specify the choreography in terms of roles and
      usage of message exchange pattern types
    • Then generate the corresponding WSDL
      automatically
         Beyond Choreography
• UMM
• Business Collaboration Patterns &
  Monitored Commitments, e.g. from COOL:
  –   Negotiation: Offer and Counter-offer
  –   Offer and Acceptance
  –   Commitment and Fulfillment
  –   Deliver the goods and Pay for them
• REA
  – http://homepage.interaccess.com/~linkage/REA4SCM.htm
• Business Entities
  – http://www.collaborativedomain.com/standards/
               Conclusion
• SOA appears as a valid application model
  moving forward
  – No more application or corporation boundary
  – Process and Data federation
  – Decoupled services?
• SOA is at the convergence of traditional
  application models, EAI and B2B
• Service Choreography is essential to SOA
               Conclusion
• Service Choreography MUST be peer-to-peer
• Scope is everything that is pure message
  exchange: Collaboration and EBP
• Message Exchange Patterns are the units of
  what is being choreographed
• B2B is different than EAI / Business Process
  Execution
• More metadata is good by beware of metadata
  hell and poorly articulated layers

								
To top