bpelscript
DESCRIPTION
Alternative syntax for WS-BPELTRANSCRIPT
Marc Bischof, Oliver Kopp, Tammo van Lessen, Frank LeymannInstitute of Architecture of Application Systems
A Simplified Script Syntax for WS- BPEL 2.0
35th Euromicro ConferenceSoftware Engineering and Advanced Applications (SEAA 2009)
Presented by Oliver Kopp
Overview
Main Motivation
Existing Approaches
BPELscript
Outlook
2
Presented by Oliver Kopp
Graphical Model
Abstract BPEL
Executable BPEL
<opaqueActivity><documentation>Set approved to "yes"
</documentation></opaqueActivity>
<assign><copy>
<literal>yes</literal></copy><to variable="approval" part="accept" />
</assign>
deployment
transformation
manual refinement
01100111010100100010010001001110110101
Usual MDD Approach
BPEL: WS-Business Process Execution Language3
© Oliver Kopp 4
Existing Approaches
Presented by Oliver Kopp 5
Presented by Oliver Kopp 6
© Oliver Kopp 7
Our Idea: BPELscript
Presented by Oliver Kopp
Goals of BPELscript development
Ease development of executable business processes (AKA “workflows”)
Syntax close to “usual” programming languages
Same semantics as WS-BPEL… enables two-way transformation
8
simPEL
Presented by Oliver Kopp
Interaction With Partners
partnerLink customer = (lns::loanPartnerLT, loanService, null)Declares a partnerlink customerof partner link type lns::loanPartnerLTwith self-role loanService and no partner role
9
Client
loanPartnerLT
Loan ApprovalProcess
loanServicePTloanRequest(nothing)
Presented by Oliver Kopp
Receiving a Message
@createInstancerequest = receive(customer, loanRequest);
Annotations for optional attributes in BPELImplicit variable declaration“customer” is the partner link to use“loanRequest” is the operation
Each statement in BPELscript can be seen as an activity in BPEL
10
Presented by Oliver Kopp
Invoking a Service Operation
risk = invoke(assessor, check, request);
Synchronous service call to risk “assessor”Operation “check”Input variable “request”Result is stored in variable “risk”
Reuse of existing processes is done by using the processes by invokes, receives, …BPEL does not allow the definition of new “procedures”
11
Presented by Oliver Kopp
Aynchronous Variant
invoke(assessor, check, request, {assessorCorrelation});
risk = receive(assessor, checkResult,{assessorCorrelation});
Optional Parameter lists correlation sets to use for correlatoin
12
Presented by Oliver Kopp
Variable Assignment
approval.accept = "yes";
Default expression language: E4XECMAScript for XMLTranslated to assign or kept as E4X
T. van Lessen and others: Facilitating Rich Data Manipulation in BPEL using E4X. In ZEUS 2009
XPath still supportedvar = [bpel:doXslTransform("...", $A)];
13
Presented by Oliver Kopp
Replying to a Synchronous Call
reply(customer, loanRequest, approval);
Reply message for the “loanRequest” operationNo correlation needed
14
Presented by Oliver Kopp
Linking Activities Together
Just as in usual programming languages
@createInstancerequest = receive(customer, loanRequest);risk = invoke(assessor, check, request);if (risk.level=="high") {approval.accept = "no";
} else {approval.accept = "yes";
}reply(customer, loanRequest, approval);
15
Presented by Oliver Kopp
What about Graphs?
Process modeling languages offer“graph-oriented programming”BPEL also offers graph-oriented programmingTwo alternatives to represent it in BPEL
A) Map to matching block-constructsB) Use BPEL’s graph capabilities
An activity is a node in the graphA link representes an edge in the graph
16J. Vanhatalo & H. Völzer & J. Koehler: The Refined Process Structure Tree BPM'08
Presented by Oliver Kopp
Graph-oriented Programming: Alternatives
Goto-inspired syntaxlauto: risk = invoke(…)l1=[$risk = 'high']‐>lhuman, l2=[$risk != 'high']‐>lapp[l1 and l2] lapp: invoke(…);
Signal and Join Statementsrisk = invoke(…)signal(l1, [$risk.level == 'low']);signal(l1, [$risk.level != 'low']);join(l1, l2, [$l1 and $l2]);
17
Presented by Oliver Kopp
Resulting Process
parallel {@createInstancerequest = receive(customer, loanRequest);signal(receive‐to‐assess,[$request.amount < 10000]);
signal(receive‐to‐approval,[$request.amount >= 10000]);
} and {join(receive‐to‐assess);risk = invoke(assessor, check, request);...
18
Presented by Oliver Kopp
Fault Handling
try {...} catch(lns::loanProcessFault) { |error|@fault unableToHandleRequestreply(customer, loanRequest, error);
}
19
Presented by Oliver Kopp
Advanced Workflow Constructs
scope {...} onEvents {event(partnerLink, operation) {...}timeOut(...) {...}
} onTermination {...
} onCompensation {...
}20
Presented by Oliver Kopp 21
Presented by Oliver Kopp
Overview on the Transformation
ANTLR: ANother Tool for Language RecognitionParser Generator
ANTXR: ANother Tool for Xml RecognitionXML Processing for ANTLR
22
Presented by Oliver Kopp
Future Work
IDE for BPELscript
Enhance the translator to support implicit variable declaration
Compare efficiency of BPEL development and BPELscript development
Follow development athttp://www.bpelscript.org/
23