Presentation is loading. Please wait.

Presentation is loading. Please wait.

BPEL Eric Verbeek In these two hours (approx.) we will give an overview of BPEL, the Business Process Execution Language. We will also give some of the.

Similar presentations


Presentation on theme: "BPEL Eric Verbeek In these two hours (approx.) we will give an overview of BPEL, the Business Process Execution Language. We will also give some of the."— Presentation transcript:

1 BPEL Eric Verbeek In these two hours (approx.) we will give an overview of BPEL, the Business Process Execution Language. We will also give some of the motivation for using BPEL, which will give you an understanding of the situations in which you should be using BPEL.

2 Example / mathematics and computer science

3 Use Case An author submits either an abstract or a full paper. If he submits an abstract, the editor waits until he also submits the full paper, but in the meantime the editor can search suitable reviewers. After the full paper has been received, the editor queries the reviewers whether they might be willing to review the paper. If a reviewers rejects, another reviewer is queried. If a reviewer accepts, the editor sends him the paper for review. The reviewer can either propose to accept the paper, to reject the paper, or to have the paper revised by the author. The editor forwards this proposal to the author, except for the fact that that he might change a revision into a reject. In case of a revision, the editor waits for the revised paper and forwards it to the reviewer etc. Our BPEL process will have two receive activities to receive the paper or the abstract. In fact, the only event that can start a BPEL process executing is an incoming message, so the first activity in a BPEL process will always be one that receives a message. / mathematics and computer science

4 SOAP Author Reviewer abstract accept cancel paper reject revise accept
query reject revise / mathematics and computer science

5 WSDL Author Reviewer Provider Requester Provider Requester abstract
cancel paper Requester accept reject revise Reviewer Provider cancel paper query Requester accept reject revise / mathematics and computer science

6 Standard Behavior Wait for abstract or paper
If abstract then wait for paper Query reviewer If reviewer accepts forward paper, else go to 3 Wait for recommendation Forward recommendation If accept or reject then go to 11 Wait for revised paper Forward revised paper Go to 5 End / mathematics and computer science

7 Exceptional Behavior Editor may change revise into reject
Author may send revised paper unsolicited Author may withdraw paper / mathematics and computer science

8 Partners Author Reviewer
<partnerLinks> <partnerLink name="author" partnerLinkType="any" myRole="editor" partnerRole="author"/> <partnerLink name="reviewer" partnerLinkType="any" myRole="editor" partnerRole="reviewer"/> </partnerLinks> / mathematics and computer science

9 1. Wait for abstract or paper
Structured activities pick onMessage onAlarm createInstance (cf. correlation) <pick createInstance="yes"> <onMessage partnerLink="author" operation="abstract"> <!-- wait for paper --> </onMessage> <onMessage partnerLink="author" operation="paper"> <!-- do nothing --> </onMessage> </pick> / mathematics and computer science

10 2. If abstract then wait for paper
Basic activities receive empty <pick createInstance="yes"> <onMessage partnerLink="author" operation="abstract"> <receive partnerLink="author" operation="paper"/> </onMessage> <onMessage partnerLink="author" operation="paper"> <empty/> </onMessage> </pick> / mathematics and computer science

11 3. Query reviewer Basic activities invoke
<invoke partnerLink="reviewer" operation="query"/> / mathematics and computer science

12 4. If reviewer accepts forward paper, else go to 3
Basic activities Structured activities invoke empty while sequence pick <while condition="No reviewer found"> <sequence> <invoke partnerLink="reviewer" operation="query"/> <pick> <onMessage partnerLink="reviewer" operation="accept"> <invoke partnerLink="reviewer" operation="paper"/> </onMessage> <onMessage partnerLink="reviewer" operation="reject"> <empty/> </onMessage> </pick> </sequence> </while> / mathematics and computer science

13 5-6. Wait for recommendation, forward it.
Basic activities Structured activities invoke pick <pick> <onMessage partnerLink="reviewer" operation="accept"> <invoke partnerLink="author" operation="accept"/> </onMessage> <onMessage partnerLink="reviewer" operation="reject"> <invoke partnerLink="author" operation="reject"/> <onMessage partnerLink="reviewer" operation="revise"> <!-- May change revise into reject --> </pick> / mathematics and computer science

14 7-10. If accept or reject then go to 11 ... Go to 5
Basic activities Structured activities invoke while sequence pick <while condition="Paper not accepted or rejected"> <sequence> <invoke partnerLink="reviewer" operation="paper"/> <pick> <!-- accept and reject --> <onMessage partnerLink="reviewer" operation="revise"> <!-- May change revise into reject. Wait for revised paper. --> </onMessage> </pick> </sequence> </while> / mathematics and computer science

15 A. Editor may change revise into reject
Basic activities Structured activities invoke receive switch sequence <switch> <case condition="Editor overrules and rejects"> <invoke partnerLink="author" operation="reject"/> </case> <otherwise> <sequence> <invoke partnerLink="author" operation="revise"/> <receive partnerLink="author" operation="paper"/> </sequence> </otherwise> </switch> / mathematics and computer science

16 B. Author may send revised paper unsollicited
Basic activities Structured activities empty scope event handler while <scope name="Handle paper"> <eventHandlers> <onMessage partnerLink="author" operation="paper"> <!-- Update for the paper. Store update. --> <empty/> </onMessage> </eventHandlers> <while condition="No reviewer found"> <!-- while contents --> </while> </scope> / mathematics and computer science

17 C. Author may withdraw paper
Basic activities Structured activities throw empty scope fault handler catch <onMessage partnerLink="author" operation="cancel"> <throw faultName="Cancel"/> </onMessage> <faultHandlers> <catch faultName="Cancel"> <!-- termination is implicit --> <empty/> </catch> </faultHandlers> / mathematics and computer science

18 C. Author may withdraw paper
Basic activities Structured activities compensate invoke scope compensation handler catch <faultHandlers> <catch faultName="Cancel"> <compensate scope="Review started"/> </catch> </faultHandlers> <scope name="Review started"> <compensationHandler> <invoke partnerLink="reviewer" operation="cancel"/> </compensationHandler> <invoke partnerLink="reviewer" operation="paper"/> </scope> / mathematics and computer science

19 BPEL / mathematics and computer science

20 Basic activities assign compensate empty invoke receive reply rethrow
terminate throw wait Assign data to variables Compensate scope Do nothing Send message (async) Receive message Reply message (sync) Rethrow fault Terminate instance Throw fault Wait for some time / mathematics and computer science

21 Structured activities
flow pick scope sequence switch while Execute in parallel Implicit choice Subprocess Execute in sequence Explicit choice Execute while cond. holds / mathematics and computer science

22 Flow Links Activity acyclic graph transition condition
unknown true false Dead path elimination Acyclic marked graph True/false tokens join condition true execute false skip outgoing links false incoming links known / mathematics and computer science

23 Flow: Why do we need links?
A B C D / mathematics and computer science

24 C A B E D Flow: Can A follow D? flow switch
/ mathematics and computer science

25 Scope event handlers fault handlers compensation handler variables
/ mathematics and computer science

26 Control flow patterns P. Wohed, W.M.P. van der Aalst, M. Dumas, and A.H.M. ter Hofstede. Pattern-Based Analysis of BPEL4WS. QUT Technical report, FIT-TR , Queensland University of Technology, Brisbane, 2002. / mathematics and computer science

27 Sequence An activity in a workflow process is enabled after the completion of another activity in the same process. Sequence Flow with links / mathematics and computer science

28 Parallel Split & Synchronization
A point in the process where a single thread of control splits into multiple threads of control which can be executed in parallel, thus allowing activities to be executed simultaneously or in any order. A point in the process where multiple parallel branches converge into one single thread of control, thus synchronizing multiple threads. ... Flow / mathematics and computer science

29 Parallel Split & Synchronization
/ mathematics and computer science

30 Exclusive Choice & Simple Merge
A point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen. A point in the workflow process where two or more alternative branches come together without synchronization. ... Switch / mathematics and computer science

31 Multi-Choice & Synchronizing Merge
A point in the process, where, based on a decision or control data, a number of branches are chosen and executed as parallel threads. A point in the process where multiple paths converge into one single thread. Some of these paths are "active" (i.e. they are being executed) and some are not. ... Flow with links / mathematics and computer science

32 Multi-Merge A point in a process where two or more branches reconverge without synchronization. If more than one branch gets activated, possibly concurrently, the activity following the merge is started for every action of every incoming branch. No direct support / mathematics and computer science

33 Discriminator A point in the workflow process that waits for one of the incoming branches to complete before activating the subsequent activity. From that moment on it waits for all remaining branches to complete and 'ignores' them. Once all incoming branches have been triggered, it resets itself so that it can be triggered again (which is important otherwise it could not really be used in the context of a loop). No direct support / mathematics and computer science

34 Arbitrary Cycles A point where a portion of the process (including one or more activities and connectors) needs to be "visited" repeatedly without imposing restrictions on the number, location, and nesting of these points. No direct support While supports only structured cycles / mathematics and computer science

35 Implicit Termination A given subprocess is terminated when there is nothing left to do, i.e., termination does not require an explicit termination activity. Flow / mathematics and computer science

36 Multiple Instances w/o Synchronization
Within the context of a single case multiple instances of an activity may be created, i.e. there is a facility for spawning off new threads of control, all of them independent of each other. The instances might be created consecutively, but they will be able to run in parallel, which distinguishes this pattern from the pattern for Arbitrary Cycles. While with embedded invoke, invoked service should create instance. / mathematics and computer science

37 Multiple Instances w/ synchronization
A point in a workflow where a number of instances of a given activity are initiated, and these instances are later synchronized, before proceeding with the rest of the process. Design time: Flow with number of copies Run time: While with embedded invoke and counter / mathematics and computer science

38 Deferred Choice A point in a process where one among several alternative branches is chosen based on information which is not necessarily available when this point is reached. This differs from the normal exclusive choice, in that the choice is not made immediately when the point is reached, but instead several alternatives are offered, and the choice between them is delayed until the occurrence of some event. Pick / mathematics and computer science

39 Interleaved Parallel Routing
A set of activities is executed in an arbitrary order. Each activity in the set is executed exactly once. The order between the activities is decided at run-time: it is not until one activity is completed that the decision on what to do next is taken. In any case, no two activities in the set can be active at the same time. Flow with serializable scope / mathematics and computer science

40 Milestone A given activity E can only be enabled if a certain milestone has been reached which has not yet expired. A milestone is defined as a point in the process where a given activity A has finished and an activity B following it has not yet started. No direct support / mathematics and computer science

41 Cancel Activity & Cancel Case
A cancel activity terminates a running instance of an activity, while cancelling a case leads to the removal of an entire workflow instance. Scope with fault and compensation handlers Terminate / mathematics and computer science

42 Verification / mathematics and computer science

43 Activity / mathematics and computer science

44 Adding DPE / mathematics and computer science

45 Adding outgoing links / mathematics and computer science

46 Adding incoming links / mathematics and computer science

47 Adding scopes / mathematics and computer science

48 Verification Sound? Conflicting event handlers? Garbage collection?
Completion possible?  No leftovers?  All viable? Conflicting event handlers? receive onMessage Garbage collection? / mathematics and computer science

49 Conformance / mathematics and computer science

50 Questions? / mathematics and computer science


Download ppt "BPEL Eric Verbeek In these two hours (approx.) we will give an overview of BPEL, the Business Process Execution Language. We will also give some of the."

Similar presentations


Ads by Google