<?xml version="1.0" encoding="GBK"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="ModifyDispatchInfo.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="invoice" messageType="java.lang.String"></variable>
        <variable name="invoiceElement" messageType="org.jdom.Element"></variable>
        <variable name="invoiceList" messageType="java.util.ArrayList"></variable>
        <variable name="isPO" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ACTTYPE')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="workerID" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/LASTEVENTUSER')" />
    </variables>
    <sequence>
        <receive name="ModifyLimitedMaterialSpe" bounds="70,30,142,80">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="EventInfoUtil makeEventInfo" type="invokebean" description="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="71,140,141,105" partnerLink="EventInfoUtil" partnerLinkType="EventInfoUtil" operation="makeEventInfo" operationDesc="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input constant="ModifyDispatchInfo" type="java.lang.String" />
            <input variable="eventUser" type="java.lang.String" />
            <input variable="eventComment" type="java.lang.String" />
            <input constant="" type="java.lang.String" />
            <input constant="" type="java.lang.String" />
            <output variable="eventInfo" />
        </invoke>
        <expression name="expression" type="expression" bounds="71,275,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('invoiceList',getElementList('message','//ITEM'))" />
        </expression>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="71,370,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <while name="while" bounds="125,505,32,32" type="2" collection="invoiceList" element="invoiceElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="86,584,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="71,663,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('invoice',getXmlData('invoiceElement','//SHIPREQUESTNAME'))" />
            </expression>
            <invoke name="MaterialShipRequestServiceImpl saveWorkerInfo" type="invokebean" description="public void saveWorkerInfo(java.lang.String siteName, java.lang.String isPo, java.lang.String workerID, java.lang.String invoice, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="71,758,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="saveWorkerInfo" operationDesc="public void saveWorkerInfo(java.lang.String siteName, java.lang.String isPo, java.lang.String workerID, java.lang.String invoice, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input variable="siteName" type="java.lang.String" />
                <input variable="isPO" type="java.lang.String" />
                <input variable="workerID" type="java.lang.String" />
                <input variable="invoice" type="java.lang.String" />
                <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            </invoke>
            <whileend name="whileend" type="whileend" bounds="86,883,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="71,962,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="71,1097,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="replySubjectName" type="java.lang.String" />
            <input variable="message" type="org.jdom.Document" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

