680 likes | 830 Views
Process Modeling in Web Applications . Stefano Ceri Dipartimento di Elettronica, Politecnico di Milano Stefano.ceri@polimi.it. Overture. Talk motivation & outline. Why the topic is important. Web applications are widespread and embody complex processes
E N D
Process Modeling in Web Applications Stefano Ceri Dipartimento di Elettronica, Politecnico di Milano Stefano.ceri@polimi.it
Overture Talk motivation & outline
Why the topic is important • Web applications are widespread and embody complex processes • Themes: Enterprise Application Integration (EAI), E-business, E-government, B2B. • Technology: Service Oriented Architecture (SOA) • Thousands of: Approaches, Products, “Emerging” Standards (Process Modeling, B2B Protocols, Technologies, Platforms).
“Trendy” research topics • Process Composition • Process Verification + Algebras • Semantic Web Services (automatic selection, composition, semantic annotation / registration / navigation)
The focus of this talk • A high-level, model-driven approach to the specification and design of Web applications • Starting from high-level requirements (processes) • Modeling the “essential” concepts for the Web: • Content • Web Interfaces • Web Services • Processes • Platform independent (supports code generation)
Pure WFMS WF-driven hypertexts Constraints Pure hypertexts Navigation richness Characterization of Web applicationsas workflow-driven hypertexts • An hypertext with constraints • Stemming from the process definition • Spanning over multiple actors Workflow example:
Computer-aided Web-oriented Workflow Design • Workflow specification • Semi-automatic generation of hypertext model
Disclaimer • This is NOT a tutorial • In this talk I focus on CONCEPTUAL MODELING aspects only • I include a moderate amount of “advertising” (I’ll try to stay below 10%)
First movement: Andante con brio WebML Primer
Web Modeling Language • A conceptual language for high-level design of data-intensive Web applications • Defined in 1998, in use for more than seven years • Book: Ceri, Fraternali at al. Designing data-intensive Web applications, Morgan Kauffman, Dec. 2002 • Adopted in many universities worldwide (www.webml.org) • Commercially implemented (see: www.webratio.com) and used (see www.acer-euro.com)
WebML Diagrams • WebML: Conceptual high-level language for specification and design of data-intensive Web applications. • WebML diagrams: • Data model • Hypertext model • Presentation model
WebML: Hypertext Design • Siteview: set of pages and/or areas forming a coherent view of the site • Area: a set of logically homogeneous pages • Page: a container of one or more pieces of information shown to the user at the same time • Unit: atomic information element • Operation: atomic action element
MODEL Author first name:XXX last name:YYY photo: Index of Authors All Authors • L. Tolstoj • T. Mann • M. Proust Browse Authors Choose Authors Insert Your Data Books&Authors 1. Compilers Aho Ullman 2. Systems Tannenbaum Tolstoj Mann Proust 5/12: go to 1/12 • Fname • Lname Content Units in WebML DATAUNIT INDEXUNIT MULTIDATAUNIT ENTRYUNIT MULTICHOICE SCROLLERUNIT HIERARCHICAL
MODEL unitX entity [selector (par 1, .., parN)] Unit input and output IN OUT • Input is required to compute the unit • Pre-defined parameters for the unit + • Other parameters required by the selector of the unit • Output can be used to compute other unit(s) depending on the current unit
MODEL Author Author Navigation: contextual links source unit target unit • An oriented connection between two units (source unit and target unit), normally rendered by means of anchors or submit buttons • Purpose: • Allowing the user to move from one place to another • Transporting information from one place to another • Activating a computation (side effect)
MODEL Author first name:James last name:Joyce photo: Books of YYY Book Title:Ulysses Price:23$ Cover: • Ulysses • The Dubliners • Portrait... Example of links Which author’s books? Which book? p2 p3 p1 Author [OID=p1] Book [OID=p3] Book [author2book(p2)]
Our Interpretations of WebML • Units are “accidents”, what matters are: • Links and parameter passing • Default parameters and parameter inference rules • “Page” logics • Unit Collections • Content Delivery • Content Management • Web Service Invocation • XML Transformers • Process Management • Adaptation & Personalization Units • VOI and Digital TV Units
MODEL Delete Unit Modify Unit Create Unit Entity Entity Entity Disconnect Unit Connect Unit relationship relationship Content Management Units CREATE DELETE MODIFY CONNECT DISCONNECT
WSDL units • WebML units for synchronous Web service interactions Sync Solicit-Response Unit Sync Request-Response Unit
XML out XML management primitives • XML in: takes in input a canonical XML fragment and stores it into the E-R repository • XML out: extracts a set of object from the E-R repository and build an XML canonical fragment • XML Adapter: takes XML fragments with a schema as input and builds an XML fragment with different schema as output XML in XML Adapter
MODEL XML data mapping A visual XSL generator tool to build XSL rules that transform XML fragments into an E-R structure (XML canonical form)
Third Movement: Andante Maestoso Workflows
Workflows • Finally we turn to the main topic of this talk: process modeling • Approach: • Overview • Worflow meta-data and primitives • Workflow modeling • Workflow distribution • Asynchronous workflow primitives • Exception Handling
2: Conversation flow and operations identification Buyer Buyer Supplier Transporter 1:Request quote, 3:Order 6:Acknowledge Products data Request quote Elaborate quote 5:Notify shipping status Evaluate quote Quote, OrderID Reply with quote 2:Send quote, 7:Send recipit Place order Receive order OrderID Supplier Transporter 4:Commit transport Commit Transport Execute Item info Shipping ID Record confirmation Ack Success Shipping ID Shipping status Notify Update Send Recipit OrderID Acknowledge Web Service WS-Supplier QuoteRequest (IN ProductsData, IN ReqID) Record / Close process Recipit CommitOrder (IN OrderID, IN ReplyToAddr) GetRecipit (IN OrderID, OUT Recipit) Workflow & Web Service Design Steps (given) 1: Actors and macro-operations 3: Web service interface building
Transporter(UPS, DHL) Supplier Buyer Our focus: From process design to sofware design & deployment
A global view: Quote request Buyer Supplier Request Quote Send Quote
Process Model: BPMN “Click4aLoan” Case Study 10/2005
Workflow metadata WF metadata: WfMC concepts User metadata Application data
Process management units Process delimiters • Activity delimiters WF indexes Assignements Conditions
Apply Check Salary Check Savings Approve Illustration in WebML: loan application process • Clients apply for a loan • Bank employees perform two checks in parallel • A manager approves or rejects the application
Start Activity Apply StartCase Create an Appl, connect it to the Apply instance Check Salary Check Savings End Activity Apply Generic hypertext for Apply • Client site view Apply Client home page Client login page Login Apply for loan Approve
Start Activity New appl. W Apply StartCase Application End Activity Apply Complete hypertext for Apply Loan application page • What happens inside the Client site view Client home page Client login page Login LoanData Apply for loan Sum Period Connects the new applicationto the current Activity Instance (Apply)
CasesOK Case [ready("CheckSalary")] Check salary Finish check if OK Abort case if KO End Activity End Activity CheckSalary CheckSalary Generic hypertext for SalaryCheck • Employee site view Apply Employee home page Employeelogin page Start Activity Login Check Salary Check Savings CheckSalary Approve OK KO
Start Activity CasesOK Apply Approve Case [ready("Approve")] Check Salary Check Savings Approve orreject loan application Approve Generic hypertext for Approve Manager site view Managerhome page Managerlogin page Login End Activity Approve
Fourth Movement (Scherzo):Allegro Push/Pull Styles Distribution Exceptions Asynchrony
WebML Unit for Push style process control Assign • Specific WebML unit: Assign • Creates a new ActivityInstances • Connects it to the current case • [Connects to a given user] • [Connects data to the ActivityInstance and to the user] • Example: document translation workflow A ActivityName User Entity Employee Manager Transl.doc Write doc
Pull vs Push Styles • Up to here, "pull work" style: • Users choose their cases, inspecting the past activities • "Push" style also possible (push data and/or work): • Push data: Manager assigns doc to Employee(s) • Push work: Manager assigns Translate activity to Employee(s)
Start Activity New doc. Translator W Create StartCase Document User [type="employee"] AssignDoc End Activity A Document Create [UsedBy(UserID)] [Activity="Translate“] Manager site view in Push style Doccreation page Managerhome page Managerlogin page Login Document Createdoc Title Body Assign page
MyDocs Translate Docum. Title Body W W Document [Translates(uID)] [readyCase("Translate")] Document End Activity Translate Employee site view in Push style Document translation page Employeehome page Employeelogin page Login StoreTrans Start Activ. Document Translate No longer creates the ActivityInstance Sets status="Active"
Processes Distribution 1) Distribution of sub-processes with centralized control
Processes Distribution 2) Distribution of sub-processes with nested co-ordination • Possibility for a peer to delegate a “well-parethesized" sub-process to an other peer
Processes Distribution 3) Distribution of sub-processes withgeralized co-ordination • No constraints on the shape of the spawned sub-process.
Processes Distribution 4) Independent processes • Processes don’t have any information about the number of other processes involved and their structure in terms of activity. • The only point of contact between these processes is represented by the Web service calls. Conceptual Modeling of distributed business processes based on Web Services Architecture 10/2005
Zzz.. Web-specific WF exceptions • Improper inbound browsing • User generated (Back and Forward browser buttons, …) • System failures • Client side • Server side • Inconsistencies due to critical situations • Semantic exceptions • In the data or in the process status (metadata) • Improper outbound browsing • Improper internal browsing • Wait A1 A2 A3
Exception handling approach Capturing model Notifying model Handling model
Asynchronous Web services interactions • Asynchrony is mandatory in many B2B interactions • Asynchrony is a good solution for clients … • Requesting thread is not blocked • Received response is managed by a different thread • … and servers • No risks of traffic peaks (managed workload) • Parallel spawning of requests management • Additional mechanisms are needed for connecting the two parts of the interaction
Asynchronous correlation • Correlation may be performed at 3 possible levels: Transport level - HTTP: only synch correlation - other protocols: not popular enough Application semantics - Correlation is implicit in the exchanged data Conversation metadata - auxiliary structures for automatic & transparent correlation
Conversation metadata E-R model of the data (also for logging, tracking, data-warehousing) Operation Conversation Message In Instance PartOf Instance Instance 1:1 0:1 ConversationID TimeStamp Status OperationID TimeStamp MessageID Content 1:1 1:N Out 3 options 1:1 0:1 1:1 1:1 1:1 MsgType ConvType OpType 0:N 0:N 0:N Conversation OperationType 1: ConversationID In Type PartOf MessageType OpName Name 1:1 0:1 1:N Name 1:1 PortName Timeout Out 2: CID + OpID Format Binding 1:1 0:1 ServiceName NetworkAddress 3: CID + OpID + MsgID Timeout