<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="RefundStockIn.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="10001" messageType="java.lang.String"></variable>
        <variable name="ActType" messageType="java.lang.String" expression="getXmlData('RefundStockIn','//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/ACTTYPE')" />
        <variable name="creater" messageType="java.lang.String"></variable>
        <variable name="E" messageType="java.lang.String"></variable>
        <variable name="EN" messageType="java.lang.String"></variable>
        <variable name="erplocation" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/ERPLOCATION')" />
        <variable name="ERP����?ʱ" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Header/EVENTUSER')" />
        <variable name="faild" messageType="java.lang.String"></variable>
        <variable name="GetInspectedList" messageType="java.lang.String"></variable>
        <variable name="materialspec" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/MATERIALSPECNAME')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageid" messageType="java.lang.String"></variable>
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Header/MESSAGENAME')" />
        <variable name="mplist" messageType="java.util.List"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="PDASender" messageType="java.lang.String"></variable>
        <variable name="quantity" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/REQUESTQUANTITY')" />
        <variable name="reasonCodeType" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/SHIPREQUESTDETAILTYPE')" />
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/RECEIVEACTNO')" />
        <variable name="ReceiveReturnMaterialReport" messageType="java.lang.String"></variable>
        <variable name="RefundStockIn" messageType="org.jdom.Document"></variable>
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="saveresult" messageType="boolean"></variable>
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/RECEIVEREQUESTNAME')" />
        <variable name="ShipToMDLMaterialReport" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('RefundStockIn','//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/SITENAME')" />
        <variable name="stockintime" messageType="java.lang.String" expression="getXmlData('RefundStockIn','//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/RECEIVETIME')" />
        <variable name="tqmslist" messageType="java.util.List"></variable>
        <variable name="TRANSACTIONID" messageType="java.lang.String" expression="getXmlData('RefundStockIn', '//Message/Header/TRANSACTIONID')" />
        <variable name="undolist" messageType="java.util.List"></variable>
    </variables>
    <sequence>
        <receive name="RefundStockIn" bounds="1359,30,149,76">
            <input variable="RefundStockIn" type="org.jdom.Document" />
        </receive>
        <invoke name="MaterialPackingStockInImpl checkReceiveactState" type="invokebean" description="public void checkReceiveactState(java.lang.String receiveActNo)" bounds="1363,136,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="checkReceiveactState" operationDesc="public void checkReceiveactState(java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="receiveActNo" type="java.lang.String" />
        </invoke>
        <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="1363,271,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 variable="messagename" 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>
        <invoke name="MaterialPackingStockInImpl GetRefundStockInList" type="invokebean" description="public java.util.List GetRefundStockInList(org.jdom.Document document)" bounds="1363,406,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetRefundStockInList" operationDesc="public java.util.List GetRefundStockInList(org.jdom.Document document)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="RefundStockIn" type="org.jdom.Document" />
            <output variable="mplist" />
        </invoke>
        <invoke name="CommonValidation print" type="invokebean" description="public void print(java.lang.Object obj)" bounds="1363,541,141,105" partnerLink="CommonValidation" partnerLinkType="CommonValidation" operation="print" operationDesc="public void print(java.lang.Object obj)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="ActType" type="java.lang.Object" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1363,676,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="1363,811,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetMessageID" operationDesc="public java.lang.String GetMessageID(java.lang.String sitename)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="messageid" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="1363,946,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="1417,1081,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="1378,1160,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('ActType') = 'Reserve'&#xA; or &#xA;getVariable('ActType') = 'Refund'" bounds="305,1239,60,48">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="265,1317,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="319,1452,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="280,1531,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('ActType') = 'Refund'&#xD;&#xA;and&#xD;&#xA;(&#xD;&#xA;getVariable('reasonCodeType') = 'ZDRM'&#xD;&#xA;or&#xD;&#xA;getVariable('reasonCodeType') = 'ZDRE'&#xD;&#xA;)" bounds="114,1610,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingStockInImpl generateDeliveryRefundStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateDeliveryRefundStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="74,1659,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateDeliveryRefundStockInMessageForERPAccount" operationDesc="public java.util.List generateDeliveryRefundStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="undolist" />
                        </invoke>
                    </case>
                    <case name="case" type="case" condition="getVariable('ActType') = 'Refund'&#xD;&#xA;and&#xD;&#xA;(&#xD;&#xA;getVariable('reasonCodeType') = 'ZERM'&#xD;&#xA;or&#xD;&#xA;getVariable('reasonCodeType') = 'ZERE'&#xD;&#xA;)" bounds="305,1610,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingStockInImpl DeliveryEn" type="invokebean" description="public java.util.List DeliveryEn(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="265,1659,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="DeliveryEn" operationDesc="public java.util.List DeliveryEn(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="undolist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="496,1610,88,62">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingStockInImpl generateRefundStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateRefundStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="470,1702,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateRefundStockInMessageForERPAccount" operationDesc="public java.util.List generateRefundStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="undolist" />
                        </invoke>
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="485,1827,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                        <source idx="2" terminal="5,A" />
                    </switchend>
                </switch>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="470,1906,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="524,2041,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="485,2120,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="string(getListSize('undolist') ) &gt; 0" bounds="302,2199,67,64">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="265,2293,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingStockInImpl SaveRefundStockInListForERPAccount" type="invokebean" description="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="265,2428,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveRefundStockInListForERPAccount" operationDesc="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="undolist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="tqmslist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="701,2199,88,62">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" bounds="675,2291,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="replySubjectName" type="java.lang.String" />
                            <input variable="RefundStockIn" type="org.jdom.Document" />
                            <input constant="PDASender" type="java.lang.String" />
                            <input constant="E" type="java.lang.String" />
                            <input constant="ERP����?ʱ" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="675,2426,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('ActType') = 'Manual'" bounds="1008,1239,60,50">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="968,1319,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl generateManualStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateManualStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="968,1454,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateManualStockInMessageForERPAccount" operationDesc="public java.util.List generateManualStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="mplist" />
                    <input variable="eventInfo" />
                    <input variable="messageid" />
                    <input variable="siteName" />
                    <input variable="shipRequestName" />
                    <output variable="undolist" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="968,1589,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="1022,1724,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="983,1803,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getListSize('undolist') &gt; 0" bounds="907,1882,59,61">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="866,1973,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingStockInImpl SaveRefundStockInListForERPAccount" type="invokebean" description="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="866,2108,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveRefundStockInListForERPAccount" operationDesc="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="undolist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="tqmslist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="1097,1882,87,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" bounds="1070,1966,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="replysubjectname" type="java.lang.String" />
                            <input variable="RefundStockIn" type="org.jdom.Document" />
                            <input constant="PDASender" type="java.lang.String" />
                            <input constant="E" type="java.lang.String" />
                            <input constant="ERP����?ʱ" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="1070,2101,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('ActType') = 'BMDTOEM'&#xD;&#xA;or&#xD;&#xA;getVariable('ActType') = 'B5OEM'" bounds="1403,1239,60,57">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1363,1326,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl generateBMDTOEMStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateBMDTOEMStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="1363,1461,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateBMDTOEMStockInMessageForERPAccount" operationDesc="public java.util.List generateBMDTOEMStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="mplist" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="messageid" type="java.lang.String" />
                    <output variable="undolist" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="1363,1596,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="1417,1731,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="1378,1810,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getListSize('undolist') &gt; 0" bounds="1302,1889,59,61">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1261,1980,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingStockInImpl SaveRefundStockInListForERPAccount" type="invokebean" description="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="1261,2115,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveRefundStockInListForERPAccount" operationDesc="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="undolist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="tqmslist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="1492,1889,87,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" bounds="1465,1973,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="replysubjectname" type="java.lang.String" />
                            <input variable="RefundStockIn" type="org.jdom.Document" />
                            <input constant="PDASender" type="java.lang.String" />
                            <input constant="E" type="java.lang.String" />
                            <input constant="ERP����?ʱ" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="1465,2108,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('ActType') = 'WO'" bounds="1798,1239,60,49">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1758,1318,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl generateWorkOrderStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateWorkOrderStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="1758,1453,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateWorkOrderStockInMessageForERPAccount" operationDesc="public java.util.List generateWorkOrderStockInMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="mplist" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="messageid" type="java.lang.String" />
                    <output variable="undolist" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="1758,1588,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="1812,1723,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="1773,1802,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getListSize('undolist') &gt; 0" bounds="1697,1881,59,61">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1656,1972,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingStockInImpl SaveRefundStockInListForERPAccount" type="invokebean" description="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="1656,2107,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveRefundStockInListForERPAccount" operationDesc="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="undolist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="tqmslist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="1887,1881,87,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" bounds="1860,1965,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="replysubjectname" type="java.lang.String" />
                            <input variable="RefundStockIn" type="org.jdom.Document" />
                            <input constant="PDASender" type="java.lang.String" />
                            <input constant="E" type="java.lang.String" />
                            <input constant="ERP����?ʱ" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="1860,2100,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('ActType') = 'POOEM'" bounds="2193,1239,60,51">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="2153,1320,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl gerneratePOTOOEMMessageForERPAccount" type="invokebean" description="public java.util.List gerneratePOTOOEMMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="2153,1455,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="gerneratePOTOOEMMessageForERPAccount" operationDesc="public java.util.List gerneratePOTOOEMMessageForERPAccount(java.util.List mplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="mplist" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="messageid" type="java.lang.String" />
                    <output variable="undolist" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="2153,1590,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <switch name="switch" bounds="2207,1725,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="2168,1804,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getListSize('undolist') &gt; 0" bounds="2092,1883,59,61">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="2051,1974,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingStockInImpl SaveRefundStockInListForERPAccount" type="invokebean" description="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="2051,2109,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveRefundStockInListForERPAccount" operationDesc="public java.util.List SaveRefundStockInListForERPAccount(java.util.List msilist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="mplist" type="java.util.List" />
                            <input variable="undolist" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="messageid" type="java.lang.String" />
                            <output variable="tqmslist" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="2282,1883,87,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" bounds="2255,1967,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="replysubjectname" type="java.lang.String" />
                            <input variable="RefundStockIn" type="org.jdom.Document" />
                            <input constant="PDASender" type="java.lang.String" />
                            <input constant="E" type="java.lang.String" />
                            <input constant="ERP����?ʱ" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="2255,2102,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <switchend name="switchend" type="switchend" bounds="2666,2553,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
                <source idx="3" terminal="5,A" />
                <source idx="4" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="MaterialPackingStockInImpl updataPallet" type="invokebean" description="public void updataPallet(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo)" bounds="2651,2632,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="updataPallet" operationDesc="public void updataPallet(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="2651,2767,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="2651,2902,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="RefundStockIn" type="org.jdom.Document" />
            <input constant="PDASender" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="2651,3037,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl sendToTQMS" type="invokebean" description="public void sendToTQMS(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="2651,3172,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="sendToTQMS" operationDesc="public void sendToTQMS(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="tqmslist" type="java.util.List" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="messageid" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="2651,3307,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="MaterialPackingServiceImpl getQueryResult" type="invokebean" description="public void getQueryResult(java.lang.String messageName, java.lang.String queryId, java.lang.String version, java.lang.String senderName, java.lang.String siteName)" bounds="2651,3442,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="getQueryResult" operationDesc="public void getQueryResult(java.lang.String messageName, java.lang.String queryId, java.lang.String version, java.lang.String senderName, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="messagename" type="java.lang.String" />
            <input constant="GetInspectedList" type="java.lang.String" />
            <input constant="10001" type="java.lang.String" />
            <input constant="PDASender" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
        </invoke>
        <switch name="switch" bounds="2705,3577,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="2666,3656,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('siteName') = 'B9'" bounds="2486,3735,60,19">
                <source idx="0" terminal="5,A" />
                <switch name="switch" bounds="2500,3784,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="2461,3863,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('ActType') = 'WO'&#xD;&#xA;and&#xD;&#xA;starts-with(getVariable('shipRequestName'), 'T')&#xD;&#xA;and&#xD;&#xA;(getVariable('erplocation') = '970N' &#xD;&#xA;or &#xD;&#xA;getVariable('erplocation') = '970B'&#xD;&#xA;or&#xD;&#xA;getVariable('erplocation') = '971B'&#xD;&#xA;or&#xD;&#xA;getVariable('erplocation') = '971N')" bounds="510,3942,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ERPInterfaceServiceImpl sendMessageToMES" type="invokebean" description="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" bounds="470,3991,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendMessageToMES" operationDesc="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="ReceiveReturnMaterialReport" type="java.lang.String" />
                            <input variable="eventUser" type="java.lang.String" />
                            <input variable="shipRequestName" type="java.lang.String" />
                            <input variable="TRANSACTIONID" type="java.lang.String" />
                            <input constant="EN" type="java.lang.String" />
                        </invoke>
                    </case>
                    <case name="case" type="case" condition="getVariable('ActType') = 'Reserve'&#xD;&#xA; or &#xD;&#xA;getVariable('ActType') = 'Refund'&#xD;&#xA;and&#xD;&#xA;(&#xD;&#xA;getVariable('reasonCodeType') = '912'&#xD;&#xA;or&#xD;&#xA;getVariable('reasonCodeType') = 'YAQ')" bounds="2298,3938,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ERPInterfaceServiceImpl sendMessageToMES" type="invokebean" description="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" bounds="2272,3981,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendMessageToMES" operationDesc="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="ReceiveReturnMaterialReport" type="java.lang.String" />
                            <input variable="eventUser" type="java.lang.String" />
                            <input variable="shipRequestName" type="java.lang.String" />
                            <input variable="TRANSACTIONID" type="java.lang.String" />
                            <input constant="EN" type="java.lang.String" />
                        </invoke>
                    </case>
                    <case name="case" type="case" condition="getVariable('ActType') = 'WO' &#xD;&#xA;and&#xD;&#xA;starts-with(getVariable('shipRequestName'), 'T')&#xD;&#xA;and&#xD;&#xA;(getVariable('erplocation') != '970N' &#xD;&#xA;and&#xD;&#xA;getVariable('erplocation') != '971N'&#xD;&#xA;and&#xD;&#xA;getVariable('erplocation') != '970B' &#xD;&#xA;and&#xD;&#xA;getVariable('erplocation') != '971B'&#xD;&#xA;)" bounds="2515,3943,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ERPInterfaceServiceImpl sendMessageToMES" type="invokebean" description="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" bounds="2527,3994,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendMessageToMES" operationDesc="public static void sendMessageToMES(java.lang.String messageName, java.lang.String eventUser, java.lang.String shipRequestName, java.lang.String TransactionID, java.lang.String type)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="ReceiveReturnMaterialReport" type="java.lang.String" />
                            <input variable="eventUser" type="java.lang.String" />
                            <input variable="shipRequestName" type="java.lang.String" />
                            <input variable="TRANSACTIONID" type="java.lang.String" />
                            <input constant="MP" type="java.lang.String" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="2723,3988,88,19">
                        <source idx="0" terminal="5,A" />
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="2461,4116,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                        <source idx="2" terminal="5,A" />
                        <source idx="3" terminal="5,A" />
                    </switchend>
                </switch>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="2882,3735,88,19">
                <source idx="0" terminal="5,A" />
                <terminate name="terminate" bounds="2856,3784,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

