<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by S-BMW on 2005-09-12.-->
<process name="RetailDemoProcess" targetNamespace="http://www.fudan.edu.cn/rmsi/sbmw/default" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:Bank="http://localhost:8080/axis/Bank.jws" xmlns:Factory="http://localhost:8080/axis/Factory.jws" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:tns="http://www.fudan.edu.cn/rmsi/sbmw/default" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<partnerLinks>
	<partnerLink myRole="RetailDemoProvider" name="RetailDemoPartnerLink" partnerLinkType="RetailDemoLinkType"/>
	<partnerLink name="Bank" partnerLinkType="BankLinkType" partnerRole="Bank:Bank"/>
	<partnerLink name="Factory" partnerLinkType="FactoryLinkType" partnerRole="Factory:Factory"/>
</partnerLinks>
<partners name="Partners21"/>
<variables>
	<variable messageType="DefaultRequestMessage" name="request"/>
	<variable messageType="DefaultResponseMessage" name="response"/>
	<variable messageType="Factory:orderResponse" name="factoryResponse"/>
	<variable messageType="Factory:orderRequest" name="factoryRequest"/>
	<variable messageType="Bank:transferRequest" name="bankRequest"/>
	<variable messageType="Bank:transferResponse" name="bankResponse"/>
</variables>
<faultHandlers/>
<eventHandlers/>
<sequence name="Sequence21">
	<receive createInstance="yes" operation="RetailDemoOperation" partnerLink="RetailDemoPartnerLink" 		portType="tns:RetailDemoPortType" variable="request"/>
	<assign name="Assign13">
		<copy>
			<from part="product" variable="request"/>
			<to part="product" variable="factoryRequest"/>
		</copy>
		<copy>
			<from part="quantity" variable="request"/>
			<to part="quantity" variable="factoryRequest"/>
		</copy>
	</assign>
	<invoke inputVariable="factoryRequest" name="Invoke13" operation="order" outputVariable="factoryResponse" 	partnerLink="Factory" portType="Factory:Factory"/>
	<assign name="Assign14">
		<copy>
			<from part="orderReturn" variable="factoryResponse"/>
			<to part="amount" variable="bankRequest"/>
		</copy>
		<copy>
			<from part="dcAccount" variable="request"/>
			<to part="from" variable="bankRequest"/>
		</copy>
		<copy>
			<from part="factoryAccount" variable="request"/>
			<to part="to" variable="bankRequest"/>
		</copy>
	</assign>

	<invoke inputVariable="bankRequest" name="Invoke14" operation="transfer" outputVariable="bankResponse" partnerLink="Bank" portType="Bank:Bank"/>

	<assign name="Assign15">
		<copy>
			<from part="transferReturn" variable="bankResponse"/>
			<to part="total" variable="response"/>
		</copy>
	</assign>
	<reply name="Reply6" operation="RetailDemoOperation" partnerLink="RetailDemoPartnerLink" portType="tns:RetailDemoPortType" variable="response"/>
</sequence>
</process>
