340 likes | 488 Views
IMS LD. BPEL Process. Business Process Container. Using BPEL to implement “Classical Tutorial Course”. 徐天送 2004/7/29. Outline. “Classical Tutorial Course” System Design Implementation Demo Conclusion. “Classical Tutorial Course”.
E N D
IMS LD BPEL Process Business ProcessContainer Using BPEL to implement “Classical Tutorial Course” 徐天送 2004/7/29
Outline • “Classical Tutorial Course” • System Design • Implementation • Demo • Conclusion
“Classical Tutorial Course” William Horton, “Designing web-based training”, New York: John Wiley & Sons, 2000
System Design • The Process of Learning Course • General Learning Scenario • The Use Case Diagram • The Conception Diagram Change • Deployment Diagram
Browse Course Load Course Complete Course The Process of Learning Course • We could use 3 steps to descript the Process of Learning Course, and the content is like a “Classical Tutorial Course.”
General Learning Scenario • Precondition: Learner had completed the authentication step. • Main Success Scenario: • Learner Select a Course and start a Learning Process. • Learning Process request LMS to Load the course, and LMS return the course’s URL to Learning Process . • Learning Process show the course introduction. • Learner clicks NEXT button to start an activity. • Learning Process request LMS to Load the activity, and LMS return the activity’s URL to Learning Process . • Learning Process show the activity content. • Learner has done with the activity, and clicks the COMPLETE button. (go back to step 3, except the final activity is completed.) • Learning Process request LMS to complete the course, and then show the complete page.
The Use Case Diagram • Learner could learn a course through 3 steps to accomplish the course. • LMS provide some LMS functions and the course contents to support the course.
The Conception Diagram Change Conception Diagram with Process 陳孟哲, Level A 領域模型, “IMS Learning Design 串序引擊的設計與實作”, 國立台北科技大學資訊工程系碩士班, 2004年7月
HTML SOAP SOAP SOAP Deployment Diagram 1. Browse Course 3. Join Process Web Server BPEL Engine (Course Content) (Learning Process) Browser (Learner) 2. Authentication or Other Supported Service 4. Request Service External Web Service Server (LMS Services)
Implementation • Use Tools • Process Design • Implementation: use <sequence> • Receiving more than one messages problem • Alternative Implementation: use <flow> • Testing
Use Tools • BPWS4J • BPEL Engine + Editor • Oracle BPEL Process Manager • BPEL Engine + Editor • Systinet Developer for Eclipse • Web Services Integration Develop Environment
Activity Diagram Learning Process LMS
Invoke Reply Map to BPEL Activity BPEL Receive
LoadCourseScope BrowsCourseScope CompleteCourseScope Implementation: use <sequence>
While NextActivityScope CompleteActivityScope The Course Content Scope
Message B Message A Process Process Process Receive A Receive A Receive A Receive B Receive B Receive B Receive C Receive C Receive C Represents the process current state Receiving more than one messages problem Throw Exception! Wait Message B! Result: The process’s instance hangs!
The First Message Initialize Correlation Set Process Process usrID usrID (Correlation Set) (Correlation Set) LOADCOURSE LOADCOURSE Receive LOADCOURSE Receive LOADCOURSE NEXTACTIVITY NEXTACTIVITY Receive NEXTACTIVITY Receive NEXTACTIVITY COMPLETEACTIVITY COMPLETEACTIVITY Receive COMPLETEACTIVITY Receive COMPLETEACTIVITY COMPLETECOURSE COMPLETECOURSE Receive COMPLETECOURSE Receive COMPLETECOURSE Check Tokens In each message The Process with Correlation Set BPEL Engine
The <Correction Set> Usage1 • We define the “userID” as the process’s property. • For each message, use alias to let message part map to the property. • Put the property in the correlation set that we define in the BPEL. • Now, we must use the correlation at each <receive>, and indicate the first received message must initialize the correlation set.
The <Correction Set> Usage2 WSDL File 1. Declare the property of process. 2. Use alias to let the message part map to property.
3. Declare the correction set 4. Specify that the receive activity could receive Message carry with the correction set The <Correction Set> Usage3 BPEL File
Alternative Implementation • When we use <flow> activity, the sub-activities would run concurrently. • We could use <link> to do the synchronize interaction between sub-activities.
target target source source Implementation: use <flow>
Testing1 • Use static function to simulate the action that client clicks the button, and check the expected URL and Message it returns.
Conclusion • <Correlation Set> is an important part for BPEL, it makes the process interact with other processes. • The BPEL is developing, there are still many bugs exist, and the engine doesn’t implement the spec totally. • 對Single Role的課程而言,Selection及Sequence的課程是可以對應的。但在Nested的Activities和Multi-Role則還無法確定。
Purchase Order Pay for goods Order number Conform Order Delivery Response Wait For Delivery Check out stocks Order number Supply-chain example Seller Buyer Buy the goods Receive an order
Correlation Set • Intent: • a mechanism for instance routing • Definition: • “A set of correlation tokens is defined as a set of properties shared by all messages in the correlated group. Such a set of properties is called a correlation set.”
Message B Message A Message B Message B Message A Message B Message A Message A Process Process Process Process Receive A Receive A Receive A Receive A Receive B Receive B Receive B Receive B Process Receive A Receive B Instance routing Default mechanism BPEL Engine Another mechanism using correlation set BPEL Engine
Seller Buyer correlation tokens Buy the goods Purchase Order Pay for goods Receive an order Order number Conform Order Delivery Response Wait For Delivery Check out stocks Order number correlation group Supply-chain example
Load Course Load Activity Complete Activity Complete Course Mapping to BPEL process Process LMS Web Services Load Course Receive Invoke Reply Course URL Deprecated! Next Activity Receive Invoke Reply Receive Invoke Reply Activity URL Complete Activity ACK Complete Course Receive Invoke Reply ACK