<?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="PONormalStockIn.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="MailUtil" partnerLinkType="bean:MailUtil" />
    </partnerLinks>
    <variables>
        <variable name="10001" messageType="java.lang.String"></variable>
        <variable name="300" messageType="int"></variable>
        <variable name="E" messageType="java.lang.String"></variable>
        <variable name="ERP����?ʱ" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/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="GetInspectedList" messageType="java.lang.String"></variable>
        <variable name="materialPackingNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALPACKING/MATERIALPACKINGNAME')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageid" messageType="java.lang.String"></variable>
        <variable name="messageName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/MESSAGENAME')" />
        <variable name="NormalStockIn" messageType="org.jdom.Document"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="oplist" messageType="java.util.List"></variable>
        <variable name="oqaFlag" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALPACKING/OQAFLAG')" />
        <variable name="PDANormalStockIn" messageType="org.jdom.Document"></variable>
        <variable name="PDASender" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/RECEIVEACTNO')" />
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/DATALIST/MATERIALSHIPREQUESTDETAILFORSI/SITENAME')" />
        <variable name="siteNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MATERIALPACKING/SITENAME')" />
        <variable name="toerplist" messageType="java.util.List"></variable>
        <variable name="tqmslist" messageType="java.util.List"></variable>
        <variable name="undolist" messageType="java.util.List"></variable>
        <variable name="undoListSize" messageType="int"></variable>
    </variables>
    <sequence>
        <receive name="PONormalStockIn" bounds="172,30,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <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="172,135,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="PDANormalStockIn" type="java.lang.String" />
            <input variable="eventUser" type="java.lang.String" />
            <input variable="eventComment" type="java.lang.String" />
            <input constant="101" type="java.lang.String" />
            <input constant="0001" type="java.lang.String" />
            <output variable="eventInfo" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl checkReceiveactState" type="invokebean" description="public void checkReceiveactState(java.lang.String receiveActNo)" bounds="172,270,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="checkReceiveactState" operationDesc="public void checkReceiveactState(java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="receiveActNo" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="172,405,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="CommonValidation GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="172,540,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="172,675,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="172,810,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="MaterialPackingStockInImpl GetNormalStockInList" type="invokebean" description="public java.util.List GetNormalStockInList(org.jdom.Document document)" bounds="172,945,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetNormalStockInList" operationDesc="public java.util.List GetNormalStockInList(org.jdom.Document document)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="message" type="org.jdom.Document" />
            <output variable="oplist" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl GetToERPList" type="invokebean" description="public java.util.List GetToERPList(java.util.List msilist, int num)" bounds="172,1080,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetToERPList" operationDesc="public java.util.List GetToERPList(java.util.List msilist, int num)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="oplist" type="java.util.List" />
            <input constant="300" type="int" />
            <output variable="toerplist" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl generateNormalStockInMessageForERPAccount" type="invokebean" description="public java.util.List generateNormalStockInMessageForERPAccount(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="172,1215,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="generateNormalStockInMessageForERPAccount" operationDesc="public java.util.List generateNormalStockInMessageForERPAccount(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="toerplist" type="java.util.List" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="messageid" type="java.lang.String" />
            <output variable="undolist" />
        </invoke>
        <invoke name="TransactionUtil print" type="invokebean" description="public int print(java.util.List undolist)" bounds="482,1253,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="print" operationDesc="public int print(java.util.List undolist)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="8,2" />
            <input variable="undolist" type="java.util.List" />
            <output variable="undoListSize" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="172,1350,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,D" />
        </invoke>
        <switch name="switch" bounds="226,1485,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="187,1564,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('undoListSize') &gt; 0" bounds="110,1643,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="70,1692,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="MaterialPackingStockInImpl SaveNormalStockInInfoForERPAccount" type="invokebean" description="public java.util.List SaveNormalStockInInfoForERPAccount(java.util.List toerplist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" bounds="70,1827,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveNormalStockInInfoForERPAccount" operationDesc="public java.util.List SaveNormalStockInInfoForERPAccount(java.util.List toerplist, java.util.List undolist, com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="toerplist" type="java.util.List" />
                    <input variable="undolist" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="messageid" type="java.lang.String" />
                    <output variable="tqmslist" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl updataPallet" type="invokebean" description="public void updataPallet(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String receiveActNo)" bounds="70,1962,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="updataPallet" operationDesc="public void updataPallet(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, 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="receiveActNo" type="java.lang.String" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="70,2097,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 sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" bounds="70,2232,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(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="message" type="org.jdom.Document" />
                    <input variable="returnElement" type="org.jdom.Element" />
                    <input constant="PDASender" type="java.lang.String" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl sendToTQMS" type="invokebean" description="public void sendToTQMS(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" bounds="70,2367,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="sendToTQMS" operationDesc="public void sendToTQMS(java.util.List toerplist, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageid)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="tqmslist" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="messageid" type="java.lang.String" />
                </invoke>
                <invoke name="MailUtil sendPreOQAMail" type="invokebean" description="public void sendPreOQAMail(java.lang.String siteName, java.util.List undolist)" bounds="70,2502,141,105" partnerLink="MailUtil" partnerLinkType="MailUtil" operation="sendPreOQAMail" operationDesc="public void sendPreOQAMail(java.lang.String siteName, java.util.List undolist)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="undolist" type="java.util.List" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="301,1643,88,19">
                <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, java.lang.String resultCode, java.lang.String resultMessage)" bounds="275,1692,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String resultCode, java.lang.String resultMessage)" 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="PDASender" type="java.lang.String" />
                    <input constant="E" type="java.lang.String" />
                    <input constant="ERP过账失败" type="java.lang.String" />
                </invoke>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="328,2627,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <switch name="switch" bounds="367,2706,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="328,2785,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('siteName') = 'B17'" bounds="212,2864,60,59">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="172,2953,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="MaterialPackingStockInImpl StockInPCBATrayforB17" type="invokebean" description="public void StockInPCBATrayforB17(java.util.List toerplist, java.lang.String siteName)" bounds="172,3088,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="StockInPCBATrayforB17" operationDesc="public void StockInPCBATrayforB17(java.util.List toerplist, java.lang.String siteName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="toerplist" type="java.util.List" />
                    <input variable="siteName" type="java.lang.String" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="172,3223,141,105" 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="480,2864,88,53">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="328,3348,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <terminate name="terminate" bounds="313,3427,141,65">
            <source idx="0" terminal="5,A" />
        </terminate>
    </sequence>
</process>

