<?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="SplitBox.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="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="areaName" messageType="java.lang.String"></variable>
        <variable name="charge" messageType="java.lang.String"></variable>
        <variable name="contentMaterialType" messageType="java.lang.String"></variable>
        <variable name="contentType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/CONTENTTYPE')" />
        <variable name="createTime" messageType="java.lang.String"></variable>
        <variable name="createUser" messageType="java.lang.String"></variable>
        <variable name="description" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/DESCRIPTION')" />
        <variable name="durableName" messageType="java.lang.String"></variable>
        <variable name="erpFactory" messageType="java.lang.String"></variable>
        <variable name="erpLocation" messageType="java.lang.String"></variable>
        <variable name="etcState" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/LASTEVENTCOMMENT')" />
        <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="holdState" messageType="java.lang.String"></variable>
        <variable name="itemElement" messageType="org.jdom.Element"></variable>
        <variable name="itemList" messageType="java.util.List"></variable>
        <variable name="lastEventComment" messageType="java.lang.String"></variable>
        <variable name="lastEventName" messageType="java.lang.String"></variable>
        <variable name="lastEventTime" messageType="java.lang.String"></variable>
        <variable name="lastEventTimeKey" messageType="java.lang.String"></variable>
        <variable name="lastEventUser" messageType="java.lang.String"></variable>
        <variable name="locationName" messageType="java.lang.String"></variable>
        <variable name="makeDate" messageType="java.lang.String"></variable>
        <variable name="materialCreateQuantity" messageType="java.lang.String"></variable>
        <variable name="materialPackingName" messageType="java.lang.String"></variable>
        <variable name="materialPackingType" messageType="java.lang.String"></variable>
        <variable name="materialProcessGroupName" messageType="java.lang.String"></variable>
        <variable name="materialQuantity" messageType="java.lang.String"></variable>
        <variable name="materialSpecName" messageType="java.lang.String"></variable>
        <variable name="materialType" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="oldPackingState" messageType="java.lang.String"></variable>
        <variable name="oldStockState" messageType="java.lang.String"></variable>
        <variable name="oqaResultFlag" messageType="java.lang.String"></variable>
        <variable name="packingGrade" messageType="java.lang.String"></variable>
        <variable name="packingState" messageType="java.lang.String"></variable>
        <variable name="reasonCode" messageType="java.lang.String"></variable>
        <variable name="reasonCodeType" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String"></variable>
        <variable name="receiveRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="receiveRequestName" messageType="java.lang.String"></variable>
        <variable name="receiveTime" messageType="java.lang.String"></variable>
        <variable name="receiveUser" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="shipRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="shipRequestName" messageType="java.lang.String"></variable>
        <variable name="shipTime" messageType="java.lang.String"></variable>
        <variable name="shipUser" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="sourceMaterialPackingName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="sourceMaterialQuantity" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALQUANTITY')" />
        <variable name="stockInType" messageType="java.lang.String"></variable>
        <variable name="stockState" messageType="java.lang.String"></variable>
        <variable name="storageName" messageType="java.lang.String"></variable>
        <variable name="storageOperationType" messageType="java.lang.String"></variable>
        <variable name="storageUseType" messageType="java.lang.String"></variable>
        <variable name="subPackingQuantity" messageType="java.lang.String"></variable>
        <variable name="superMaterialPackingName" messageType="java.lang.String"></variable>
        <variable name="superStorageName" messageType="java.lang.String"></variable>
        <variable name="supplierName" messageType="java.lang.String"></variable>
        <variable name="unDoDetailName" messageType="java.lang.String"></variable>
        <variable name="unDoID" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="SplitBox" bounds="70,30,144,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="63,122,158,106" 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 eventName, java.lang.String eventUser, java.lang.String eventComment, java.lang.String reasonCodeType, java.lang.String reasonCode)" bounds="72,258,141,105" 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="SplitBox" 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>
        <expression name="expression" type="expression" bounds="72,393,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('itemList', getElementList('message', '//Message/Body/BOXLIST/BOX'))" />
        </expression>
        <invoke name="MaterialPackingServiceImpl MaterialPackingOqaResult" type="invokebean" description="public java.lang.String MaterialPackingOqaResult(java.lang.String siteName, java.lang.String sourceMaterialPackingName)" bounds="72,488,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="MaterialPackingOqaResult" operationDesc="public java.lang.String MaterialPackingOqaResult(java.lang.String siteName, java.lang.String sourceMaterialPackingName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="sourceMaterialPackingName" type="java.lang.String" />
            <output variable="oqaResultFlag" />
        </invoke>
        <while name="while" bounds="126,623,32,32" type="2" collection="itemList" element="itemElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="87,702,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="72,781,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('materialPackingName',getXmlData('itemElement','//MATERIALPACKINGNAME'))" />
                <function value="setVariable('materialQuantity',getXmlData('itemElement','//MATERIALQUANTITY'))" />
            </expression>
            <invoke name="MaterialPackingServiceImpl SplitMaterialPacking" type="invokebean" description="public void SplitMaterialPacking(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String eventUser, java.lang.String siteName, java.lang.String sourceMaterialPackingName, java.lang.String sourceMaterialPackingQuantity, java.lang.String materialPackingName, java.lang.String materialQuantity)" bounds="72,876,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="SplitMaterialPacking" operationDesc="public void SplitMaterialPacking(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String eventUser, java.lang.String siteName, java.lang.String sourceMaterialPackingName, java.lang.String sourceMaterialPackingQuantity, java.lang.String materialPackingName, java.lang.String materialQuantity)" ignoreThrow="false" fork="false">
                <source idx="0" terminal="5,A" />
                <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                <input variable="eventUser" type="java.lang.String" />
                <input variable="siteName" type="java.lang.String" />
                <input variable="sourceMaterialPackingName" type="java.lang.String" />
                <input variable="sourceMaterialQuantity" type="java.lang.String" />
                <input variable="materialPackingName" type="java.lang.String" />
                <input variable="materialQuantity" type="java.lang.String" />
            </invoke>
            <whileend name="whileend" type="whileend" bounds="87,1001,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <switch name="switch" bounds="126,1080,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="87,1159,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('oqaResultFlag') = 'OQApropelling'" bounds="112,1238,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingStockInImpl sendSplitBoxToTQMS" type="invokebean" description="public void sendSplitBoxToTQMS(java.lang.String sourceMaterialPackingName, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="72,1287,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="sendSplitBoxToTQMS" operationDesc="public void sendSplitBoxToTQMS(java.lang.String sourceMaterialPackingName, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="sourceMaterialPackingName" type="java.lang.String" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="61,1422,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="72,1555,141,105" 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>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="324,1238,88,19">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="287,1287,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="298,1420,141,105" 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>
            </otherwise>
        </switch>
    </sequence>
</process>
               