<?xml version="1.0" encoding="GBK"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="DeassignShipRequestToWO.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="MaterialShipRequestDetailServiceImpl" partnerLinkType="bean:MaterialShipRequestDetailServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="00" messageType="java.lang.String"></variable>
        <variable name="assignedBoxCount" messageType="int"></variable>
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="boxName" messageType="org.jdom.Element"></variable>
        <variable name="boxQty" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/MATERIALCREATEQUANTITY')" />
        <variable name="Deassign" messageType="java.lang.String"></variable>
        <variable name="DeassignShipRequestToWO" messageType="org.jdom.Document"></variable>
        <variable name="deliveryType" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Header/EVENTUSER')" />
        <variable name="Language" messageType="java.lang.String"></variable>
        <variable name="materialPacking" messageType="com.cim.idm.wmspackage.materialpacking.management.data.MaterialPacking"></variable>
        <variable name="materialPackingName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="messageName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Header/MESSAGENAME')" />
        <variable name="packingName" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="shipRequest" messageType="com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest"></variable>
        <variable name="shipRequestDetailName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/SHIPREQUESTDETAILNAME')" />
        <variable name="shipRequestDetailType" messageType="java.lang.String"></variable>
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/SITENAME')" />
        <variable name="subMaterialSpecName" messageType="java.lang.String" expression="getXmlData('DeassignShipRequestToWO', '//Message/Body/MATERIALSPECNAME')" />
        <variable name="validateMessage" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="DeassignShipRequestToWO" bounds="761,30,149,62">
            <input variable="DeassignShipRequestToWO" type="org.jdom.Document" />
        </receive>
        <expression name="expression" type="expression" bounds="765,122,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('boxList', getElementList('DeassignShipRequestToWO','//MATERIALPACKINGNAME'))" />
        </expression>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="765,217,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
            <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 behaviorName, java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="765,352,141,105" partnerLink="EventInfoUtil" partnerLinkType="EventInfoUtil" operation="makeEventInfo" operationDesc="public static com.cim.idm.framework.data.EventInfo makeEventInfo(java.lang.String behaviorName, 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="action_exceptAction" type="java.lang.String" />
            <input variable="messageName" 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="MaterialPackingServiceImpl updateMaterialPackingShipRequest" type="invokebean" description="public void updateMaterialPackingShipRequest(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String flag, java.lang.String receiveActNo)" bounds="765,487,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="updateMaterialPackingShipRequest" operationDesc="public void updateMaterialPackingShipRequest(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String flag, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="boxList" type="java.util.List" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="shipRequestDetailName" type="java.lang.String" />
            <input constant="Deassign" type="java.lang.String" />
            <input variable="receiveActNo" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialShipRequestDetailServiceImpl updateShipRequestDetailAssignedQty" type="invokebean" description="public void updateShipRequestDetailAssignedQty(java.lang.String siteName, java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String boxQty, java.lang.String flag)" bounds="765,622,141,105" partnerLink="MaterialShipRequestDetailServiceImpl" partnerLinkType="MaterialShipRequestDetailServiceImpl" operation="updateShipRequestDetailAssignedQty" operationDesc="public void updateShipRequestDetailAssignedQty(java.lang.String siteName, java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String boxQty, java.lang.String flag)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
            <input variable="shipRequestDetailName" type="java.lang.String" />
            <input variable="boxQty" type="java.lang.String" />
            <input constant="Deassign" type="java.lang.String" />
        </invoke>
        <invoke name="ESBService sendBySender" type="invokebean" description="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" bounds="765,757,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendBySender" operationDesc="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="replysubjectname" type="java.lang.String" />
            <input variable="DeassignShipRequestToWO" type="org.jdom.Document" />
            <input variable="returnElement" type="org.jdom.Element" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="765,892,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="MaterialShipRequestServiceImpl getShipRequest" type="invokebean" description="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" bounds="765,1027,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="getShipRequest" operationDesc="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
            <output variable="shipRequest" />
        </invoke>
        <expression name="expression" type="expression" bounds="765,1162,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('deliveryType',getField('shipRequest','deliveryType'))" />
            <function value="setVariable('shipRequestDetailType',getField('shipRequest','shipRequestDetailType'))" />
        </expression>
        <switch name="switch" bounds="819,1257,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="780,1336,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('deliveryType') = 'Reserve'" bounds="611,1415,60,52">
                <source idx="0" terminal="5,A" />
                <invoke name="ERPInterfaceServiceImpl queryAssignedBoxCount" type="invokebean" description="public int queryAssignedBoxCount(java.lang.String siteName, java.lang.String shipRequestName)" bounds="571,1497,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="queryAssignedBoxCount" operationDesc="public int queryAssignedBoxCount(java.lang.String siteName, java.lang.String shipRequestName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <output variable="assignedBoxCount" />
                </invoke>
                <switch name="switch" bounds="625,1632,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="586,1711,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('assignedBoxCount') = 0 " bounds="394,1790,60,57">
                        <source idx="0" terminal="5,A" />
                        <switch name="switch" bounds="408,1877,33,33" type="switch">
                            <source idx="0" terminal="5,A" />
                            <switchstart name="switchstart" type="switchstart" bounds="369,1956,110,49">
                                <source idx="0" terminal="5,A" />
                            </switchstart>
                            <case name="case" type="case" condition=" getVariable('siteName') = 'B4'&#xD;&#xA; or getVariable('siteName') = 'B2'&#xD;&#xA; or getVariable('siteName') = 'B5'&#xD;&#xA; or getVariable('siteName') = 'BMOT'&#xD;&#xA; or getVariable('siteName') = 'B7'" bounds="114,2035,60,56">
                                <source idx="0" terminal="5,A" />
                                <invoke name="ERPInterfaceServiceImpl sendAssignInfo" type="invokebean" description="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" bounds="74,2121,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendAssignInfo" operationDesc="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" ignoreThrow="false" fork="false">
                                    <source idx="0" terminal="5,A" />
                                    <input variable="siteName" type="java.lang.String" />
                                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                                    <input constant="" type="java.lang.String" />
                                    <input variable="receiveActNo" type="java.lang.String" />
                                    <input variable="shipRequestName" type="java.lang.String" />
                                    <input constant="00" type="java.lang.String" />
                                </invoke>
                            </case>
                            <case name="case" type="case" condition="getVariable('siteName') = 'B1'" bounds="394,2035,60,51">
                                <source idx="0" terminal="5,A" />
                                <switch name="switch" bounds="408,2116,33,33" type="switch">
                                    <source idx="0" terminal="5,A" />
                                    <switchstart name="switchstart" type="switchstart" bounds="369,2195,110,49">
                                        <source idx="0" terminal="5,A" />
                                    </switchstart>
                                    <case name="case" type="case" condition="getVariable('shipRequestDetailType')='ZDLF'&#xD;&#xA; or getVariable('shipRequestDetailType')='NLCC'&#xD;&#xA; or getVariable('shipRequestDetailType')='ZELF'" bounds="305,2274,60,72">
                                        <source idx="0" terminal="5,A" />
                                        <invoke name="ERPInterfaceServiceImpl sendAssignInfo" type="invokebean" description="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" bounds="265,2376,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendAssignInfo" operationDesc="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" ignoreThrow="false" fork="false">
                                            <source idx="0" terminal="5,A" />
                                            <input variable="siteName" type="java.lang.String" />
                                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                                            <input constant="" type="java.lang.String" />
                                            <input variable="receiveActNo" type="java.lang.String" />
                                            <input variable="shipRequestName" type="java.lang.String" />
                                            <input constant="00" type="java.lang.String" />
                                        </invoke>
                                    </case>
                                    <otherwise name="otherwise" type="otherwise" bounds="470,2274,88,74">
                                        <source idx="0" terminal="5,A" />
                                    </otherwise>
                                    <switchend name="switchend" type="switchend" bounds="369,2501,110,49">
                                        <source idx="0" terminal="5,A" />
                                        <source idx="1" terminal="5,A" />
                                    </switchend>
                                </switch>
                            </case>
                            <otherwise name="otherwise" type="otherwise" bounds="642,2035,88,45">
                                <source idx="0" terminal="5,A" />
                            </otherwise>
                            <switchend name="switchend" type="switchend" bounds="369,2570,110,49">
                                <source idx="0" terminal="5,A" />
                                <source idx="1" terminal="5,A" />
                                <source idx="2" terminal="5,A">
                                    <BendPoint FirstRelative="-69,284" SecondRelative="193,-207" weight="0.5" />
                                </source>
                            </switchend>
                        </switch>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="814,1790,88,55">
                        <source idx="0" terminal="5,A" />
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="369,2639,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A">
                            <BendPoint FirstRelative="-97,374" SecondRelative="337,-421" weight="0.5" />
                            <BendPoint FirstRelative="-223,636" SecondRelative="211,-159" weight="0.5" />
                        </source>
                    </switchend>
                </switch>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="986,1415,88,50">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="369,2708,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A">
                    <BendPoint FirstRelative="-36,1008" SecondRelative="570,-236" weight="0.5" />
                </source>
            </switchend>
        </switch>
        <terminate name="terminate" bounds="354,2787,141,65">
            <source idx="0" terminal="5,A" />
        </terminate>
    </sequence>
</process>

