<?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="MakeMaterialPreScrapped.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="MaterialReceiveRequestServiceImpl" partnerLinkType="bean:MaterialReceiveRequestServiceImpl" />
        <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="chargeList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MaterialPackingList/MaterialPackingKey/CHARGE')" />
        <variable name="erpEventTime" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVETIME')" />
        <variable name="erpLocation" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPLOCATION')" />
        <variable name="erpLocationList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MaterialPackingList/MaterialPackingKey/ERPLOCATION')" />
        <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="factory" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/ERPFACTORY')" />
        <variable name="index" messageType="int"></variable>
        <variable name="materialPackingKey" messageType="com.cim.idm.wmspackage.materialpacking.management.data.MaterialPackingKey"></variable>
        <variable name="materialPackingKeyList" messageType="java.util.List"></variable>
        <variable name="materialPackingNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MaterialPackingList/MaterialPackingKey/MATERIALPACKINGNAME')" />
        <variable name="materialSpecNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MaterialPackingList/MaterialPackingKey/MATERIALSPECNAME')" />
        <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="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="Scrap" messageType="java.lang.String"></variable>
        <variable name="Scrapped" messageType="java.lang.String"></variable>
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/MaterialPackingList/MaterialPackingKey/SITENAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/SITENAME')" />
        <variable name="unDoDetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UnDoDetailInfo/UNDODETAILNAME')" />
        <variable name="unDoMaterialChargeList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UnDoDetailInfo/CHARGE')" />
        <variable name="unDoMaterialErpLocationList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UnDoDetailInfo/ERPLOCATION')" />
        <variable name="unDoMaterialQuantityList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UnDoDetailInfo/MATERIALQUANTITY')" />
        <variable name="unDoMaterialSpecNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UnDoDetailInfo/MATERIALSPECNAME')" />
        <variable name="valueERPFactory" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/UnDoDetailInfo/ERPFACTORY')" />
    </variables>
    <sequence>
        <receive name="MakeMaterialPreScraped" bounds="171,30,149,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="175,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="175,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="175,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="175,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="175,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="MakeMaterialPreScraped" 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="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="175,797,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 constant="Scrapped" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input constant="Scrap" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialPackingServiceImpl makePreScrapped" type="invokebean" description="public void makePreScrapped(java.util.List siteNameList, java.util.List materialPackingNameList, java.util.List materialSpecNameList, java.util.List unDoDetailNameList, java.util.List unDoMaterialSpecNameList, java.lang.String factory, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String shipRequestName, java.util.List erpLocationList, java.util.List undoDetalErpLocationList, java.lang.String receiveActNo, java.util.List undoDetalChargeList, java.util.List chargeList, java.lang.String valueERPFactory)" bounds="175,932,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="makePreScrapped" operationDesc="public void makePreScrapped(java.util.List siteNameList, java.util.List materialPackingNameList, java.util.List materialSpecNameList, java.util.List unDoDetailNameList, java.util.List unDoMaterialSpecNameList, java.lang.String factory, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String shipRequestName, java.util.List erpLocationList, java.util.List undoDetalErpLocationList, java.lang.String receiveActNo, java.util.List undoDetalChargeList, java.util.List chargeList, java.lang.String valueERPFactory)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteList" type="java.util.List" />
            <input variable="materialPackingNameList" type="java.util.List" />
            <input variable="materialSpecNameList" type="java.util.List" />
            <input variable="unDoDetailNameList" type="java.util.List" />
            <input variable="unDoMaterialSpecNameList" type="java.util.List" />
            <input variable="factory" type="java.lang.String" />
            <input variable="erpLocation" type="java.lang.String" />
            <input variable="erpEventTime" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="erpLocationList" type="java.util.List" />
            <input variable="unDoMaterialErpLocationList" type="java.util.List" />
            <input variable="receiveActNo" type="java.lang.String" />
            <input variable="unDoMaterialChargeList" type="java.util.List" />
            <input variable="chargeList" type="java.util.List" />
            <input variable="valueERPFactory" type="java.lang.String" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl erpInterface_WMS19ForPreScrappedForERPAccount" type="invokebean" description="public static java.util.List erpInterface_WMS19ForPreScrappedForERPAccount(java.lang.String shipType, java.util.List unDoDetailNameList, java.util.List unDoMaterialSpecNameList, java.util.List materialQuantityList, java.util.List materialChargeList, java.lang.String erpFactoryName, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.util.List undoDetalErpLocationList, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String valueERPFactory, com.cim.idm.framework.data.EventInfo eventinfo)" bounds="175,1202,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_WMS19ForPreScrappedForERPAccount" operationDesc="public static java.util.List erpInterface_WMS19ForPreScrappedForERPAccount(java.lang.String shipType, java.util.List unDoDetailNameList, java.util.List unDoMaterialSpecNameList, java.util.List materialQuantityList, java.util.List materialChargeList, java.lang.String erpFactoryName, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.util.List undoDetalErpLocationList, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String valueERPFactory, com.cim.idm.framework.data.EventInfo eventinfo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input constant="511" type="java.lang.String" />
            <input variable="unDoDetailNameList" />
            <input variable="unDoMaterialSpecNameList" />
            <input variable="unDoMaterialQuantityList" />
            <input variable="unDoMaterialChargeList" />
            <input variable="factory" />
            <input variable="erpLocation" />
            <input variable="erpEventTime" />
            <input variable="eventInfo" />
            <input variable="unDoMaterialErpLocationList" />
            <input variable="messageID" />
            <input variable="receiveActNo" />
            <input variable="valueERPFactory" />
            <input variable="eventInfo" />
            <input variable="siteName" />
            <output variable="materialUnDoInfoList" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="175,1337,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="229,1472,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="190,1551,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('materialUnDoInfoList') &gt; 0" bounds="115,1630,59,53">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1713,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,1848,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="293,1901,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,1983,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,2118,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,1630,85,59">
                <source idx="0" terminal="5,A" />
                <terminate name="terminate" bounds="277,1719,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

