<?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="OEMReturn.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialReceiveRequestServiceImpl" partnerLinkType="bean:MaterialReceiveRequestServiceImpl" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="actType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ACTTYPE')" />
        <variable name="chargeList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/CHARGE')" />
        <variable name="costCenter" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/COSTCENTER')" />
        <variable name="description" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/DESCRIPTION')" />
        <variable name="erpEventTime" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPEVENTTIME')" />
        <variable name="erpFactoryList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/ERPFACTORY')" />
        <variable name="erpLocationList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/ERPLOCATION')" />
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/LASTEVENTCOMMENT')" />
        <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="materialDetailErpFactoryList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALLIST/MATERIALDETAIL/ERPFACTORY')" />
        <variable name="materialDetailErpLocationList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALLIST/MATERIALDETAIL/ERPLOCATION')" />
        <variable name="materialDetailMaterialSpecNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALLIST/MATERIALDETAIL/MATERIALSPECNAME')" />
        <variable name="materialDetailQuantityList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/MATERIALQUANTITY')" />
        <variable name="materialPackingNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/MATERIALPACKINGNAME')" />
        <variable name="materialSpecNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/MATERIALSPECNAME')" />
        <variable name="materialUndoInfo" messageType="java.util.List"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageID" messageType="java.lang.String"></variable>
        <variable name="newUnDoList" messageType="java.util.List"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="packingState" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/PACKINGSTATE')" />
        <variable name="PODetailChargeNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/CHARGE')" />
        <variable name="PODetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/UNDODETAILNAME')" />
        <variable name="POName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEREQUESTNAME')" />
        <variable name="ReasonCode" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/BOXLIST/BOX/REASONCODE')" />
        <variable name="reasonCodeType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/BOXLIST/BOX/REASONCODETYPE')" />
        <variable name="ReceiveAct" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEREQUESTNAME')" />
        <variable name="shipType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEREQUESTDETAILTYPE')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/SITENAME')" />
        <variable name="siteNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/BOXLIST/BOX/SITENAME')" />
        <variable name="stockState" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/STOCKSTATE')" />
        <variable name="unDoDetailName" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST//PODETAIL/UNDODETAILNAME')" />
        <variable name="unDoId" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/UNDOID')" />
        <variable name="unDoIdDate" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/UNDOIDDATE')" />
    </variables>
    <sequence>
        <receive name="OEMReturn" bounds="179,30,144,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="172,122,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="CommonValidation GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="181,258,141,105" partnerLink="CommonValidation" partnerLinkType="CommonValidation" 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="181,393,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="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="181,528,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="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="181,663,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="OEMReturn" type="java.lang.String" />
            <input variable="eventUser" type="java.lang.String" />
            <input variable="eventComment" type="java.lang.String" />
            <input variable="reasonCodeType" type="java.lang.String" />
            <input variable="ReasonCode" type="java.lang.String" />
            <output variable="eventInfo" />
        </invoke>
        <invoke name="MaterialReceiveRequestServiceImpl CreateMaterialRRActByLabel" type="invokebean" description="public void CreateMaterialRRActByLabel(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String receiveActNo, java.lang.String actType)" bounds="181,798,141,105" partnerLink="MaterialReceiveRequestServiceImpl" partnerLinkType="MaterialReceiveRequestServiceImpl" operation="CreateMaterialRRActByLabel" operationDesc="public void CreateMaterialRRActByLabel(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String receiveActNo, java.lang.String actType)" 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="POName" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input constant="OEMReturn" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialPackingServiceImpl asignActNo" type="invokebean" description="public void asignActNo(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List siteNameList, java.util.List materialPackingNameList, java.lang.String receiveActNo)" bounds="181,933,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="asignActNo" operationDesc="public void asignActNo(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List siteNameList, java.util.List materialPackingNameList, 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="siteNameList" type="java.util.List" />
            <input variable="materialPackingNameList" type="java.util.List" />
            <input variable="receiveActNo" type="java.lang.String" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl erpInterface_WMS19ForOEMReturnForERPAccount" type="invokebean" description="public static java.util.List erpInterface_WMS19ForOEMReturnForERPAccount(java.lang.String shipType, java.util.List materialSpecNameList, java.util.List erpFactoryNameList, java.util.List materialQuantityList, java.util.List erpLocationList, java.lang.String costCenter, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNO, java.lang.String siteName)" bounds="181,1068,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_WMS19ForOEMReturnForERPAccount" operationDesc="public static java.util.List erpInterface_WMS19ForOEMReturnForERPAccount(java.lang.String shipType, java.util.List materialSpecNameList, java.util.List erpFactoryNameList, java.util.List materialQuantityList, java.util.List erpLocationList, java.lang.String costCenter, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNO, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input constant="502" type="java.lang.String" />
            <input variable="materialSpecNameList" />
            <input variable="erpFactoryList" />
            <input variable="materialDetailQuantityList" />
            <input variable="erpLocationList" />
            <input variable="costCenter" />
            <input variable="erpEventTime" />
            <input variable="eventInfo" />
            <input variable="messageID" />
            <input variable="receiveActNo" />
            <input variable="siteName" />
            <input variable="chargeList" />
            <output variable="newUnDoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="170,1203,162,103" 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="235,1336,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="196,1415,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('newUnDoList') &gt; 0" bounds="115,1494,55,53">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="63,1577,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl OEMReturn" type="invokebean" description="public void OEMReturn(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List siteNameList, java.util.List materialPackingNameList, java.util.List newUnDoList, java.util.List materialSpeNameList, java.util.List erpLocationList, java.util.List materialDetailErpLocationList, java.util.List materialDetailMaterialSpeNameList, java.lang.String erpEventTime, java.lang.String receiveActNo)" bounds="72,1713,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="OEMReturn" operationDesc="public void OEMReturn(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List siteNameList, java.util.List materialPackingNameList, java.util.List newUnDoList, java.util.List materialSpeNameList, java.util.List erpLocationList, java.util.List materialDetailErpLocationList, java.util.List materialDetailMaterialSpeNameList, java.lang.String erpEventTime, 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="siteNameList" type="java.util.List" />
                    <input variable="materialPackingNameList" type="java.util.List" />
                    <input variable="newUnDoList" type="java.util.List" />
                    <input variable="materialSpecNameList" type="java.util.List" />
                    <input variable="erpLocationList" type="java.util.List" />
                    <input variable="materialDetailErpLocationList" type="java.util.List" />
                    <input variable="materialDetailMaterialSpecNameList" type="java.util.List" />
                    <input variable="erpEventTime" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl updataPalletStateByPC" type="invokebean" description="public void updataPalletStateByPC(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String shipRequestName)" bounds="303,1860,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="updataPalletStateByPC" operationDesc="public void updataPalletStateByPC(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String shipRequestName)" 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" />
                    <input variable="shipRequestName" type="java.lang.String" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="61,1848,162,103" 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="72,1981,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>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="313,1494,96,63">
                <source idx="0" terminal="5,A" />
                <terminate name="terminate" bounds="291,1587,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

