<?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="QM013.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="address" messageType="java.lang.String"></variable>
        <variable name="address1" messageType="java.lang.String"></variable>
        <variable name="address2" messageType="java.lang.String"></variable>
        <variable name="address3" messageType="java.lang.String"></variable>
        <variable name="charge" messageType="java.lang.String"></variable>
        <variable name="Created" messageType="java.lang.String"></variable>
        <variable name="customerName" messageType="java.lang.String"></variable>
        <variable name="customerNo" messageType="java.lang.String"></variable>
        <variable name="customsDeclare" messageType="java.lang.String"></variable>
        <variable name="Delivery" messageType="java.lang.String"></variable>
        <variable name="destination" messageType="java.lang.String"></variable>
        <variable name="E" messageType="java.lang.String"></variable>
        <variable name="EBELN" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/EBELN')" />
        <variable name="erpFactory" messageType="java.lang.String"></variable>
        <variable name="erpLocation" messageType="java.lang.String"></variable>
        <variable name="erpMessageItemListSize" messageType="int"></variable>
        <variable name="erpReceiveFactory" messageType="java.lang.String"></variable>
        <variable name="erpReceiveLocation" messageType="java.lang.String"></variable>
        <variable name="ERPSender" messageType="java.lang.String"></variable>
        <variable name="error" messageType="java.lang.Exception"></variable>
        <variable name="eventComment" messageType="java.lang.String"></variable>
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventName" messageType="java.lang.String"></variable>
        <variable name="eventUser" messageType="java.lang.String"></variable>
        <variable name="exportNo" messageType="java.lang.String"></variable>
        <variable name="flag" messageType="java.lang.String"></variable>
        <variable name="itemElement" messageType="org.jdom.Element"></variable>
        <variable name="itemList" messageType="java.util.List"></variable>
        <variable name="LGORT" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/LGORT')" />
        <variable name="materialSpecName" messageType="java.lang.String"></variable>
        <variable name="MATNR" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/MATNR')" />
        <variable name="MEINS" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/MEINS')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="replaysubjectname" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="requestQuantity" messageType="java.lang.String"></variable>
        <variable name="saleReason" messageType="java.lang.String"></variable>
        <variable name="saleReasonDescription" messageType="java.lang.String"></variable>
        <variable name="SEQ" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/SEQ')" />
        <variable name="shipPlanDate" messageType="java.lang.String"></variable>
        <variable name="shipRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="shipRequestDetailType" messageType="java.lang.String"></variable>
        <variable name="shipRequestName" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String"></variable>
        <variable name="The material is not on the line plan!" messageType="java.lang.String"></variable>
        <variable name="VBELN" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/VBELN')" />
        <variable name="WERKS" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/WERKS')" />
        <variable name="WMS_INSMK" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/items/item/WMS_INSMK')" />
        <variable name="workOrderId" messageType="java.lang.String"></variable>
        <variable name="ZF_BOXID" messageType="java.lang.String"></variable>
        <variable name="ZF_BOXIDNUM" messageType="java.lang.String"></variable>
        <variable name="ZF_NEWBOXID" messageType="java.lang.String"></variable>
    </variables>
    <faultHandlers name="faultHandlers" bounds="630,-13,262,564">
        <catchAll name="catchAll" type="catchAll" bounds="21,35,213,498">
            <invoke name="TransactionUtil rollbackTransaction" type="invokebean" description="public void rollbackTransaction()" bounds="36,3,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="rollbackTransaction" operationDesc="public void rollbackTransaction()" ignoreThrow="false" fork="false" />
            <invoke name="ESBService sendErrorBySender" type="invokebean" description="public void sendErrorBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String lanuage, java.lang.Exception e, java.lang.String senderName)" bounds="41,134,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendErrorBySender" operationDesc="public void sendErrorBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String lanuage, java.lang.Exception e, 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="" type="java.lang.String" />
                <input variable="error" type="java.lang.Exception" />
                <input constant="ERPSender" type="java.lang.String" />
            </invoke>
            <invoke name="ESBService makeErrorMessageLog" type="invokebean" description="public java.lang.String makeErrorMessageLog(org.jdom.Document doc, java.lang.Exception e, java.lang.String language)" bounds="41,265,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="makeErrorMessageLog" operationDesc="public java.lang.String makeErrorMessageLog(org.jdom.Document doc, java.lang.Exception e, java.lang.String language)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input variable="message" type="org.jdom.Document" />
                <input variable="error" type="java.lang.Exception" />
                <input constant="" type="java.lang.String" />
            </invoke>
            <terminate name="terminate" bounds="48,388,141,65">
                <source idx="0" terminal="5,A" />
            </terminate>
        </catchAll>
    </faultHandlers>
    <sequence>
        <receive name="14330" bounds="70,30,156,81">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <expression name="expression" type="expression" bounds="78,141,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('itemList', getElementList('message', '//Body/items/item/boxs'))" />
        </expression>
        <expression name="expression" type="expression" bounds="78,236,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('erpMessageItemListSize', getListSize('itemList'))" />
        </expression>
        <switch name="switch" bounds="132,331,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="93,410,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('erpMessageItemListSize') &lt; 1501" bounds="118,489,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="69,538,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="78,674,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="QM013" type="java.lang.String" />
                    <input constant="ERP" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <output variable="eventInfo" />
                </invoke>
                <while name="while" bounds="132,809,32,32" type="2" collection="itemList" element="itemElement">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="93,888,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="78,967,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('ZF_NEWBOXID',getXmlData('itemElement','//ZF_NEWBOXID'))" />
                        <function value="setVariable('ZF_BOXIDNUM',getXmlData('itemElement','//ZF_BOXIDNUM'))" />
                        <function value="setVariable('ZF_BOXID',getXmlData('itemElement','//ZF_BOXID'))" />
                    </expression>
                    <invoke name="ERPInterfaceServiceImpl QM013" type="invokebean" description="public void QM013(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String WMS_INSMK, java.lang.String SEQ, java.lang.String MATNR, java.lang.String MEINS, java.lang.String LGORT, java.lang.String WERKS, java.lang.String ZF_BOXID, java.lang.String ZF_BOXIDNUM, java.lang.String ZF_NEWBOXID)" bounds="78,1062,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="QM013" operationDesc="public void QM013(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String WMS_INSMK, java.lang.String SEQ, java.lang.String MATNR, java.lang.String MEINS, java.lang.String LGORT, java.lang.String WERKS, java.lang.String ZF_BOXID, java.lang.String ZF_BOXIDNUM, java.lang.String ZF_NEWBOXID)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                        <input variable="WMS_INSMK" type="java.lang.String" />
                        <input variable="SEQ" type="java.lang.String" />
                        <input variable="MATNR" type="java.lang.String" />
                        <input variable="MEINS" type="java.lang.String" />
                        <input variable="LGORT" type="java.lang.String" />
                        <input variable="WERKS" type="java.lang.String" />
                        <input variable="ZF_BOXID" type="java.lang.String" />
                        <input variable="ZF_BOXIDNUM" type="java.lang.String" />
                        <input variable="ZF_NEWBOXID" type="java.lang.String" />
                        <fault faultName="catchAll" variable="" />
                    </invoke>
                    <whileend name="whileend" type="whileend" bounds="93,1187,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="67,1266,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 sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="78,1399,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="ERPSender" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="319,489,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="293,538,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="replaysubjectname" type="java.lang.String" />
                    <input variable="message" type="org.jdom.Document" />
                    <input constant="ERPSender" type="java.lang.String" />
                    <input constant="E" type="java.lang.String" />
                    <input constant="The material is not on the line plan!" type="java.lang.String" />
                </invoke>
            </otherwise>
        </switch>
    </sequence>
</process>

