<?xml version="1.0" encoding="euc-kr"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="CompleteNPShipRequest.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialReceiveRequestServiceImpl" partnerLinkType="bean:MaterialReceiveRequestServiceImpl" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <partnerLink name="MaterialPackingServiceUtil" partnerLinkType="bean:MaterialPackingServiceUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="StorageServiceImpl" partnerLinkType="bean:StorageServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="actType" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/ACTTYPE')" />
        <variable name="boxCount" messageType="java.lang.String"></variable>
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="boxName" messageType="org.jdom.Element"></variable>
        <variable name="CompleteShipRequest" messageType="org.jdom.Document"></variable>
        <variable name="Deliverytype" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/DELIVERYTYPE')" />
        <variable name="DetailList" messageType="java.util.List"></variable>
        <variable name="ERPEventTime" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/RECEIVETIME')" />
        <variable name="EventComment" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Header/EVENTUSER')" />
        <variable name="Language" messageType="java.lang.String"></variable>
        <variable name="locationList" messageType="java.util.List"></variable>
        <variable name="locationName" messageType="org.jdom.Element"></variable>
        <variable name="makeDate" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/MAKEDATE')" />
        <variable name="materialDoinfo" messageType="com.cim.idm.wmspackage.materialundo.info.MaterialUnDoinfo"></variable>
        <variable name="materialDoinfoList" messageType="java.util.List"></variable>
        <variable name="materialPacking" messageType="java.lang.Object"></variable>
        <variable name="materialPackingName" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Header/MESSAGENAME')" />
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="reasonCode" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/REASONCODE')" />
        <variable name="reasonCodeType" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/REASONCODETYPE')" />
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="shipRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="Shiprequestdetailtype" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/SHIPREQUESTDETAILTYPE')" />
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('CompleteShipRequest', '//Message/Body/SITENAME')" />
        <variable name="StockOut" messageType="java.lang.String"></variable>
        <variable name="storageName" messageType="java.lang.String"></variable>
        <variable name="unDoDetailName" messageType="java.lang.String"></variable>
        <variable name="unDoID" messageType="java.lang.String"></variable>
        <variable name="unDoIdDate" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="CompleteShipRequest" bounds="70,30,149,62">
            <input variable="CompleteShipRequest" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,122,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
            <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="74,257,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="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="74,392,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="shipRequestName" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="actType" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialShipRequestServiceImpl updateComplete" type="invokebean" description="public void updateComplete(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" bounds="74,527,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="updateComplete" operationDesc="public void updateComplete(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" 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="shipRequestName" type="java.lang.String" />
            <input constant="Completed" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialPackingServiceUtil getPackingListFromShipRequest" type="invokebean" description="public java.util.List getPackingListFromShipRequest(java.lang.String invoiceNo)" bounds="74,662,141,105" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="getPackingListFromShipRequest" operationDesc="public java.util.List getPackingListFromShipRequest(java.lang.String invoiceNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="shipRequestName" type="java.lang.String" />
            <output variable="boxList" />
        </invoke>
        <invoke name="MaterialPackingServiceUtil getLocationListFromShipRequest" type="invokebean" description="public java.util.List getLocationListFromShipRequest(java.lang.String invoiceNo)" bounds="74,797,141,105" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="getLocationListFromShipRequest" operationDesc="public java.util.List getLocationListFromShipRequest(java.lang.String invoiceNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="shipRequestName" type="java.lang.String" />
            <output variable="locationList" />
        </invoke>
        <invoke name="MaterialPackingServiceImpl updateMaterialPackingStockOut" type="invokebean" description="public void updateMaterialPackingStockOut(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingKeyList, java.lang.String stockState, java.lang.String erpEventTime, java.lang.String eventUser, java.lang.String eventComment, java.lang.String receiveActNo, java.lang.String receiptor)" bounds="74,932,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="updateMaterialPackingStockOut" operationDesc="public void updateMaterialPackingStockOut(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingKeyList, java.lang.String stockState, java.lang.String erpEventTime, java.lang.String eventUser, java.lang.String eventComment, java.lang.String receiveActNo, java.lang.String receiptor)" 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="boxList" type="java.util.List" />
            <input constant="StockOut" type="java.lang.String" />
            <input variable="ERPEventTime" type="java.lang.String" />
            <input variable="eventUser" type="java.lang.String" />
            <input variable="EventComment" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input constant="" type="java.lang.String" />
        </invoke>
        <while name="while" bounds="128,1067,32,32" type="2" collection="locationList" element="storageName">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="89,1146,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <invoke name="StorageServiceImpl changeUserStateByBoxList" type="invokebean" description="public void changeUserStateByBoxList(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String storageName)" bounds="74,1225,141,105" partnerLink="StorageServiceImpl" partnerLinkType="StorageServiceImpl" operation="changeUserStateByBoxList" operationDesc="public void changeUserStateByBoxList(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String storageName)" 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="storageName" type="java.lang.String" />
            </invoke>
            <whileend name="whileend" type="whileend" bounds="303,1350,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <switch name="switch" bounds="342,1429,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="303,1508,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('Deliverytype') = 'Reserve'" bounds="128,1587,32,49">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl NPMaterialPackingStockOut_15SEQ" type="invokebean" description="public void NPMaterialPackingStockOut_15SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" bounds="74,1666,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="NPMaterialPackingStockOut_15SEQ" operationDesc="public void NPMaterialPackingStockOut_15SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="boxList" type="java.util.List" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <input variable="reasonCode" type="java.lang.String" />
                    <input variable="reasonCodeType" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('Deliverytype') = 'Delivery'" bounds="342,1587,32,49">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl ShipRequestNametoDetailType" type="invokebean" description="public java.lang.String ShipRequestNametoDetailType(java.lang.String shipRequestName)" bounds="288,1666,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="ShipRequestNametoDetailType" operationDesc="public java.lang.String ShipRequestNametoDetailType(java.lang.String shipRequestName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <output variable="Shiprequestdetailtype" />
                </invoke>
                <switch name="switch" bounds="342,1801,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="303,1880,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('Shiprequestdetailtype') = 'ZELF' &#xD;&#xA;or  getVariable('Shiprequestdetailtype') = 'ZERM' " bounds="291,1959,60,58">
                        <source idx="0" terminal="5,A" />
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="351,1959,88,53">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingServiceImpl NPMaterialPackingStockOut_05SEQ" type="invokebean" description="public void NPMaterialPackingStockOut_05SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" bounds="325,2042,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="NPMaterialPackingStockOut_05SEQ" operationDesc="public void NPMaterialPackingStockOut_05SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="boxList" type="java.util.List" />
                            <input variable="siteName" type="java.lang.String" />
                            <input variable="shipRequestName" type="java.lang.String" />
                            <input variable="reasonCode" type="java.lang.String" />
                            <input variable="reasonCodeType" type="java.lang.String" />
                        </invoke>
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="303,2167,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                    </switchend>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('Deliverytype') = 'WO'" bounds="556,1587,60,44">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl NPMaterialPackingStockOut_02SEQ" type="invokebean" description="public void NPMaterialPackingStockOut_02SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" bounds="516,1661,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="NPMaterialPackingStockOut_02SEQ" operationDesc="public void NPMaterialPackingStockOut_02SEQ(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String reasonCode, java.lang.String reasonCodeType)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="boxList" type="java.util.List" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <input variable="reasonCode" type="java.lang.String" />
                    <input variable="reasonCodeType" type="java.lang.String" />
                </invoke>
            </case>
            <switchend name="switchend" type="switchend" bounds="303,2236,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="288,2315,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="ESBService sendBySender" type="invokebean" description="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" bounds="288,2450,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendBySender" operationDesc="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="replysubjectname" type="java.lang.String" />
            <input variable="CompleteShipRequest" type="org.jdom.Document" />
            <input variable="returnElement" type="org.jdom.Element" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

