<?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="ReturnFromExcel.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <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="domesticExport" messageType="java.lang.String"></variable>
        <variable name="erpfactoryname" messageType="java.lang.String"></variable>
        <variable name="erplocationname" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message','/Message/Header/EVENTCOMMENT')" />
        <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="groupName" messageType="java.lang.String" expression="getXmlData('message', '/Message/Body/GROUPNAME')" />
        <variable name="importtype" messageType="java.lang.String"></variable>
        <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="oemBoxInfo" messageType="com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Box"></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.BOE_OEM_Pallet"></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.BOE_OEM_Panel"></variable>
        <variable name="oemPanelList" messageType="java.util.List" expression="newInstance('java.util.ArrayList', 1000)" />
        <variable name="orgSiteName" messageType="java.lang.String"></variable>
        <variable name="packtime" 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="qPanelQty" messageType="java.lang.String"></variable>
        <variable name="remark" 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="saletype" 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="ReturnFromExcel" bounds="964,30,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <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'&#xA; or &#xA;getVariable('groupName')  = 'LOT'&#xA;" 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','//LOT'))" />
                </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('assyGrade',getXmlData('panelElement','//ASSYGRADE'))" />
                        <function value="setVariable('arrayRepair',getXmlData('panelElement','//ARRAYREPAIR'))" />
                        <function value="setVariable('cellRepair',getXmlData('panelElement','//CELLREPAIR'))" />
                    </expression>
                    <invoke name="ProductServiceImpl makeBOE_OEM_PANELInfo" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Panel makeBOE_OEM_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 assyGrade, java.lang.String eventUser)" bounds="-175,846,631,102" partnerLink="ProductServiceImpl" partnerLinkType="ProductServiceImpl" operation="makeBOE_OEM_PANELInfo" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Panel makeBOE_OEM_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 assyGrade, java.lang.String eventUser)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="siteName" />
                        <input variable="panelName" />
                        <input variable="singlePanelQty" />
                        <input variable="boxName" />
                        <input variable="lotGrade" />
                        <input variable="productSpecName" />
                        <input variable="orgSiteName" />
                        <input variable="moduleName" />
                        <input variable="checkInCode" />
                        <input variable="revisionCode" />
                        <input variable="cellGrade" />
                        <input variable="assyGrade" />
                        <input variable="arrayRepair" />
                        <input variable="cellRepair" />
                        <input variable="eventUser" />
                        <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 saveOEMPanels" type="invokebean" description="public void saveOEMPanels(java.util.List oemPanelList)" bounds="70,1142,141,105" partnerLink="ProductServiceImpl" partnerLinkType="ProductServiceImpl" operation="saveOEMPanels" operationDesc="public void saveOEMPanels(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'))" />
                        <function value="setVariable('qPanelQty',getXmlData('boxElement','//QPANELQTY'))" />
                    </expression>
                    <invoke name="PackingGroupServiceImpl makeBOE_OEM_BoxInfoM2" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Box makeBOE_OEM_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)" bounds="492,846,502,102" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="makeBOE_OEM_BoxInfoM2" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Box makeBOE_OEM_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)" 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="qPanelQty" type="java.lang.String" />
                        <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 saveBOE_OEMBoxs" type="invokebean" description="public void saveBOE_OEMBoxs(java.util.List OEMBoxList)" bounds="673,1142,141,105" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="saveBOE_OEMBoxs" operationDesc="public void saveBOE_OEMBoxs(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'))" />
                        <function value="setVariable('remark',getXmlData('palletElement','//REMARK'))" />
                        <function value="setVariable('erpfactoryname',getXmlData('palletElement','//ERPLOCATIONNAME'))" />
                        <function value="setVariable('erplocationname',getXmlData('palletElement','//ERPFROMLOCATIONNAME'))" />
                        <function value="setVariable('packtime',getXmlData('palletElement','//PACKINGTIME'))" />
                        <function value="setVariable('saletype',getXmlData('palletElement','//SALETYPE'))" />
                        <function value="setVariable('qPanelQty',getXmlData('palletElement','//QPANELQTY'))" />
                        <function value="setVariable('importtype',getXmlData('palletElement','//PACKINGTYPE'))" />
                    </expression>
                    <invoke name="PackingGroupServiceImpl makeBOE_OEM_PalletInfoM2" type="invokebean" description="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Pallet makeBOE_OEM_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="makeBOE_OEM_PalletInfoM2" operationDesc="public com.cim.idm.fgwmsextend.customizing.management.data.BOE_OEM_Pallet makeBOE_OEM_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="remark" />
                        <input variable="erpfactoryname" />
                        <input variable="erplocationname" />
                        <input variable="packtime" />
                        <input variable="saletype" />
                        <input variable="qPanelQty" />
                        <input variable="importtype" />
                        <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 saveBOE_OEM_Pallets" type="invokebean" description="public void saveBOE_OEM_Pallets(java.util.List OEMPalletList)" bounds="1255,1142,141,105" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="saveBOE_OEM_Pallets" operationDesc="public void saveBOE_OEM_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>

