Process
<process
name="SampleProcess"
targetNamespace="http://oasis-open.org/WSBPEL/Primer/"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
/>
Scope
<scope
name="Scope" />
Relationship to
Business Partners: Partner links
<partnerLinks>
<partnerLink
name="ClientStartUpLink"
partnerLinkType="wsdl:ClientStartUpPLT"
myRole="Client" />
</partnerLinks>
State of a BPEL
Process: Variables
<variables>
<variable name="myVar1"
messageType="myNS:myWSDLMessageDataType" />
<variable name="myVar1"
element="myNS:myXMLElement" />
<variable name="myVar2"
type="xsd:string" />
<variable name="myVar2"
type="myNS:myComplexType" />
</variables>
Behavior of a BPEL
Process
Providing
and Consuming Web Services:
Receive
<receive
name="ReceiveRequestFromPartner"
createInstance="yes"
partnerLink="ClientStartUpPLT"
operation="StartProcess" ... />
Reply
<reply
name="ReplyResponseToPartner"
partnerLink="ClientStartUpPLT"
operation="StartProcess" ... />
Invoke(one
way)
<invoke
name="OneWayInvoke" WS-BPEL 2.0 Primer 9 May 2007
Copyright
© OASIS Open 2007. All Rights Reserved. Page 13 of 66
partnerLink="BusinessPartnerServiceLink"
operation="OneWayOperation"
inputVariable="Input" />
Invoke(request-response)
<invoke
name="RequestResponseInvoke"
partnerLink="BusinessPartnerServiceLink"
operation="RequestResponseOperation"
inputVariable="Input"
outputVariable="Output" />
Structuring
the Process Logic
Sequence(sequential)
<sequence
name="InvertMessageOrder">
<receive name="receiveOrder" ...
/>
<invoke name="checkPayment" ...
/>
<invoke name="shippingService"
... />
<reply name="sendConfirmation"
... />
</sequence>
Sequence(with
if-else)
<if
name="isOrderBiggerThan5000Dollars">
<condition>
$order > 5000
</condition>
<invoke
name="calculateTenPercentDiscount" ... />
<elseif>
<condition>
$order > 2500
</condition>
<invoke
name="calculateFivePercentDiscount" ... />
</elseif>WS-BPEL 2.0 Primer 9 May 2007
Copyright
© OASIS Open 2007. All Rights Reserved. Page 14 of 66
<else>
<reply
name="sendNoDiscountInformation" ... />
</else>
</if>
Repetitive
Activities
While
<while>
<condition>
$iterations > 3
</condition>
<invoke
name="increaseIterationCounter" ... />
</while>
Repeat
until
<repeatUntil>
<invoke
name="increaseIterationCounter" ... />
<condition>
$iterations > 3
</condition>
</repeatUntil>
For-each
<forEach
parallel="no" counterName="N" ...>
<startCounterValue>1</startCounterValue>
<finalCounterValue>5</finalCounterValue>
<scope>
<documentation>check availability of
each item ordered</documentation>
<invoke name="checkAvailability"
... />
</scope>
</forEach>
Parallel
Processing
Flow
<flow
...>
<links> ... </links>
<documentation>
check availability of a flight, hotel and
rental car concurrently
</documentation>
<invoke name="checkFlight" ...
/>
<invoke name="checkHotel" ...
/>
<invoke name="checkRentalCar" ...
/>
</flow>
Link
in flow
<flow
...>
<links>
<link
name="checkFlight-To-BookFlight" />
</links>
<documentation>
check availability of a flight, hotel and
rental car concurrently
</documentation>
<invoke name="checkFlight"
...>
<sources>
<source
linkName="checkFlight-To-BookFlight" />
</sources>
</invoke>
Data
Manipulation
Assign
<assign>
<copy>
<from
variable="TimesheetSubmissionFailedMessage" />
<to
variable="EmployeeNotificationMessage" />
</copy>
</assign>
No comments:
Post a Comment