<?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="AssignShipRequestToBoxForZL.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="MaterialShipRequestToOEMServiceImpl" partnerLinkType="bean:MaterialShipRequestToOEMServiceImpl" />
        <partnerLink name="MaterialShipRequestDetailServiceImpl" partnerLinkType="bean:MaterialShipRequestDetailServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="01" messageType="java.lang.String"></variable>
        <variable name="asignedBoxCount" messageType="int"></variable>
        <variable name="Assign" messageType="java.lang.String"></variable>
        <variable name="AssignShipRequestToBox" messageType="org.jdom.Document"></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('AssignShipRequestToBox', '//Message/Body/MATERIALCREATEQUANTITY')" />
        <variable name="deliveryType" messageType="java.lang.String"></variable>
        <variable name="error" messageType="java.lang.Exception"></variable>
        <variable name="EVENTCOMMENT" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Header/EVENTUSER')" />
        <variable name="fifoFlagList" messageType="java.util.List"></variable>
        <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('AssignShipRequestToBox', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="messageID" messageType="java.lang.String"></variable>
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Header/MESSAGENAME')" />
        <variable name="packingName" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//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('AssignShipRequestToBox', '//Message/Body/SHIPREQUESTDETAILNAME')" />
        <variable name="shipRequestDetailType" messageType="java.lang.String"></variable>
        <variable name="SHIPREQUESTNAME" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('AssignShipRequestToBox', '//Message/Body/SITENAME')" />
        <variable name="validateMessage" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="AssignShipRequestToBox" bounds="70,30,149,62">
            <input variable="AssignShipRequestToBox" type="org.jdom.Document" />
        </receive>
        <expression name="expression" type="expression" bounds="74,122,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('boxList', getElementList('AssignShipRequestToBox','//MATERIALPACKINGNAME'))" />
            <function value="setVariable('fifoFlagList', getElementList('AssignShipRequestToBox','//REMARK'))" />
        </expression>
        <invoke name="MaterialPackingStockInImpl checkBoxState" type="invokebean" description="public void checkBoxState(java.util.List materialPackingNameList, java.lang.String flag, java.lang.String siteName)" bounds="74,217,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="checkBoxState" operationDesc="public void checkBoxState(java.util.List materialPackingNameList, java.lang.String flag, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="boxList" type="java.util.List" />
            <input constant="Asign" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl checkBoxInfo" type="invokebean" description="public void checkBoxInfo(java.util.List materialPackingNameList, java.lang.String flag, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String boxQty)" bounds="74,352,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="checkBoxInfo" operationDesc="public void checkBoxInfo(java.util.List materialPackingNameList, java.lang.String flag, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String boxQty)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="boxList" type="java.util.List" />
            <input constant="Asign" type="java.lang.String" />
            <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" />
        </invoke>
        <switch name="switch" bounds="128,487,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="89,566,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('EVENTCOMMENT') = 'OEM'" bounds="114,645,60,19">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="74,694,141,65">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('SHIPREQUESTNAME', getXmlData('AssignShipRequestToBox', '//Message/Body/SHIPREQUESTNAME'))" />
                    <function value="setVariable('SHIPREQUESTDETAILNAME', getXmlData('AssignShipRequestToBox', '//Message/Body/SHIPREQUESTDETAILNAME'))" />
                </expression>
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="94,789,100,92" 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 behaviorName, java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="74,911,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)" bounds="74,1046,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)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" />
                    <input variable="boxList" />
                    <input variable="SHIPREQUESTNAME" />
                    <input variable="SHIPREQUESTDETAILNAME" />
                    <input variable="eventUser" />
                    <input variable="EVENTCOMMENT" />
                    <input constant="Assign" type="java.lang.String" />
                </invoke>
                <invoke name="MaterialShipRequestToOEMServiceImpl MakeOEMAssignedQty" type="invokebean" description="public void MakeOEMAssignedQty(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String subMaterialSpecName, java.lang.String boxQty, java.lang.String flag)" bounds="74,1181,141,105" partnerLink="MaterialShipRequestToOEMServiceImpl" partnerLinkType="MaterialShipRequestToOEMServiceImpl" operation="MakeOEMAssignedQty" operationDesc="public void MakeOEMAssignedQty(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String invoiceDetailNo, java.lang.String subMaterialSpecName, java.lang.String boxQty, java.lang.String flag)" 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="SHIPREQUESTNAME" type="java.lang.String" />
                    <input variable="SHIPREQUESTDETAILNAME" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input variable="boxQty" type="java.lang.String" />
                    <input constant="Assign" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="305,645,88,19">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="279,694,141,65">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('SHIPREQUESTNAME', getXmlData('AssignShipRequestToBox', '//Message/Body/SHIPREQUESTNAME'))" />
                </expression>
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="299,789,100,92" 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 behaviorName, java.lang.String eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="279,911,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)" bounds="279,1046,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)" 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="Assign" 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="279,1181,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="Assign" type="java.lang.String" />
                </invoke>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="89,1306,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="MaterialPackingServiceImpl updateAssignFifoFlag" type="invokebean" description="public void updateAssignFifoFlag(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.util.List fifoFlagList)" bounds="74,1385,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="updateAssignFifoFlag" operationDesc="public void updateAssignFifoFlag(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.util.List materialPackingNameList, java.util.List fifoFlagList)" 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="fifoFlagList" type="java.util.List" />
        </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="74,1520,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="AssignShipRequestToBox" 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="59,1655,166,109" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <terminate name="terminate" bounds="67,1788,141,65">
            <source idx="0" terminal="5,A" />
        </terminate>
    </sequence>
</process>

