<?xml version="1.0" encoding="UTF-8"?>
<process name="echo"
         targetNamespace="http://enterprise.netbeans.org/bpel/echo/echo_1"
         xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
         xmlns:sxt="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace" 
         xmlns:sxed="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor"
         xmlns:wsdlNS="http://enterprise.netbeans.org/bpel/echo/echo_1"
         xmlns:ns1="http://localhost/echo/echo"
         xmlns:ns2="http://xml.netbeans.org/schema/echo">
    
    <documentation>
        The synchronous BPEL process illustrates a simple synchronous
        flow. The process receives an input message and sends it back
        synchronously. A client starts the synchronous process by invoking
        a request-response operation. After invoking a synchronous process,
        the client is blocked until the process finishes and returns the result.
    </documentation>

    <import namespace="http://localhost/echo/echo"
            location="echo.wsdl"
            importType="http://schemas.xmlsoap.org/wsdl/"/>
    
    <partnerLinks>
        <partnerLink
            name="echo"
            partnerLinkType="ns1:partnerlinktype1"
            myRole="partnerlinktyperole1">
            <documentation>
                This partner link represents the client who sends an
                input message to the process and receives the response.
            </documentation>
        </partnerLink>
    </partnerLinks>
    
    <variables>
        <variable name="outputVar" messageType="ns1:responseMessage">
            <documentation>Output variable.</documentation>
        </variable>
        <variable name="inputVar" messageType="ns1:requestMessage">
            <documentation>Input variable.</documentation>
        </variable>
    </variables>
    
    <sequence>
        <documentation>
            The sequence includes several activities
            which are executed in lexical order.
        </documentation>
        <receive
            name="start"
            partnerLink="echo"
            operation="operation1"
            portType="ns1:portType1"
            variable="inputVar"
            createInstance="yes">
            <documentation>
                The Receive activity makes the process
                to wait for the incoming message to arrive.
            </documentation>
        </receive>
        <assign name="Assign1">
            <copy>
                <from variable="inputVar" part="inputType"/>
                <to variable="outputVar" part="resultType"/>
            </copy>
        </assign>
        <reply
            name="end"
            partnerLink="echo"
            operation="operation1"
            portType="ns1:portType1"
            variable="outputVar">
            <documentation>
                The Reply activity returns a message from the process
                to the  partner which initiated the communication.
            </documentation>
        </reply>
    </sequence>
</process>
