<?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="PoReturn.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="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <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="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/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="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="PODetailChargeList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/CHARGE')" />
        <variable name="PODetailChargeNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/CHARGE')" />
        <variable name="PODetailErpFactoryList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/ERPFACTORY')" />
        <variable name="PODetailErpLocationList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/ERPLOCATION')" />
        <variable name="PODetailMaterialSpecNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/MATERIALSPECNAME')" />
        <variable name="PODetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/RECEIVEREQUESTDETAILNAME')" />
        <variable name="PODetailQuantityList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST/PODETAIL/SELECTEDQUANTITY')" />
        <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/REASONCODE')" />
        <variable name="ReasonCodeType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/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/Body/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="unDoDetailPackingGradeList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/PODETAILLIST//PODETAIL/PACKINGGRADESTATE')" />
        <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="PoReturn" bounds="177,30,144,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="170,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="179,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="179,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="179,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="179,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="PoReturn" 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="179,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="POReturn" type="java.lang.String" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl unDoIDReturnForERPAccount" type="invokebean" description="public static java.util.List unDoIDReturnForERPAccount(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List poDetailErpLocationList, java.util.List poDetailErpFactoryList, java.util.List poDetailMaterialSpeNameList, java.util.List unDoIDDetailName, java.util.List poDetailQuantityList, java.lang.String erpEventTime, java.lang.String unDoId, java.util.List unDoIDDate, java.lang.String shipType, java.lang.String reasonCode, java.util.List poDetailPackingGradeList, java.lang.String messageID, java.lang.String receiveActNO, java.util.List materialPackingNameList, java.util.List materialSpeNameList, java.util.List erpLocationList, java.util.List erpFactoryList, java.util.List chargeList, java.util.List unDoIdDetailChargeList, java.lang.String siteName)" bounds="179,933,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="unDoIDReturnForERPAccount" operationDesc="public static java.util.List unDoIDReturnForERPAccount(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List poDetailErpLocationList, java.util.List poDetailErpFactoryList, java.util.List poDetailMaterialSpeNameList, java.util.List unDoIDDetailName, java.util.List poDetailQuantityList, java.lang.String erpEventTime, java.lang.String unDoId, java.util.List unDoIDDate, java.lang.String shipType, java.lang.String reasonCode, java.util.List poDetailPackingGradeList, java.lang.String messageID, java.lang.String receiveActNO, java.util.List materialPackingNameList, java.util.List materialSpeNameList, java.util.List erpLocationList, java.util.List erpFactoryList, java.util.List chargeList, java.util.List unDoIdDetailChargeList, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="PODetailErpLocationList" type="java.util.List" />
            <input variable="PODetailErpFactoryList" type="java.util.List" />
            <input variable="PODetailMaterialSpecNameList" type="java.util.List" />
            <input variable="unDoDetailName" type="java.util.List" />
            <input variable="PODetailQuantityList" type="java.util.List" />
            <input variable="erpEventTime" type="java.lang.String" />
            <input variable="unDoId" type="java.lang.String" />
            <input variable="unDoIdDate" type="java.util.List" />
            <input variable="shipType" type="java.lang.String" />
            <input variable="ReasonCode" type="java.lang.String" />
            <input variable="unDoDetailPackingGradeList" type="java.util.List" />
            <input variable="messageID" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="materialPackingNameList" type="java.util.List" />
            <input variable="materialSpecNameList" type="java.util.List" />
            <input variable="erpLocationList" type="java.util.List" />
            <input variable="erpFactoryList" type="java.util.List" />
            <input variable="chargeList" type="java.util.List" />
            <input variable="PODetailChargeNameList" type="java.util.List" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="newUnDoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="168,1068,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="233,1201,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="194,1280,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('newUnDoList') &gt; 0" bounds="109,1359,67,64">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="63,1453,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 PoReduce" type="invokebean" description="public void PoReduce(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String poName, java.lang.String siteName, java.util.List poDetailNameList, java.util.List poDetailQuantity)" bounds="72,1589,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="PoReduce" operationDesc="public void PoReduce(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String poName, java.lang.String siteName, java.util.List poDetailNameList, java.util.List poDetailQuantity)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="POName" type="java.lang.String" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="PODetailNameList" type="java.util.List" />
                    <input variable="PODetailQuantityList" type="java.util.List" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl poReturn" type="invokebean" description="public void poReturn(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 erpFactoryList, java.util.List poDetailErpLocationList, java.util.List poDetailErpFactoryList, java.util.List poDetailMaterialSpeNameList, java.util.List unDoIdDetailName, java.lang.String unDoId, java.lang.String erpEventTime, java.util.List unDoIdDetailChargeList, java.util.List chargeList, java.lang.String receiveActNo)" bounds="72,1724,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="poReturn" operationDesc="public void poReturn(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 erpFactoryList, java.util.List poDetailErpLocationList, java.util.List poDetailErpFactoryList, java.util.List poDetailMaterialSpeNameList, java.util.List unDoIdDetailName, java.lang.String unDoId, java.lang.String erpEventTime, java.util.List unDoIdDetailChargeList, java.util.List chargeList, 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="erpFactoryList" type="java.util.List" />
                    <input variable="PODetailErpLocationList" type="java.util.List" />
                    <input variable="PODetailErpFactoryList" type="java.util.List" />
                    <input variable="PODetailMaterialSpecNameList" type="java.util.List" />
                    <input variable="unDoDetailName" type="java.util.List" />
                    <input variable="unDoId" type="java.lang.String" />
                    <input variable="erpEventTime" type="java.lang.String" />
                    <input variable="PODetailChargeNameList" type="java.util.List" />
                    <input variable="chargeList" type="java.util.List" />
                    <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="294,1782,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,1859,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,1992,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,1359,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)" bounds="287,1451,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>
                <terminate name="terminate" bounds="287,1586,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

