Using BPEL to implement “Classical Tutorial Course”
description
Transcript of Using BPEL to implement “Classical Tutorial Course”
Using BPEL to implement “Classical Tutorial Course”
徐天送2004/7/29
Business ProcessContainer
BPEL ProcessIMS LD
Outline
“Classical Tutorial Course” System Design Implementation Demo Conclusion
“Classical Tutorial Course”
IntroductionBasic
skill or concept
Intermediate skill or concept
Advanced skill or concept
Summary Test
Example
Pratice
Example
Pratice
Example
Pratice
William Horton, “Designing web-based training”, New York: John Wiley & Sons, 2000
Demo
System Design
The Process of Learning Course General Learning Scenario The Use Case Diagram The Conception Diagram Change Deployment Diagram
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.”
Browse Course
IntroductionBasic
skill or concept
Intermediate skill or concept
Advanced skill or concept
Summary Test
Example
Pratice
Example
Pratice
Example
Pratice
Load Course Complete Course
General Learning Scenario
Precondition: Learner had completed the authentication step.
Main Success Scenario:1. Learner Select a Course and start a Learning Process.2. Learning Process request LMS to Load the course, and LMS
return the course’s URL to Learning Process .3. Learning Process show the course introduction.4. Learner clicks NEXT button to start an activity.5. Learning Process request LMS to Load the activity, and LMS
return the activity’s URL to Learning Process .6. Learning Process show the activity content.7. Learner has done with the activity, and clicks the COMPLETE
button. (go back to step 3, except the final activity is completed.)
8. Learning Process request LMS to complete the course, and then show the complete page.
Sequence Diagram
Send LOADCOURSE Message
new
CourseURL
SendNEXTACTIVITY Message
Lookup ActivityActivityURL
RequestCompleteActivity Service
RequestCompleteCourse Service
(Repeat)
:WebServer
Select a Course
Show Introduction
Next Activity
Show Activity
Complete Activity
Show ActivityComplete
Complete Course
Show CourseComplete
:ProcessContainer
:LearningProcess
loadCourse
nextActivity
completeActivity
ACK
completeCourse
ACK
RequestLoadActivity Service
RequestLoadCourse Service
:WebServiceServer
LoadCourse:WebService
new
Lookup CourseBind
CourseURLCourseURLCourseURLCourseURL
LoadActivity:WebService
new
Bind
ActivityURLActivityURLActivityURLActivityURL
CompleteActivity:WebService
new
BindACKACKACK
CompleteCourse:WebService
new
BindACKACK
ACK
:CourseDBLearner
SendCOMPLETEACTIVITY Message
SendCOMPLETECOURSE Message
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
學習者
學習內容 課程架構
課程
學習系統
串序引擎
學習
組成
播放
擁有
擁有
註冊
擁有
課程
學習者
學習內容 課程架構
LearningProcess
學習系統
ProcessContainer
Join
組成
Run
descript
註冊
Request Servi ces
Provide
Knows
擁有
陳孟哲 , Level A 領域模型 , “IMS Learning Design 串序引擊的設計與實作” , 國立台北科技大學資訊工程系碩士班 , 2004年 7月
Conception Diagram with Process
Deployment Diagram
ExternalWeb Service Server
Web Server BPEL Engine
HTML SOAP
SOAP
(LMS Services)
(Learning Process)
Browser
(Course Content)
SOAP
4. Request Service
1. Browse Course
2. Authentication orOther Supported Service
3. Join Process
(Learner)
Implementation
Use Tools Process Design Implementation: use <sequence> Receiving more than one messages
problem Alternative Implementation: use <flow> Testing
Use Tools
BPWS4JBPEL Engine + Editor
Oracle BPEL Process ManagerBPEL Engine + Editor
Systinet Developer for EclipseWeb Services Integration Develop Environme
nt
Activity Diagram
Learning Process LMS
Map to BPEL Activity
Receive
Invoke
Reply
BPEL
Implementation: use <sequence>
LoadCourseScope
BrowsCourseScope
CompleteCourseScope
The Course Content Scope
NextActivityScope
CompleteActivityScope
While
Process
Receive A
Receive B
Receive C
Receiving more than one messages problem
Process
Receive A
Receive B
Receive C
Message AMessage B
Process
Receive A
Receive B
Receive C
Represents the process current state
Wait Message B!
Result: The process’s instance hangs!
Throw Exception!
Process
Receive LOADCOURSE
Receive NEXTACTIVITY
Receive COMPLETECOURSE
Receive COMPLETEACTIVITY
usrID (Correlation Set)
The Process with Correlation Set
LOADCOURSE
BPELEngine
Process
Receive LOADCOURSE
Receive NEXTACTIVITY
Receive COMPLETECOURSE
Receive COMPLETEACTIVITY
usrID (Correlation Set)
COMPLETECOURSE
NEXTACTIVITY
COMPLETEACTIVITY
Check TokensIn each message
LOADCOURSE
NEXTACTIVITY
COMPLETEACTIVITY
COMPLETECOURSE
The First Message Initialize Correlation Set
The <Correction Set> Usage1
1. We define the “userID” as the process’s property.
2. For each message, use alias to let message part map to the property.
3. Put the property in the correlation set that we define in the BPEL.
4. Now, we must use the correlation at each <receive>, and indicate the first received message must initialize the correlation set.
The <Correction Set> Usage2
1. Declare the property of process.
2. Use alias to let the message part map to property.
WSDL File
The <Correction Set> Usage3
BPEL File
3. Declare the correction set
4. Specify that the receive activity could receiveMessage carry with the correction set
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.
Implementation: use <flow>
source
target
source
target
Testing1
Use static function to simulate the action that client clicks the button, and check the expected URL and Message it returns.
Testing2
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則還無法確定。
Future work
SellerBuyer
Supply-chain example
Buy the goods
Receive an orderPay for goods
Conform Order
Check out stocks
Purchase Order
Order number
Delivery Response
Order number
Wait For Delivery
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.”
Process
Receive A
Receive B
Process
Receive A
Receive B
Instance routing
Message B
Process
Receive A
Receive B
Message A
Process
Receive A
Receive B
Message AProcess
Receive A
Receive B
Message B
BPELEngine
Message A
Message B
Default mechanism
Another mechanism using correlation set
BPELEngine
Message A
Message B
Supply-chain example
SellerBuyer
Buy the goods
Receive an order
Wait For Delivery
Pay for goods
Conform Order
Check out stocks
Purchase Order
Order number
Delivery Response
Order number
correlation tokens
correlation group
Mapping to BPEL process
Load Course
Process
Receive
Invoke
Reply
Receive
Invoke
Reply
Receive
Invoke
Reply
Receive
Invoke
Reply
LMS Web Services
Load Course
Load Activity
Complete Activity
Complete Course
Course URL
Next Activity
Activity URL
Complete Activity
ACK
Complete Course
ACK
Deprecated!