-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTravelProcess.bpel
69 lines (67 loc) · 3.12 KB
/
TravelProcess.bpel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<process name="TravelProcess" targetNamespace="http://bexee.sourceforge.net/Travel"
suppressJoinFailure="yes" xmlns:tns="http://bexee.sourceforge.net/Travel"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:services="http://bexee.sourceforge.net/Travel" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<partnerLinks>
<partnerLink name="client" partnerLinkType="tns:BookTravel"
myRole="TravelProvider" />
<partnerLink name="HotelOfferService" partnerLinkType="services:OfferTravelPLT"
myRole="OfferProvider" />
<partnerLink name="FlightOfferService" partnerLinkType="services:OfferTravelPLT"
myRole="OfferProvider" />
<partnerLink name="HotelBookingService" partnerLinkType="services:BookTravelPLT"
myRole="BookProvider" />
<partnerLink name="FlightBookingService" partnerLinkType="services:BookTravelPLT"
myRole="BookProvider" />
</partnerLinks>
<variables>
<variable name="userName" messageType="tns:TravelServiceRequestMessage" />
<variable name="response" messageType="tns:TravelServiceResponseMessage" />
<variable name="offerRequest" messageType="tns:getOfferRequest" />
<variable name="bookRequest" messageType="tns:bookRequest" />
<variable name="hotelOffer" messageType="tns:getOfferResponse" />
<variable name="flightOffer" messageType="tns:getOfferResponse" />
<variable name="hotelBooking" messageType="tns:bookResponse" />
<variable name="flightBooking" messageType="tns:bookResponse" />
</variables>
<sequence name="root-activity">
<receive name="startBooking" partnerLink="client" portType="services:InitTravel"
operation="initiate" variable="userName" createInstance="yes"></receive>
<assign name="assignOffer">
<copy>
<from variable="userName" part="value"></from>
<to variable="offerRequest" part="input"></to>
</copy>
</assign>
<flow name="offers">
<invoke name="invokeHotelOffer" partnerLink="HotelOfferService"
portType="services:TravelService" operation="getOffer"
inputVariable="offerRequest" outputVariable="hotelOffer"></invoke>
<invoke name="invokeFlightOffer" partnerLink="FlightOfferService"
portType="services:TravelService" operation="getOffer"
inputVariable="offerRequest" outputVariable="flightOffer"></invoke>
</flow>
<assign name="assignBook">
<copy>
<from variable="userName" part="value"></from>
<to variable="bookRequest" part="input"></to>
</copy>
</assign>
<flow name="bookings">
<invoke name="invokeHotelBooking" partnerLink="HotelBookingService"
portType="services:TravelService" operation="book" inputVariable="bookRequest"
outputVariable="hotelBooking"></invoke>
<invoke name="invokeFlightBooking" partnerLink="FlightBookingService"
portType="services:TravelService" operation="book" inputVariable="bookRequest"
outputVariable="flightBooking"></invoke>
</flow>
<assign name="assignResponse">
<copy>
<from variable="userName" part="value"></from>
<to variable="response" part="value"></to>
</copy>
</assign>
<reply name="bookReply" partnerLink="client" portType="services:InitTravel"
operation="initiate" variable="response"></reply>
</sequence>
</process>