<?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="GetERPReserve.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="ERPInterfaceServiceUtil" partnerLinkType="bean:ERPInterfaceServiceUtil" />
        <partnerLink name="CommonValidation" partnerLinkType="bean:CommonValidation" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="applicant" messageType="java.lang.String"></variable>
        <variable name="charge" messageType="java.lang.String"></variable>
        <variable name="city" messageType="java.lang.String"></variable>
        <variable name="Created" messageType="java.lang.String"></variable>
        <variable name="description2" messageType="java.lang.String"></variable>
        <variable name="E" messageType="java.lang.String"></variable>
        <variable name="ERP" messageType="java.lang.String"></variable>
        <variable name="erpFactory" messageType="java.lang.String"></variable>
        <variable name="erpFactoryName" messageType="java.lang.String"></variable>
        <variable name="ERPLOCATION" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Body/ERPLOCATION')" />
        <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" expression="getXmlData('GetERPReserve', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Header/EVENTUSER')" />
        <variable name="fax" messageType="java.lang.String"></variable>
        <variable name="flag" messageType="java.lang.String"></variable>
        <variable name="forceCompletedFlag" messageType="java.lang.String"></variable>
        <variable name="freeFlag" messageType="java.lang.String"></variable>
        <variable name="GetERPReserve" messageType="org.jdom.Document"></variable>
        <variable name="holdState" messageType="java.lang.String"></variable>
        <variable name="innerFlag" messageType="java.lang.String"></variable>
        <variable name="INT_WMS09" messageType="java.lang.String"></variable>
        <variable name="iqcFlag" messageType="java.lang.String"></variable>
        <variable name="itemElement" messageType="org.jdom.Element"></variable>
        <variable name="itemList" messageType="java.util.List"></variable>
        <variable name="Items more than 15000" messageType="java.lang.String"></variable>
        <variable name="materialSpecName" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageName" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Header/MESSAGENAME')" />
        <variable name="nationalNo" messageType="java.lang.String"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="planDate" messageType="java.lang.String"></variable>
        <variable name="pocategory" messageType="java.lang.String"></variable>
        <variable name="postCode" messageType="java.lang.String"></variable>
        <variable name="purchaseOrderGroup" messageType="java.lang.String"></variable>
        <variable name="receivedQuantity" messageType="java.lang.String">0</variable>
        <variable name="replaysubjectname" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="repReceiveLocation" messageType="java.lang.String"></variable>
        <variable name="requestQuantity" messageType="java.lang.String"></variable>
        <variable name="requestQuantity2" messageType="java.lang.String"></variable>
        <variable name="returnFlag" messageType="java.lang.String"></variable>
        <variable name="shipRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="ShipRequestDetailType" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Body/REASONCODETYPE')" />
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="shipRequestState" messageType="java.lang.String"></variable>
        <variable name="sitename" messageType="java.lang.String" expression="getXmlData('GetERPReserve', '//Message/Body/SITENAME')" />
        <variable name="subMaterialSpecName" messageType="java.lang.String"></variable>
        <variable name="supplierNo" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="GetERPReserve" bounds="70,30,149,62">
            <input variable="GetERPReserve" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="65,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="74,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 constant="GetERPReserve" 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>
        <invoke name="ERPInterfaceServiceImpl GetERPReserve" type="invokebean" description="public org.jdom.Document GetERPReserve(java.lang.String shipRequestName, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="74,393,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="GetERPReserve" operationDesc="public org.jdom.Document GetERPReserve(java.lang.String shipRequestName, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <output variable="message" />
        </invoke>
        <expression name="expression" type="expression" bounds="74,528,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('itemList', getElementList('message', '//item'))" />
        </expression>
        <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="74,623,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="INT_WMS10" 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="128,758,32,32" type="2" collection="itemList" element="itemElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="89,837,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="74,916,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('erpFactoryName',getXmlData('itemElement','//WERKS'))" />
                <function value="setVariable('shipRequestName',getXmlData('itemElement','//RSNUM'))" />
                <function value="setVariable('materialSpecName',getXmlData('itemElement','//MATNR'))" />
                <function value="setVariable('customerDeclare',getXmlData('itemElement','//SGTXT'))" />
                <function value="setVariable('erpLocation',getXmlData('itemElement','//LGORT'))" />
                <function value="setVariable('shipRequestDetailType',getXmlData('itemElement','//BWART'))" />
                <function value="setVariable('requestQuantity',getXmlData('itemElement','//BDMNG'))" />
                <function value="setVariable('shipRequestDetailName',getXmlData('itemElement','//RSPOS'))" />
                <function value="setVariable('erpReceiveLocation',getXmlData('itemElement','//UMLGO'))" />
            </expression>
            <invoke name="ERPInterfaceServiceUtil INT_GetBMDTOEMReserveInfo" type="invokebean" description="public void INT_GetBMDTOEMReserveInfo(java.lang.String flag, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String shipRequestName, java.lang.String erpFactoryName, java.lang.String shipRequestDetailName, java.lang.String shipRequestState, java.lang.String shipRequestDetailType, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpReceiveLocation, java.lang.String siteName, java.lang.String oemErpFactoryName)" bounds="74,1011,141,105" partnerLink="ERPInterfaceServiceUtil" partnerLinkType="ERPInterfaceServiceUtil" operation="INT_GetBMDTOEMReserveInfo" operationDesc="public void INT_GetBMDTOEMReserveInfo(java.lang.String flag, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String shipRequestName, java.lang.String erpFactoryName, java.lang.String shipRequestDetailName, java.lang.String shipRequestState, java.lang.String shipRequestDetailType, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpReceiveLocation, java.lang.String siteName, java.lang.String oemErpFactoryName)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input constant="1" type="java.lang.String" />
                <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                <input variable="shipRequestName" type="java.lang.String" />
                <input variable="ERPFACTORYNAME" type="java.lang.String" />
                <input variable="shipRequestDetailName" type="java.lang.String" />
                <input constant="Created" type="java.lang.String" />
                <input variable="ShipRequestDetailType" type="java.lang.String" />
                <input variable="materialSpecName" type="java.lang.String" />
                <input variable="requestQuantity" type="java.lang.String" />
                <input variable="ERPLOCATION" type="java.lang.String" />
                <input variable="erpReceiveLocation" type="java.lang.String" />
                <input variable="sitename" type="java.lang.String" />
                <input variable="erpFactoryName" type="java.lang.String" />
            </invoke>
            <invoke name="CommonValidation RefreshEventTimeKey" type="invokebean" description="public void RefreshEventTimeKey(com.cim.idm.framework.data.EventInfo eventInfo)" bounds="74,1146,141,105" partnerLink="CommonValidation" partnerLinkType="CommonValidation" operation="RefreshEventTimeKey" operationDesc="public void RefreshEventTimeKey(com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            </invoke>
            <whileend name="whileend" type="whileend" bounds="89,1271,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="63,1350,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="74,1483,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="GetERPReserve" type="org.jdom.Document" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

