<?xml version="1.0" encoding="euc-kr"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="GetERPPOInfo.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="ERPInterfaceServiceUtil" partnerLinkType="bean:ERPInterfaceServiceUtil" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="1" messageType="java.lang.String"></variable>
        <variable name="Created" messageType="java.lang.String"></variable>
        <variable name="description2" messageType="java.lang.String"></variable>
        <variable name="ERP" messageType="java.lang.String"></variable>
        <variable name="erpFactoryName" messageType="java.lang.String"></variable>
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="GetERPPOInfo" messageType="org.jdom.Document"></variable>
        <variable name="invoiceList" messageType="java.util.List"></variable>
        <variable name="itemElement" messageType="org.jdom.Element"></variable>
        <variable name="itemList" messageType="java.util.List"></variable>
        <variable name="jsStr" messageType="java.lang.String" expression="getXmlData('GetERPPOInfo', '//Message/Body/JSONSTR')" />
        <variable name="materialSpecName" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="receiveRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="receiveRequestName" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('GetERPPOInfo', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="requestQuantity" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('GetERPPOInfo', '//Message/Body/MaterialReceiveRequestDetail/SITENAME')" />
        <variable name="supplierNo" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="GetERPPOInfo" bounds="70,30,149,62">
            <input variable="GetERPPOInfo" 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="GetERPPOInfo" 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="CommonValidation getReceiveRequestListByJson" type="invokebean" description="public java.util.List getReceiveRequestListByJson(java.lang.String jsStr)" bounds="65,393,158,106" partnerLink="CommonValidation" partnerLinkType="CommonValidation" operation="getReceiveRequestListByJson" operationDesc="public java.util.List getReceiveRequestListByJson(java.lang.String jsStr)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="jsStr" type="java.lang.String" />
            <output variable="invoiceList" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl GetOEMERPInfo" type="invokebean" description="public org.jdom.Document GetOEMERPInfo(java.util.List detailList, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="74,529,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="GetOEMERPInfo" operationDesc="public org.jdom.Document GetOEMERPInfo(java.util.List detailList, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="invoiceList" type="java.util.List" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <output variable="message" />
        </invoke>
        <expression name="expression" type="expression" bounds="74,664,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('itemList', getElementList('message', '//item'))" />
        </expression>
        <while name="while" bounds="128,759,32,32" type="2" collection="itemList" element="itemElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="89,838,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="74,917,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('receiveRequestName',getXmlData('itemElement','//EBELN'))" />
                <function value="setVariable('supplierNo',getXmlData('itemElement','//LIFNR'))" />
                <function value="setVariable('description',getXmlData('itemElement','//NAME1'))" />
                <function value="setVariable('receiveRequestDetailName',getXmlData('itemElement','//EBELP'))" />
                <function value="setVariable('materialSpecName',getXmlData('itemElement','//MATNR'))" />
                <function value="setVariable('description2',getXmlData('itemElement','//TXZ01'))" />
                <function value="setVariable('requestQuantity',getXmlData('itemElement','//MENGE'))" />
                <function value="setVariable('erpFactoryName',getXmlData('itemElement','//WERKS'))" />
                <function value="setVariable('erpFactory',getXmlData('itemElement','//BUKRS'))" />
            </expression>
            <invoke name="ERPInterfaceServiceUtil INT_GetOEMPOInfo" type="invokebean" description="public void INT_GetOEMPOInfo(java.lang.String flag, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveRequestName, java.lang.String erpFactoryName, java.lang.String receiveRequestDetailName, java.lang.String receiveRequestState, java.lang.String materialSpecName, java.lang.String description2, java.lang.String requestQuantity, java.lang.String supplierNo, java.util.List detailList)" bounds="74,1012,141,105" partnerLink="ERPInterfaceServiceUtil" partnerLinkType="ERPInterfaceServiceUtil" operation="INT_GetOEMPOInfo" operationDesc="public void INT_GetOEMPOInfo(java.lang.String flag, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String receiveRequestName, java.lang.String erpFactoryName, java.lang.String receiveRequestDetailName, java.lang.String receiveRequestState, java.lang.String materialSpecName, java.lang.String description2, java.lang.String requestQuantity, java.lang.String supplierNo, java.util.List detailList)" 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="receiveRequestName" type="java.lang.String" />
                <input variable="erpFactoryName" type="java.lang.String" />
                <input variable="receiveRequestDetailName" type="java.lang.String" />
                <input constant="Created" type="java.lang.String" />
                <input variable="materialSpecName" type="java.lang.String" />
                <input variable="description2" type="java.lang.String" />
                <input variable="requestQuantity" type="java.lang.String" />
                <input variable="supplierNo" type="java.lang.String" />
                <input variable="invoiceList" type="java.util.List" />
            </invoke>
            <invoke name="CommonValidation RefreshEventTimeKey" type="invokebean" description="public void RefreshEventTimeKey(com.cim.idm.framework.data.EventInfo eventInfo)" bounds="74,1147,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,1272,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="63,1351,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,1484,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="GetERPPOInfo" type="org.jdom.Document" />
            <input constant="PDASender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

