chapter 13: process specifications service-oriented computing: semantics, processes, agents –...

20
Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Post on 20-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13:Process Specifications

Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Page 2: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 2Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Highlights of this Chapter

Processes Describing Dynamics with UML Workflows Business Process Languages

BPEL4WS (WS-BPEL) ebXML RosettaNet

PSL: Process Specification Language

Page 3: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 3Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Processes and Workflows

BPEL4WSOWL-S Service

Model

ebXMLCPA

Process and workfloworchestrations

QoS: Servicedescriptions and bindings

Contracts andagreements

XLANG

WSCL

WSDLebXML

CPP

ebXMLBPSS

XML, DTD, and XML Schema

HTTP, FTP, SMTP, SIP, etc.

SOAPebXML

messaging

OWL

UDDIebXML

Registries

WSCLWSCI

WS-Coordination

WS-AtomicTransaction and WS-BusinessActivity

OWL-S ServiceGrounding

OWL-S ServiceProfile

BTP

BPML

Discovery

Messaging

Transport

QoS: Conversations

QoS: Choreography

QoS: Transactions

Encoding

WS-Policy

WS-Security

WS-ReliableMessaging

PSL

RDF

Page 4: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 4Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Process Abstractions

Orchestration: A process is a partial order of actions (activity graph, script) under the control of a central conductor; akin to a workflow [Global; central]

Choreography: A process is an exchange of messages among participants; akin to a conversation as described by WSCL and WSCI [Global; distributed]

Collaboration: A process is a joint set of activities among business partners [Local; distributed]

Workflow: a narrower concept than a process, which emphasizes control flows and data flows from a central perspective; usually tool-specific

Page 5: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 5Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Describing Dynamics with UMLUML provides graphical constructs that can be

used to describe (1) actions and activities, and (2) temporal precedence and control flows. The allowable control constructs are

Sequence: a transition from one activity to the next in time

Branch: a decision point among alternative flows of control

Merge: where two or more alternative flows of control rejoin

Fork: a splitting of a flow of control into two or more concurrent and independent flows of control

Join: a synchronization of two or more concurrently executing flows of control into one flow

Page 6: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 6Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

UML Activity Diagram

Receive PO

Get Items from InventoryUpdate Customer Profile

Compute Subtotal

Compute Shipping Cost

Compute Export Tax

Compute International Shipping

Compute Total

[ship within US] [ship outside US]

Ship Order

Fork

Join

Branch

Merge

Implementation of a vendor’s purchase process

Page 7: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 7Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Example Workflow for Telecommunications Order Processing

Takesevicerequest

Checkhardwareavailability

&Scheduleservice

installation

Installservice

Stop&Createbillingrecord

Checkcredit

(Ok)

(Available)

Workflow tools support specialized (ad hoc) notations

Page 8: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 8Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Flow Interoperability Patterns

Process 1 Process 2

Process 1 Process 2Process 2Process 1

ActionState 1

ActionState 2

ActionState A

Chained Interoperability

ActionState 1

ActionState 2

ActionState A

Nested Interoperability

ActionState 1

ActionState 2

ActionState C

Synchronized Interoperability

ActionState 3

ActionState B

ActionState A

ActionState 3

Chained Nested Synchronize

d

What guarantees would you obtain from each?

How would you accommodate exceptions in each?

Page 9: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 9Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

BPEL4WS Metamodel-name-property

CorrelationSetCompensationHandler

-name

Process Activity

-myRole-serviceLinkType-name

Partner

-messageType-name

Container

-faultContainer-faultName

FaultHandlerReply

Page 10: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 10Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

A BPEL4WS process is a composite Web service with a WSDL description

Web Service

portType

portType

portType

<receive>

<receive>

<reply>

<reply>

BPEL4WSProcess

Page 11: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 11Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Example BPEL4WS Specification for a Stock Quotation Composite Service

<process name="simple" targetNamespace="urn:stockQuoter" xmlns:tns="urn:stockQuoter" xmlns:sqp="http://tempuri.org/services/stockquote" xmlns=&BPEL;/>

<containers> <container name="request" messageType="tns:request"/> <container name="response" messageType="tns:response"/> <container name="invocationRequest" messageType="sqp:GetQInput"/> <container name="invocationResponse" messageType="sqp:GetQOutput"/> </containers> <partners> <partner name="caller" serviceLinkType="tns:StockQuoteSLT"/> <partner name="provider" serviceLinkType="tns:StockQuoteSLT"/> </partners>

<sequence name="sequence"> <receive name="receive" partner="caller" portType="tns:StockQuotePT" operation="wantQuote" container="request" createInstance="yes"/> <assign> <copy> <from container="request" part="symbol"/> <to container="invocationRequest" part="symbol"/> </copy> </assign> <invoke name="invoke" partner="provider" portType="sqp:StockQuotePT" operation="getQuote" inputContainer="invocationRequest" outputContainer="invocationResponse"/> <assign> <copy> <from container="invocationResponse" part="quote"/> <to container="response" part="quote"/> </copy> </assign> <reply name="reply" partner="caller" portType="tns:StockQuotePT" operation="wantQuote"

container="response"/> </sequence></process>

Page 12: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 12Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Electronic Business Extensible Markup Language (ebXML)

Established by UN-CEFACT (United Nations Centre for Trade Facilitation and Electronic Business) and OASIS (Organization for the Advancement of Structured Information Standards)

Provides specifications to define standard business processes, exchange business messages and enter into trading agreements

Motivations: Global standard for companies of all sizes Automate finding business partners

Page 13: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 13Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

ebXML Vocabulary

Unified Modeling Methodology (UMM) Specialized UML for Business Processes

Collaboration Protocol Profile (CPP) Describes a business’s profile, i.e., which

business processes it supports, its roles in those processes, the messages exchanged, and the transport mechanism for the messages (e.g., HTTPS)

Collaborative Partner Agreement (CPA) Intuitively, like an intersection of two CPPs Technical agreement between two or more

partners May be legally binding

Page 14: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 14Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Design of an ebXML SystemBusiness

Organization A

ebXML ProcessSpecification

Document

ImplementebXML

CPA and CPPSpecifications

ebXML BusinessService Interface

Configuration

Publish C

ollaboratio

n

Protocol P

rofile

Request ebXMLSpecs

Receive ebXMLInfo

BusinessProcess

BusinessScenarios

BusinessProfiles

ebXML Repository

Business Processand Information

Model(UMM or PSL)

BusinessOrganization B

ebXML ProcessSpecification

Document

ImplementebXML

CPA and CPPSpecifications

ebXML BusinessService Interface

Configuration

Business Processand Information

Model(UMM or PSL)

Request ebXMLSpecs

Receive ebXMLInfo

Publish Collaboration

Protocol Profile

CPA Information

Page 15: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 15Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Discover Partner Information and Negotiate

RequestInformation onOranization B

BusinessOrganization A

NegotiateTerms

BusinessOranization B

NegotiateTerms

Request Oranization B’sProfiles, Scenarios

Receive Organization B’sInformation

BusinessProcess

BusinessScenarios

BusinessProfiles

ebXML RepositoryExchange Partner Agreement

(CPA)Accept Partner

Agreement

Page 16: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 16Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Implementing ebXML

ebXML is a set of specifications: of collaborations and repositories for discovering business partners Build and deploy its custom ebXML-compliant

application to implement necessary roles in different collaborations

Use COTS ebXML compliant applications and components (from ERP vendors)

Business Service Interface (BSI): a wrapper that enables a given party to participate properly in an ebXML exchange

Page 17: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Business Service Interface

Interfaces with the legacy system, e.g., to make it vendor in a specific protocol such as 3A4

Is aware of its own Collaborative Protocol Profile Handles transactions based on all the current

agreements (CPA’s)

ebXML WorldLegacy

ApplicationTransform

Layer

BusinessService

Interface

MessageLayer

(TR & P)

CPADocument

BusinessProcess

Page 18: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 18Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

RosettaNet PIP for Creating a Purchase Order: The Content for ebXML

Back-end application

Create Order Log order confirmation

Order instance(object)

Semantic Web enabled RosettaNet

Semantic Web enabled RosettaNet

Send PO Receive POA

PO instance POA instance

Create PO Request Analyze POA

PO instance POA instance

Receive PO Send POA

Analyze PO Create POA

Back-end application

Confirm PO (some or all lineitems may be rejected)

Ontologies ofdata structures,business logicand message

exchangeprotocols

Mediation ofdata structures,business logicand message

exchangeprotocol

PIP: Partner Interface Process; like a protocol

ebXML BPSS: a language for specifying PIPs

Two-party protocols Request-response

only No meaning to the

messages exchanged

Page 19: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 19Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Exercise: Exceptions in Workflows

This workflow is for recording student registration. Assume that each database management system supports the 2PC protocol for transactions. When a student registers, Task #2 is a check with the Graduate Coordinator to verify that he has completed the necessary prerequisites for the courses for which he is registering. Assume that Tasks #3, #4, and #5 succeed, but that Task #2 fails.

As the system administrator, what operations would you have to perform in order to restore consistency to your system?

How would you modify the workflow in order to prevent problems such as this from occurring in the future?

1. Recordregistrationinformation

2. Check forprerequisites

3. Verifystudent in

goodstanding

4. Issue billfor tuitionand fees

5. Recordfee payment

6. Recordstudent asregistered

Studentsubmitscourse

registrationinformation

Studentpays fees

Graduatecoordinator

Courseenrollment DB

Studentrecords DB

Billing DB

Page 20: Chapter 13: Process Specifications Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005

Chapter 13 20Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and

Michael Huhns

Chapter 13 Summary In virtually all serious applications of SOC,

services are composed into processes Current approaches for process modeling

are based on workflow abstractions BPEL4WS enables specification of processes ebXML also considers the life cycle of

processes RosettaNet is an application of ebXML

Flows interact in various ways Exceptions in flows can be handled via

(extended) transactions or through application-specific means (where interesting patterns can arise)