<?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="PDAShipRequestDetailStockOutForSMT.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <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="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="actType" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/ACTTYPE')" />
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="Completed" messageType="java.lang.String"></variable>
        <variable name="Deliverytype" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/DELIVERYTYPE')" />
        <variable name="ERPEventTime" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/RECEIVETIME')" />
        <variable name="EventComment" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Header/EVENTUSER')" />
        <variable name="materialDoinfoList" messageType="java.util.List"></variable>
        <variable name="MaterialShipRequest" messageType="com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest"></variable>
        <variable name="messageID" messageType="java.lang.String"></variable>
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Header/MESSAGENAME')" />
        <variable name="PDAShipRequestDetailStockOutForSMT" messageType="org.jdom.Document"></variable>
        <variable name="reasonCode" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/REASONCODE')" />
        <variable name="reasonCodeType" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/REASONCODETYPE')" />
        <variable name="receiptor" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/RECEIVER')" />
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="Shiprequestdetailtype" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/SHIPREQUESTDETAILTYPE')" />
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('PDAShipRequestDetailStockOutForSMT', '//Message/Body/SITENAME')" />
        <variable name="specialDateFlag" messageType="java.lang.Boolean">True</variable>
        <variable name="StockOut" messageType="java.lang.String"></variable>
        <variable name="storageName" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="PDAShipRequestDetailStockOutForSMT" bounds="70,30,149,62">
            <input variable="PDAShipRequestDetailStockOutForSMT" 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="CommonValidation GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="74,257,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="74,392,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="74,527,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="MaterialShipRequestServiceImpl getShipRequest" type="invokebean" description="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" bounds="74,662,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="getShipRequest" operationDesc="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" 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="MaterialShipRequest" />
        </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,797,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 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="74,932,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 MaterialPackingStockOut_15SEQ" type="invokebean" description="public void MaterialPackingStockOut_15SEQ(java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo)" bounds="74,1067,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="MaterialPackingStockOut_15SEQ" operationDesc="public void MaterialPackingStockOut_15SEQ(java.util.List materialPackingKeyList, java.lang.String siteName, java.lang.String invoiceNo)" 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="shipRequestName" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1202,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1337,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="ERPInterfaceServiceImpl erpInterface_PI056ForSMTStockOutForERPAccount" type="invokebean" description="public static java.util.List erpInterface_PI056ForSMTStockOutForERPAccount(java.lang.String shipType, java.lang.String shipRequestName, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo)" bounds="74,1472,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_PI056ForSMTStockOutForERPAccount" operationDesc="public static java.util.List erpInterface_PI056ForSMTStockOutForERPAccount(java.lang.String shipType, java.lang.String shipRequestName, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="Shiprequestdetailtype" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="ERPEventTime" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="messageID" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <output variable="materialDoinfoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1607,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="128,1742,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="89,1821,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="string(getListSize('materialDoinfoList')) &gt; 0" bounds="110,1900,69,64">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1994,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
                    <source idx="0" terminal="5,A" />
                </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)" bounds="74,2129,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)" 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" />
                </invoke>
                <invoke name="MaterialReceiveRequestServiceImpl updateMaterialreceiveactState" type="invokebean" description="public void updateMaterialreceiveactState(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String receiveActNo, java.lang.String state)" bounds="74,2264,141,105" partnerLink="MaterialReceiveRequestServiceImpl" partnerLinkType="MaterialReceiveRequestServiceImpl" operation="updateMaterialreceiveactState" operationDesc="public void updateMaterialreceiveactState(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveRequestName, java.lang.String receiveActNo, java.lang.String state)" 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 constant="Completed" type="java.lang.String" />
                </invoke>
                <invoke name="MaterialShipRequestServiceImpl updateCompleteForSMT" type="invokebean" description="public void updateCompleteForSMT(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" bounds="69,2399,150,91" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="updateCompleteForSMT" operationDesc="public void updateCompleteForSMT(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="MaterialPackingServiceImpl insertStockOutInfo" type="invokebean" description="public void insertStockOutInfo(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo)" bounds="74,2520,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertStockOutInfo" operationDesc="public void insertStockOutInfo(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="materialDoinfoList" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="receiveActNo" type="java.lang.String" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,2655,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 sendBySender" type="invokebean" description="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" bounds="74,2790,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="PDAShipRequestDetailStockOutForSMT" type="org.jdom.Document" />
                    <input variable="returnElement" type="org.jdom.Element" />
                    <input constant="PDASender" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="309,1900,103,56">
                <source idx="0" terminal="5,A" />
                <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="290,1986,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="PDAShipRequestDetailStockOutForSMT" type="org.jdom.Document" />
                    <input variable="returnElement" type="org.jdom.Element" />
                    <input constant="PDASender" type="java.lang.String" />
                </invoke>
            </otherwise>
        </switch>
    </sequence>
</process>

