<?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="RefundStockOutModifyPackingState.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="MaterialPackingServiceUtil" partnerLinkType="bean:MaterialPackingServiceUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="MaterialReceiveRequestServiceImpl" partnerLinkType="bean:MaterialReceiveRequestServiceImpl" />
        <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="boxList" messageType="java.util.List"></variable>
        <variable name="erpEventTime" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPEVENTTIME')" />
        <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="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="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="receiveRequestType" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="requestDetailName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/DESCRIPTION')" />
        <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')" />
    </variables>
    <sequence>
        <receive name="RefundStockOutModifyPackingState" bounds="178,30,144,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="171,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="180,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="180,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="180,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="180,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="RefundStockOutModifyPackingState" 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="MaterialPackingServiceUtil getPackingListFromShipRequest" type="invokebean" description="public java.util.List getPackingListFromShipRequest(java.lang.String invoiceNo, java.lang.String receiveActNo)" bounds="180,798,141,105" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="getPackingListFromShipRequest" operationDesc="public java.util.List getPackingListFromShipRequest(java.lang.String invoiceNo, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <output variable="boxList" />
        </invoke>
        <invoke name="MaterialPackingServiceImpl poReturnSEQ" type="invokebean" description="public void poReturnSEQ(java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String receiveRequestName, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="180,933,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="poReturnSEQ" operationDesc="public void poReturnSEQ(java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String receiveRequestName, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="boxList" type="java.util.List" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl poRefundStockOutReceiveRequestTypeZTB4ForERPAccount" type="invokebean" description="public static java.util.List poRefundStockOutReceiveRequestTypeZTB4ForERPAccount(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String erpEventTime, java.lang.String shipType, java.lang.String reasonCode, java.lang.String messageID, java.lang.String receiveActNO, java.lang.String siteName)" bounds="180,1068,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="poRefundStockOutReceiveRequestTypeZTB4ForERPAccount" operationDesc="public static java.util.List poRefundStockOutReceiveRequestTypeZTB4ForERPAccount(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String erpEventTime, java.lang.String shipType, java.lang.String reasonCode, java.lang.String messageID, java.lang.String receiveActNO, 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="erpEventTime" type="java.lang.String" />
            <input variable="shipType" type="java.lang.String" />
            <input variable="reasonCode" type="java.lang.String" />
            <input variable="messageID" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="newUnDoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="169,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="234,1336,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="195,1415,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('newUnDoList') &gt; 0" bounds="114,1494,57,47">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="63,1571,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="MaterialReceiveRequestServiceImpl selectMaterialReceiveRequestInfo" type="invokebean" description="public java.lang.String selectMaterialReceiveRequestInfo(java.lang.String siteName, java.lang.String receiveRequestName)" bounds="71,1720,141,105" partnerLink="MaterialReceiveRequestServiceImpl" partnerLinkType="MaterialReceiveRequestServiceImpl" operation="selectMaterialReceiveRequestInfo" operationDesc="public java.lang.String selectMaterialReceiveRequestInfo(java.lang.String siteName, java.lang.String receiveRequestName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <output variable="receiveRequestType" />
                </invoke>
                <switch name="switch" bounds="123,1908,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="79,2007,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('receiveRequestType') = 'ZTB1'" bounds="-206,2137,60,47">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingServiceImpl insertStockOutInfoPreStocked" type="invokebean" description="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" bounds="-245,2305,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertStockOutInfoPreStocked" operationDesc="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="newUnDoList" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="receiveActNo" type="java.lang.String" />
                            <input constant="PreStock" type="java.lang.String" />
                        </invoke>
                    </case>
                    <case name="case" type="case" condition="getVariable('receiveRequestType') = 'ZTB4'" bounds="102,2132,60,51">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingServiceImpl insertStockOutInfoPreStocked" type="invokebean" description="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" bounds="58,2302,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertStockOutInfoPreStocked" operationDesc="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="newUnDoList" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="receiveActNo" type="java.lang.String" />
                            <input constant="PreStockOut" type="java.lang.String" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="400,2118,88,57">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingServiceImpl insertStockOutInfoPreStocked" type="invokebean" description="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" bounds="375,2302,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertStockOutInfoPreStocked" operationDesc="public void insertStockOutInfoPreStocked(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String stockState)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="newUnDoList" type="java.util.List" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="receiveActNo" type="java.lang.String" />
                            <input constant="PreStockOut" type="java.lang.String" />
                        </invoke>
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="69,2518,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                        <source idx="2" terminal="5,A" />
                    </switchend>
                </switch>
                <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="51,2639,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="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="51,2801,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>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="40,2936,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="313,1494,92,50">
                <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="289,1574,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="289,1709,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

