<?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="PDAFGDeassignShipRequestFromPalletList.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="BSShipRequestServiceUtil" partnerLinkType="bean:BSShipRequestServiceUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="PackingGroupServiceUtil" partnerLinkType="bean:PackingGroupServiceUtil" />
        <partnerLink name="PackingGroupServiceImpl" partnerLinkType="bean:PackingGroupServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="customException" messageType="com.cim.idm.fgwmsextend.generic.errorHandler.CustomException"></variable>
        <variable name="deassignBoxQty" messageType="long">0</variable>
        <variable name="deassignPalletQty" messageType="long">0</variable>
        <variable name="deassignPanelQty" messageType="long">0</variable>
        <variable name="DeassignShipRequestFromPalletList" messageType="org.jdom.Document"></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="eventUser" messageType="java.lang.String" expression="getXmlData('message', '/Message/Header/EVENTUSER')" />
        <variable name="invoiceDetailNo" messageType="java.lang.String"></variable>
        <variable name="invoiceNo" messageType="java.lang.String" expression="getXmlData('message','/Message/Body/SHIPREQUESTNAME')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="palletInfo" messageType="com.cim.idm.wmspackage.productpacking.management.data.ProductPacking"></variable>
        <variable name="palletInvoiceDetailNo" messageType="java.lang.String"></variable>
        <variable name="palletList" messageType="java.util.List"></variable>
        <variable name="palletName" messageType="java.lang.String"></variable>
        <variable name="palletNameList" messageType="java.util.List" expression="getXmlDataList('message','//PALLET/PALLETNAME')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="shipRequestDetail" messageType="com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message','/Message/Body/SITENAME')" />
        <variable name="temBoxQty" messageType="long"></variable>
        <variable name="temPalletQty" messageType="long"></variable>
        <variable name="temPanelQty" messageType="long"></variable>
    </variables>
    <sequence>
        <receive name="PDAFGDeassignShipRequestFromPalletList" bounds="70,30,218,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <expression name="expression" type="expression" bounds="109,135,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('palletList', getElementList('DeassignShipRequestFromPalletList','//PALLETNAME'))" />
        </expression>
        <invoke name="BSShipRequestServiceUtil checkPalletState" type="invokebean" description="public void checkPalletState(java.util.List productPackingNameList, java.lang.String flag)" bounds="109,230,140,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="checkPalletState" operationDesc="public void checkPalletState(java.util.List productPackingNameList, java.lang.String flag)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="palletList" type="java.util.List" />
            <input constant="Design" type="java.lang.String" />
        </invoke>
        <invoke name="BSShipRequestServiceUtil checkInvoiceExist" type="invokebean" description="public void checkInvoiceExist(java.lang.String invoiceNo, java.lang.String siteName)" bounds="109,362,140,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="checkInvoiceExist" operationDesc="public void checkInvoiceExist(java.lang.String invoiceNo, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="invoiceNo" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
        </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="41,494,276,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 constant="DeassignShipRequest" 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>
        <while name="while" bounds="163,626,32,49" type="2" collection="palletNameList" element="palletName">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="124,705,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <invoke name="PackingGroupServiceUtil getPackingGroupData" type="invokebean" description="public com.cim.idm.wmspackage.productpacking.management.data.ProductPacking getPackingGroupData(java.lang.String originalPalletName, java.lang.String siteName)" bounds="109,784,141,105" partnerLink="PackingGroupServiceUtil" partnerLinkType="PackingGroupServiceUtil" operation="getPackingGroupData" operationDesc="public com.cim.idm.wmspackage.productpacking.management.data.ProductPacking getPackingGroupData(java.lang.String originalPalletName, java.lang.String siteName)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input variable="palletName" type="java.lang.String" />
                <input variable="siteName" type="java.lang.String" />
                <output variable="palletInfo" />
            </invoke>
            <expression name="expression" type="expression" bounds="109,919,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('temPanelQty',getField('palletInfo','QPanelQuantity'))" />
                <function value="setVariable('temPalletQty',1)" />
                <function value="setVariable('palletInvoiceDetailNo',getField('palletInfo','shipRequestDetailName'))" />
                <function value="setVariable('temBoxQty',getField('palletInfo','subPackingQuantity'))" />
            </expression>
            <switch name="switch" bounds="163,1014,33,33" type="switch">
                <source idx="0" terminal="5,A" />
                <switchstart name="switchstart" type="switchstart" bounds="124,1093,110,49">
                    <source idx="0" terminal="5,A" />
                </switchstart>
                <case name="case" type="case" condition="getVariable('palletInvoiceDetailNo')!=''&#xA; or isNull('palletInvoiceDetailNo') = 'false'" bounds="163,1172,32,49">
                    <source idx="0" terminal="5,A" />
                    <invoke name="BSShipRequestServiceUtil getShipRequestDetail" type="invokebean" description="public com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail getShipRequestDetail(java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String siteName)" bounds="101,1251,157,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="getShipRequestDetail" operationDesc="public com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail getShipRequestDetail(java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String siteName)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="invoiceNo" type="java.lang.String" />
                        <input variable="palletInvoiceDetailNo" type="java.lang.String" />
                        <input variable="siteName" type="java.lang.String" />
                        <output variable="shipRequestDetail" />
                    </invoke>
                    <invoke name="PackingGroupServiceImpl deassignPalletFromShipRequestDetailPda" type="invokebean" description="public void deassignPalletFromShipRequestDetailPda(java.lang.String SiteName, java.lang.String palletName, com.cim.idm.framework.data.EventInfo eventInfo, com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail shipRequestDetail, long selectedBoxQty, long selectedPalletQty, long selectedProductQty)" bounds="64,1383,230,102" partnerLink="PackingGroupServiceImpl" partnerLinkType="PackingGroupServiceImpl" operation="deassignPalletFromShipRequestDetailPda" operationDesc="public void deassignPalletFromShipRequestDetailPda(java.lang.String SiteName, java.lang.String palletName, com.cim.idm.framework.data.EventInfo eventInfo, com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail shipRequestDetail, long selectedBoxQty, long selectedPalletQty, long selectedProductQty)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="siteName" type="java.lang.String" />
                        <input variable="palletName" type="java.lang.String" />
                        <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                        <input variable="shipRequestDetail" type="com.cim.idm.wmspackage.productshiprequest.management.data.ProductShipRequestDetail" />
                        <input variable="temBoxQty" type="long" />
                        <input variable="temPalletQty" type="long" />
                        <input variable="temPanelQty" type="long" />
                    </invoke>
                </case>
                <otherwise name="otherwise" type="otherwise" bounds="465,1172,61,49">
                    <source idx="0" terminal="5,A" />
                    <throw name="throw" bounds="425,1383,141,65" faultName="catchAll" variable="customException">
                        <source idx="0" terminal="5,A" />
                        <input constant="PALLET-0110" type="java.lang.String" />
                        <input variable="palletName" type="java.lang.Object" />
                    </throw>
                </otherwise>
                <switchend name="switchend" type="switchend" bounds="124,1505,110,49">
                    <source idx="0" terminal="5,A" />
                    <source idx="1" terminal="5,A" />
                </switchend>
            </switch>
            <whileend name="whileend" type="whileend" bounds="124,1574,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="67,1653,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="PDASender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

