<?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="ReceiveMaterialFromMWMS.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="B17" messageType="java.lang.String"></variable>
        <variable name="carrierElement" messageType="org.jdom.Element"></variable>
        <variable name="carrierID" messageType="java.lang.String"></variable>
        <variable name="carrierIDElement" messageType="org.jdom.Element"></variable>
        <variable name="carrierIDList" messageType="java.util.List"></variable>
        <variable name="carrierList" messageType="java.util.List"></variable>
        <variable name="charge" messageType="java.lang.String"></variable>
        <variable name="description" messageType="java.lang.String"></variable>
        <variable name="erpFactory" messageType="java.lang.String"></variable>
        <variable name="erpLocation" messageType="java.lang.String"></variable>
        <variable name="error" messageType="java.lang.Exception"></variable>
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="expiringDate" messageType="java.lang.String"></variable>
        <variable name="line" messageType="java.lang.String"></variable>
        <variable name="makeDate" messageType="java.lang.String"></variable>
        <variable name="materialElement" messageType="org.jdom.Element"></variable>
        <variable name="materialList" messageType="java.util.List"></variable>
        <variable name="materialQuantity" messageType="java.lang.String"></variable>
        <variable name="materialSpecElement" messageType="org.jdom.Element"></variable>
        <variable name="materialSpecList" messageType="java.util.List"></variable>
        <variable name="materialSpecName" messageType="java.lang.String"></variable>
        <variable name="MDLused" messageType="java.lang.String"></variable>
        <variable name="MES" messageType="java.lang.String"></variable>
        <variable name="reasonCode" messageType="java.lang.String"></variable>
        <variable name="reasonCodeType" messageType="java.lang.String"></variable>
        <variable name="receiveLocation" messageType="java.lang.String"></variable>
        <variable name="ReceiveMaterialFromMWMS" messageType="org.jdom.Document"></variable>
        <variable name="remark" messageType="java.lang.String"></variable>
        <variable name="returnType" messageType="java.lang.String"></variable>
        <variable name="rtShipRequestDetailName" messageType="java.lang.String"></variable>
        <variable name="rtTypeDescription" messageType="java.lang.String"></variable>
        <variable name="shipRequestName" messageType="java.lang.String"></variable>
        <variable name="supplierName" messageType="java.lang.String"></variable>
        <variable name="supplierNO" messageType="java.lang.String"></variable>
        <variable name="toMESMessage" messageType="org.jdom.Document"></variable>
        <variable name="workOrder" messageType="java.lang.String"></variable>
        <variable name="workOrderType" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="ReceiveMaterialFromMWMS" bounds="70,30,149,62">
            <input variable="ReceiveMaterialFromMWMS" type="org.jdom.Document" />
        </receive>
        <expression name="expression" type="expression" bounds="74,122,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('carrierList',getElementList('ReceiveMaterialFromMWMS','//CARRIERLIST'))" />
            <function value="setVariable('shipRequestName',getXmlData('ReceiveMaterialFromMWMS', '//INVOICENO'))" />
        </expression>
        <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="74,217,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="ReceiveMaterialFromMWMS" type="java.lang.String" />
            <input constant="MDLMES" type="java.lang.String" />
            <input constant="MDLReceivedFromMWMS" type="java.lang.String" />
            <input constant="" type="java.lang.String" />
            <input constant="" type="java.lang.String" />
            <output variable="eventInfo" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,352,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <while name="while" bounds="128,487,32,32" type="2" collection="carrierList" element="carrierElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="89,566,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="74,645,141,65">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('carrierIDList',getElementList('carrierElement','//CARRIER'))" />
            </expression>
            <switch name="switch" bounds="399,668,33,33" type="switch">
                <source idx="0" terminal="5,A" />
                <switchstart name="switchstart" type="switchstart" bounds="349,717,110,49">
                    <source idx="0" terminal="5,A" />
                </switchstart>
                <case name="case" type="case" condition="string(getListSize('carrierIDList')) &gt; 0  " bounds="374,786,60,56">
                    <source idx="0" terminal="5,A" />
                    <while name="while" bounds="128,740,32,32" type="2" collection="carrierIDList" element="carrierIDElement">
                        <source idx="0" terminal="5,A" />
                        <whilestart name="whilestart" type="whilestart" bounds="89,819,110,49">
                            <source idx="0" terminal="5,A" />
                        </whilestart>
                        <expression name="expression" type="expression" bounds="74,898,141,65">
                            <source idx="0" terminal="5,A" />
                            <function value="setVariable('carrierID',getXmlData('carrierIDElement','//CARRIERID'))" />
                        </expression>
                        <invoke name="MaterialPackingServiceImpl saveMDLReceivedCarrierInfo" type="invokebean" description="public void saveMDLReceivedCarrierInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String durableName, java.lang.String durableState)" bounds="74,993,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="saveMDLReceivedCarrierInfo" operationDesc="public void saveMDLReceivedCarrierInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String durableName, java.lang.String durableState)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="eventInfo" />
                            <input constant="B17" type="java.lang.String" />
                            <input variable="carrierID" />
                            <input constant="MDLused" type="java.lang.String" />
                            <input variable="shipRequestName" />
                        </invoke>
                        <whileend name="whileend" type="whileend" bounds="89,1118,110,49">
                            <source idx="0" terminal="5,A" />
                        </whileend>
                    </while>
                </case>
                <otherwise name="otherwise" type="otherwise" bounds="444,786,88,57">
                    <source idx="0" terminal="5,A" />
                    <invoke name="MaterialPackingServiceImpl saveMDLReceivedCarrierInfo" type="invokebean" description="public void saveMDLReceivedCarrierInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String durableName, java.lang.String durableState)" bounds="427,906,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="saveMDLReceivedCarrierInfo" operationDesc="public void saveMDLReceivedCarrierInfo(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String durableName, java.lang.String durableState)" ignoreThrow="false" fork="false">
                        <source idx="0" terminal="5,A" />
                        <input variable="eventInfo" />
                        <input constant="B17" type="java.lang.String" />
                        <input variable="carrierID" />
                        <input constant="MDLused" type="java.lang.String" />
                        <input variable="shipRequestName" />
                    </invoke>
                </otherwise>
                <switchend name="switchend" type="switchend" bounds="336,1227,110,49">
                    <source idx="0" terminal="5,A" />
                    <source idx="1" terminal="5,A" />
                </switchend>
            </switch>
            <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1266,141,105" 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="83,1397,141,65">
                <source idx="0" terminal="5,A" />
            </terminate>
            <whileend name="whileend" type="whileend" bounds="89,1187,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
    </sequence>
</process>

