<?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="ReturnFromRMAOEMExcel.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="ProductServiceImpl" partnerLinkType="bean:ProductServiceImpl" />
        <partnerLink name="PackingGroupServiceImpl" partnerLinkType="bean:PackingGroupServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="arrayRepair" messageType="java.lang.String"></variable>
        <variable name="assyGrade" messageType="java.lang.String"></variable>
        <variable name="boxElement" messageType="org.jdom.Element"></variable>
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="boxName" messageType="java.lang.String"></variable>
        <variable name="boxQty" messageType="java.lang.String"></variable>
        <variable name="cellGrade" messageType="java.lang.String"></variable>
        <variable name="cellRepair" messageType="java.lang.String"></variable>
        <variable name="checkInCode" messageType="java.lang.String"></variable>
        <variable name="csDefect" messageType="java.lang.String"></variable>
        <variable name="domesticExport" messageType="java.lang.String"></variable>
        <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="eventName" messageType="java.lang.String" expression="getXmlData('message','/Message/Header/MESSAGENAME')" />
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message','/Message/Header/EVENTUSER')" />
        <variable name="groupId" messageType="java.lang.String"></variable>
        <variable name="groupName" messageType="java.lang.String" expression="getXmlData('message', '/Message/Body/GROUPNAME')" />
        <variable name="lotGrade" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="moduleName" messageType="java.lang.String"></variable>
        <variable name="ngDefect" messageType="java.lang.String"></variable>
        <variable name="oemBoxInfo" messageType="com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking"></variable>
        <variable name="oemBoxList" messageType="java.util.List" expression="newInstance('java.util.ArrayList', 100)" />
        <variable name="oemPalletInfo" messageType="com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking"></variable>
        <variable name="oemPalletList" messageType="java.util.List" expression="newInstance('java.util.ArrayList', 20)" />
        <variable name="oemPanelInfo" messageType="com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProduct"></variable>
        <variable name="oemPanelList" messageType="java.util.List" expression="newInstance('java.util.ArrayList', 1000)" />
        <variable name="orgSiteName" messageType="java.lang.String"></variable>
        <variable name="palletElement" messageType="org.jdom.Element"></variable>
        <variable name="palletList" messageType="java.util.List"></variable>
        <variable name="palletName" messageType="java.lang.String"></variable>
        <variable name="panelElement" messageType="org.jdom.Element"></variable>
        <variable name="panelList" messageType="java.util.List"></variable>
        <variable name="panelName" messageType="java.lang.String"></variable>
        <variable name="panelQty" messageType="java.lang.String"></variable>
        <variable name="processGroupName" messageType="java.lang.String"></variable>
        <variable name="productSpecName" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message','/Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="revisionCode" messageType="java.lang.String"></variable>
        <variable name="singlePanelQty" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="ReturnFromRMAOEMExcel" bounds="960,-95,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <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="911,1,228,102" 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="eventName" 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="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="964,135,140,102" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="1018,267,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="979,346,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('groupName')  = 'MODULE'" bounds="124,425,32,49">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="70,504,140,62">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('panelList',getElementList('message','//MODULE'))" />
                </expression>
                <while name="while" bounds="124,596,32,49" type="2" collection="panelList" element="panelElement">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="85,675,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="70,754,140,62">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('singlePanelQty',getXmlData('panelElement','//SINGLEPANELQTY'))" />
                        <function value="setVariable('productSpecName',getXmlData('panelElement','//PRODUCTSPECNAME'))" />
                        <function value="setVariable('moduleName',getXmlData('panelElement','//MODULENAME'))" />
                        <function value="setVariable('panelName', getXmlData('panelElement', '//LOTNAME'))" />
                        <function value="setVariable('checkInCode',getXmlData('panelElement','//CHECKINCODE'))" />
                        <function value="setVariable('revisionCode',getXmlData('panelElement','//REVISIONCODE'))" />
                        <function value="setVariable('siteName',getXmlData('panelElement','//SITENAME'))" />
                        <function value="setVariable('cellGrade',getXmlData('panelElement','//CELLGRADE'))" />
                        <function value="setVariable('boxName',getXmlData('panelElement','//PROCESSGROUPNAME'))" />
                        <function value="setVariable('lotGrade',getXmlData('panelElement','//LOTGRADE'))" />
                        <function value="setVariable('orgSiteName',getXmlData('panelElement','//RECEIVEDFROM'))" />
                        <function value="setVariable('groupId',getXmlData('panelElement','//GROUPID'))" />
                        <function value="setVariable('csDefect',getXmlData('panelElement','//CSDEFECT'))" />
                        <function value="setVariable('ngDefect',getXmlData('panelElement','//NGDEFECT'))" />
                    </expression>
                    <invoke name="ProductServiceImpl makeRMAOEM_PANELInfo" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProduct makeRMAOEM_PANELInfo(java.lang.String SiteName, java.lang.String panelName, java.lang.String singlePanelQty, java.lang.String boxName, java.lang.String lotGrade, java.lang.String productSpecName, java.lang.String orgSiteName, java.lang.String moduleName, java.lang.String checkInCode, java.lang.String revisionCode, java.lang.String cellGrade, java.lang.String groupName, java.lang.String csDefect, java.lang.String ngDefect, java.lang.String eventUser)" bounds="-175,846,631,102" partnerLink="ProductServiceImpl" partnerLinkType="ProductServiceImpl" operation="makeRMAOEM_PANELInfo" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProduct makeRMAOEM_PANELInfo(java.lang.String SiteName, java.lang.String panelName, java.lang.String singlePanelQty, java.lang.String boxName, java.lang.String lotGrade, java.lang.String productSpecName, java.lang.String orgSiteName, java.lang.String moduleName, java.lang.String checkInCode, java.lang.String revisionCode, java.lang.String cellGrade, java.lang.String groupName, java.lang.String csDefect, java.lang.String ngDefect, java.lang.String eventUser)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="siteName" type="java.lang.String" />
                        <input variable="panelName" type="java.lang.String" />
                        <input variable="singlePanelQty" type="java.lang.String" />
                        <input variable="boxName" type="java.lang.String" />
                        <input variable="lotGrade" type="java.lang.String" />
                        <input variable="productSpecName" type="java.lang.String" />
                        <input variable="orgSiteName" type="java.lang.String" />
                        <input variable="moduleName" type="java.lang.String" />
                        <input variable="checkInCode" type="java.lang.String" />
                        <input variable="revisionCode" type="java.lang.String" />
                        <input variable="cellGrade" type="java.lang.String" />
                        <input variable="groupId" type="java.lang.String" />
                        <input variable="csDefect" type="java.lang.String" />
                        <input variable="ngDefect" type="java.lang.String" />
                        <input variable="eventUser" type="java.lang.String" />
                        <output variable="oemPanelInfo" />
                    </invoke>
                    <expression name="expression" type="expression" bounds="70,978,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="addListValue('oemPanelList', getVariable('oemPanelInfo'))" />
                    </expression>
                    <whileend name="whileend" type="whileend" bounds="85,1063,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
                <invoke name="ProductServiceImpl saveRMAOEMPanels" type="invokebean" description="public void saveRMAOEMPanels(java.util.List oemPanelList)" bounds="70,1142,141,105" partnerLink="ProductServiceImpl" partnerLinkType="ProductServiceImpl" operation="saveRMAOEMPanels" operationDesc="public void saveRMAOEMPanels(java.util.List oemPanelList)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="oemPanelList" type="java.util.List" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('groupName')  = 'BOX'" bounds="727,425,32,49">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="673,504,140,62">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('boxList',getElementList('message','//PROCESSGROUP'))" />
                </expression>
                <while name="while" bounds="727,596,32,49" type="2" collection="boxList" element="boxElement">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="688,675,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="673,754,140,62">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('boxName',getXmlData('boxElement','//PROCESSGROUPNAME'))" />
                        <function value="setVariable('palletName',getXmlData('boxElement','//SUPERPROCESSGROUPNAME'))" />
                        <function value="setVariable('productSpecName',getXmlData('boxElement','//PRODUCTSPECNAME'))" />
                        <function value="setVariable('checkInCode',getXmlData('boxElement','//CHECKINCODE'))" />
                        <function value="setVariable('revisionCode',getXmlData('boxElement','//REVISIONCODE'))" />
                        <function value="setVariable('domesticExport',getXmlData('boxElement','//DOMESTICEXPORT'))" />
                        <function value="setVariable('singlePanelQty',getXmlData('boxElement','//PANELQTY'))" />
                        <function value="setVariable('siteName',getXmlData('boxElement','//SITENAME'))" />
                        <function value="setVariable('lotGrade',getXmlData('boxElement','//LOTGRADE'))" />
                        <function value="setVariable('orgSiteName',getXmlData('boxElement','//RECEIVEDFROM'))" />
                    </expression>
                    <invoke name="PackingGroupServiceImpl makeRMAOEM_BoxInfo" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking makeRMAOEM_BoxInfo(java.lang.String SiteName, java.lang.String boxName, java.lang.String palletName, java.lang.String productSpecName, java.lang.String lotGrade, java.lang.String singlePanelQty, java.lang.String orgSiteName, java.lang.String revisionCode, java.lang.String checkInCode, java.lang.String domesticExport, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="492,846,502,102" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="makeRMAOEM_BoxInfo" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking makeRMAOEM_BoxInfo(java.lang.String SiteName, java.lang.String boxName, java.lang.String palletName, java.lang.String productSpecName, java.lang.String lotGrade, java.lang.String singlePanelQty, java.lang.String orgSiteName, java.lang.String revisionCode, java.lang.String checkInCode, java.lang.String domesticExport, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="siteName" type="java.lang.String" />
                        <input variable="boxName" type="java.lang.String" />
                        <input variable="palletName" type="java.lang.String" />
                        <input variable="productSpecName" type="java.lang.String" />
                        <input variable="lotGrade" type="java.lang.String" />
                        <input variable="singlePanelQty" type="java.lang.String" />
                        <input variable="orgSiteName" type="java.lang.String" />
                        <input variable="revisionCode" type="java.lang.String" />
                        <input variable="checkInCode" type="java.lang.String" />
                        <input variable="domesticExport" type="java.lang.String" />
                        <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                        <output variable="oemBoxInfo" />
                    </invoke>
                    <expression name="expression" type="expression" bounds="673,978,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="addListValue('oemBoxList', getVariable('oemBoxInfo'))" />
                    </expression>
                    <whileend name="whileend" type="whileend" bounds="688,1063,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
                <invoke name="PackingGroupServiceImpl saveRMAOEMBoxs" type="invokebean" description="public void saveRMAOEMBoxs(java.util.List OEMBoxList)" bounds="673,1142,141,105" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="saveRMAOEMBoxs" operationDesc="public void saveRMAOEMBoxs(java.util.List OEMBoxList)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="oemBoxList" type="java.util.List" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('groupName')  = 'PALLET'" bounds="1309,425,32,49">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="1255,504,140,62">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('palletList',getElementList('message','//PROCESSGROUP'))" />
                </expression>
                <while name="while" bounds="1309,596,32,49" type="2" collection="palletList" element="palletElement">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="1270,675,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="1255,754,140,62">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('palletName',getXmlData('palletElement','//PROCESSGROUPNAME'))" />
                        <function value="setVariable('productSpecName',getXmlData('palletElement','//PRODUCTSPECNAME'))" />
                        <function value="setVariable('domesticExport',getXmlData('palletElement','//DOMESTICEXPORT'))" />
                        <function value="setVariable('checkInCode',getXmlData('palletElement','//CHECKINCODE'))" />
                        <function value="setVariable('revisionCode',getXmlData('palletElement','//REVISIONCODE'))" />
                        <function value="setVariable('boxQty',getXmlData('palletElement','//BOXQTY'))" />
                        <function value="setVariable('singlePanelQty',getXmlData('palletElement','//PANELQTY'))" />
                        <function value="setVariable('siteName',getXmlData('palletElement','//SITENAME'))" />
                        <function value="setVariable('lotGrade',getXmlData('palletElement','//LOTGRADE'))" />
                        <function value="setVariable('orgSiteName',getXmlData('palletElement','//RECEIVEDFROM'))" />
                    </expression>
                    <invoke name="PackingGroupServiceImpl makeRMAOEM_PalletInfo" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking makeRMAOEM_PalletInfo(java.lang.String SiteName, java.lang.String palletName, java.lang.String productSpecName, java.lang.String lotGrade, java.lang.String boxQty, java.lang.String singlePanelQty, java.lang.String orgSiteName, java.lang.String revisionCode, java.lang.String checkInCode, java.lang.String domesticExport)" bounds="1030,846,591,102" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="makeRMAOEM_PalletInfo" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BS_RMAProductPacking makeRMAOEM_PalletInfo(java.lang.String SiteName, java.lang.String palletName, java.lang.String productSpecName, java.lang.String lotGrade, java.lang.String boxQty, java.lang.String singlePanelQty, java.lang.String orgSiteName, java.lang.String revisionCode, java.lang.String checkInCode, java.lang.String domesticExport)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="siteName" />
                        <input variable="palletName" />
                        <input variable="productSpecName" />
                        <input variable="lotGrade" />
                        <input variable="boxQty" />
                        <input variable="singlePanelQty" />
                        <input variable="orgSiteName" />
                        <input variable="revisionCode" />
                        <input variable="checkInCode" />
                        <input variable="domesticExport" />
                        <input variable="eventInfo" />
                        <output variable="oemPalletInfo" />
                    </invoke>
                    <expression name="expression" type="expression" bounds="1255,978,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="addListValue('oemPalletList', getVariable('oemPalletInfo'))" />
                    </expression>
                    <whileend name="whileend" type="whileend" bounds="1270,1063,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
                <invoke name="PackingGroupServiceImpl saveRMAOEM_Pallets" type="invokebean" description="public void saveRMAOEM_Pallets(java.util.List OEMPalletList)" bounds="1255,1142,141,105" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="saveRMAOEM_Pallets" operationDesc="public void saveRMAOEM_Pallets(java.util.List OEMPalletList)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="oemPalletList" type="java.util.List" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="1671,425,61,49">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="1504,1282,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
                <source idx="3" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="1447,1361,224,102" 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>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="1489,1493,140,102" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
    </sequence>
</process>

