<?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="MultiChangeERPInfo.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="ChangeERPInfo" messageType="org.jdom.Document"></variable>
        <variable name="ChargeList" messageType="java.util.List" expression="getXmlDataList('ChangeERPInfo', '//Message/Body/MaterialPackingList/CHARGE')" />
        <variable name="erpEventTime" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/RECEIVETIME')" />
        <variable name="ERPFactory" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/ERPFACTORY')" />
        <variable name="erpLocation" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/ERPLOCATION')" />
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Header/EVENTUSER')" />
        <variable name="LongString" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/RECEIVEREQUESTDETAILNAME')" />
        <variable name="materialDoinfoList" messageType="java.util.List"></variable>
        <variable name="MATERIALPACKING" messageType="com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking"></variable>
        <variable name="MATERIALPACKINGNAME" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/MaterialPackingList/MaterialPackingKey/MATERIALPACKINGNAME')" />
        <variable name="materialPackingNameList" messageType="java.util.List" expression="getXmlDataList('ChangeERPInfo', '//Message/Body/MaterialPackingList/MATERIALPACKINGNAME')" />
        <variable name="materialSpec" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/MATERIALSPECNAME')" />
        <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('ChangeERPInfo', '//Message/Header/MESSAGENAME')" />
        <variable name="moveType" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/MOVETYPE')" />
        <variable name="newUnDoList" messageType="java.util.List"></variable>
        <variable name="OEMReturn" messageType="java.lang.String"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/SITENAME')" />
        <variable name="siteNameList" messageType="java.util.List" expression="getXmlDataList('ChangeERPInfo', '//Message/Body/BOXLIST/BOX/SITENAME')" />
        <variable name="toERPFactory" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/TOERPFACTORY')" />
        <variable name="toERPLocation" messageType="java.lang.String" expression="getXmlData('ChangeERPInfo', '//Message/Body/LOCATIONNAME')" />
    </variables>
    <sequence>
        <receive name="MultiChangeERPInfo" bounds="183,30,149,62">
            <input variable="ChangeERPInfo" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="178,122,158,106" 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="187,258,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="CommonValidation GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="187,393,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="176,528,162,103" 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="178,661,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl MultierpLocationChange_WMS19ForERPAccount" type="invokebean" description="public static java.util.List MultierpLocationChange_WMS19ForERPAccount(java.lang.String moveType, java.lang.String materialSpecName, java.lang.String erpFactoryName, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String requestDetailName, java.lang.String toERPLocation, java.lang.String messageid, java.lang.String toERPfactory)" bounds="187,797,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="MultierpLocationChange_WMS19ForERPAccount" operationDesc="public static java.util.List MultierpLocationChange_WMS19ForERPAccount(java.lang.String moveType, java.lang.String materialSpecName, java.lang.String erpFactoryName, java.lang.String erpLocation, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String requestDetailName, java.lang.String toERPLocation, java.lang.String messageid, java.lang.String toERPfactory)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="moveType" type="java.lang.String" />
            <input variable="materialSpec" type="java.lang.String" />
            <input variable="ERPFactory" 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="LongString" type="java.lang.String" />
            <input variable="toERPLocation" type="java.lang.String" />
            <input variable="messageID" type="java.lang.String" />
            <input variable="toERPFactory" type="java.lang.String" />
            <output variable="materialDoinfoList" />
        </invoke>
        <switch name="switch" bounds="241,932,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="202,1011,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getListSize('materialDoinfoList') &gt; 0" bounds="114,1090,60,46">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="63,1166,162,103" 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="65,1299,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl MultiChangeERPLocation" type="invokebean" description="public void MultiChangeERPLocation(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.util.List ChargeList, java.lang.String requestDetailName, java.lang.String erpReceiveLocation, java.lang.String erpEventTime, java.lang.String eventUser, java.lang.String eventComment, java.lang.String toERPFactory)" bounds="74,1435,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="MultiChangeERPLocation" operationDesc="public void MultiChangeERPLocation(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.util.List ChargeList, java.lang.String requestDetailName, java.lang.String erpReceiveLocation, java.lang.String erpEventTime, java.lang.String eventUser, java.lang.String eventComment, java.lang.String toERPFactory)" 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="materialPackingNameList" type="java.util.List" />
                    <input variable="ChargeList" type="java.util.List" />
                    <input variable="LongString" type="java.lang.String" />
                    <input variable="toERPLocation" 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="toERPFactory" 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)" bounds="74,1570,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="insertStockOutInfo" operationDesc="public void insertStockOutInfo(java.util.List materialUnDoinfoList, com.cim.idm.framework.data.EventInfo eventInfo)" 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" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="63,1705,162,103" 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,1838,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="ChangeERPInfo" type="org.jdom.Document" />
                    <input variable="returnElement" type="org.jdom.Element" />
                    <input constant="OICSender" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="326,1090,90,59">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="290,1179,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <terminate name="terminate" bounds="301,1312,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

