<?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="MakeMaterialScrapped.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="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="ERPEventTime" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVETIME')" />
        <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="index" messageType="int"></variable>
        <variable name="MakeMaterialScraped" messageType="java.lang.String"></variable>
        <variable name="makeScrappedInfo" messageType="com.cim.idm.wmspackage.materialpacking.management.info.MaterialPackingMakeScrappedInfo"></variable>
        <variable name="materialPackingKeyList" messageType="java.util.List"></variable>
        <variable name="materialPackingList" messageType="java.util.List"></variable>
        <variable name="materialSpecNameList" messageType="java.util.List"></variable>
        <variable name="materialUnDoInfoList" messageType="java.util.List"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageID" messageType="java.lang.String"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <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="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEACTNO')" />
        <variable name="receiveRequestName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPLOCATION')" />
        <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="siteList" messageType="java.util.List"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/SITENAME')" />
        <variable name="siteNameList" messageType="java.util.List"></variable>
    </variables>
    <sequence>
        <receive name="MakeMaterialScraped" bounds="169,30,149,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="173,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="173,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="173,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="173,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="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="173,662,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="MakeMaterialScraped" 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 getScrapBoxFromReceiveactNo" type="invokebean" description="public java.util.List getScrapBoxFromReceiveactNo(java.lang.String receiveactno, java.lang.String siteName)" bounds="173,797,141,105" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="getScrapBoxFromReceiveactNo" operationDesc="public java.util.List getScrapBoxFromReceiveactNo(java.lang.String receiveactno, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="materialPackingList" />
        </invoke>
        <invoke name="MaterialPackingServiceImpl makeScrappedByReceiveactNo" type="invokebean" description="public java.util.List makeScrappedByReceiveactNo(java.lang.String siteName, java.util.List materialPackingList, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String receiveRequestName)" bounds="173,932,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="makeScrappedByReceiveactNo" operationDesc="public java.util.List makeScrappedByReceiveactNo(java.lang.String siteName, java.util.List materialPackingList, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo, java.lang.String receiveRequestName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="materialPackingList" type="java.util.List" />
            <input variable="ERPEventTime" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="receiveRequestName" type="java.lang.String" />
            <output variable="materialPackingKeyList" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl erpInterface_WMS19ForERPAccount" type="invokebean" description="public static java.util.List erpInterface_WMS19ForERPAccount(java.lang.String shipType, java.lang.String siteName, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo)" bounds="173,1067,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_WMS19ForERPAccount" operationDesc="public static java.util.List erpInterface_WMS19ForERPAccount(java.lang.String shipType, java.lang.String siteName, 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 constant="551" type="java.lang.String" />
            <input variable="siteName" 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="materialUnDoInfoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="173,1202,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="227,1337,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="188,1416,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('materialUnDoInfoList') &gt; 0" bounds="118,1495,52,55">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1580,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl insertScrappedInfo" type="invokebean" description="public void insertScrappedInfo(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveActNo)" bounds="74,1715,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertScrappedInfo" operationDesc="public void insertScrappedInfo(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="materialUnDoInfoList" type="java.util.List" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <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="309,1797,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="74,1850,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
                    <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="74,1985,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="305,1495,77,48">
                <source idx="0" terminal="5,A" />
                <terminate name="terminate" bounds="273,1573,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

