<?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="MESMaterialRequestInfo.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <partnerLink name="MaterialShipRequestDetailServiceImpl" partnerLinkType="bean:MaterialShipRequestDetailServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="CHARGE" messageType="java.lang.String"></variable>
        <variable name="Created" messageType="java.lang.String"></variable>
        <variable name="DETAILINFO" messageType="org.jdom.Element"></variable>
        <variable name="DETAILINFOLIST" messageType="java.util.List"></variable>
        <variable name="ERPFACTORYNAME" messageType="java.lang.String"></variable>
        <variable name="ERPLOCATION" messageType="java.lang.String"></variable>
        <variable name="ERPRECEIVEFACTORYNAME" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/ERPRECEIVEFACTORYNAME')" />
        <variable name="ERPRECEIVELOCATION" messageType="java.lang.String"></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="MATERIALSPECNAME" messageType="java.lang.String"></variable>
        <variable name="MES" messageType="java.lang.String"></variable>
        <variable name="MESMaterialRequestInfo" messageType="org.jdom.Document"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="MESSAGEFLAG" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/MESSAGEFLAG')" />
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="QUANTITY" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="REQUESTFACTORY" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/REQUESTFACTORY')" />
        <variable name="REQUESTPERSONNO" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/REQUESTPERSONNO')" />
        <variable name="Reserved" messageType="java.lang.String"></variable>
        <variable name="SHIPPLANDATE" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/SHIPPLANDATE')" />
        <variable name="SHIPREQUESTDETAILNAME" messageType="java.lang.String"></variable>
        <variable name="SHIPREQUESTDETAILTYPE" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/SHIPREQUESTDETAILTYPE')" />
        <variable name="SHIPREQUESTNAME" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/SHIPREQUESTNAME')" />
        <variable name="SITENAME" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTINFO/SITENAME')" />
    </variables>
    <sequence>
        <receive name="MESMaterialRequestInfo" bounds="261,30,143,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="262,122,141,105" 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="262,257,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="MESMaterialRequestInfo" 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="262,392,141,65">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('DETAILINFOLIST', getElementList('message', '//Message/Body/SHIPREQUESTINFO/DETAILINFOLIST/DETAILINFO'))" />
        </expression>
        <switch name="switch" bounds="316,487,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="277,566,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="string(getVariable('MESSAGEFLAG')) ='0'" bounds="111,645,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialShipRequestServiceImpl BMDTcreate" type="invokebean" description="public void BMDTcreate(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String systemType, java.lang.String shipRequestState, java.lang.String shipRequestDetailType, java.lang.String customerNO, java.lang.String deliveryType, java.lang.String shipPlanDate, java.lang.String erpFactoryName, java.lang.String erpReceiveFactory)" bounds="71,694,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="BMDTcreate" operationDesc="public void BMDTcreate(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String systemType, java.lang.String shipRequestState, java.lang.String shipRequestDetailType, java.lang.String customerNO, java.lang.String deliveryType, java.lang.String shipPlanDate, java.lang.String erpFactoryName, java.lang.String erpReceiveFactory)" 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 constant="MES" type="java.lang.String" />
                    <input constant="Created" type="java.lang.String" />
                    <input variable="SHIPREQUESTDETAILTYPE" type="java.lang.String" />
                    <input variable="REQUESTPERSONNO" type="java.lang.String" />
                    <input constant="Reserved" type="java.lang.String" />
                    <input variable="SHIPPLANDATE" type="java.lang.String" />
                    <input variable="ERPRECEIVEFACTORYNAME" type="java.lang.String" />
                    <input variable="ERPRECEIVEFACTORYNAME" type="java.lang.String" />
                </invoke>
                <while name="while" bounds="125,829,32,32" type="2" collection="DETAILINFOLIST" element="DETAILINFO">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="86,908,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="71,987,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('SHIPREQUESTDETAILNAME',getXmlData('DETAILINFO','//SHIPREQUESTDETAILNAME'))" />
                        <function value="setVariable('MATERIALSPECNAME',getXmlData('DETAILINFO','//MATERIALSPECNAME'))" />
                        <function value="setVariable('QUANTITY',getXmlData('DETAILINFO','//QUANTITY'))" />
                        <function value="setVariable('CHARGE',getXmlData('DETAILINFO','//CHARGE'))" />
                        <function value="setVariable('ERPFACTORYNAME',getXmlData('DETAILINFO','//ERPFACTORYNAME'))" />
                        <function value="setVariable('ERPLOCATION',getXmlData('DETAILINFO','//ERPLOCATION'))" />
                        <function value="setVariable('ERPRECEIVELOCATION',getXmlData('DETAILINFO','//ERPRECEIVELOCATION'))" />
                    </expression>
                    <invoke name="MaterialShipRequestDetailServiceImpl BMDTcreate" type="invokebean" description="public void BMDTcreate(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpFactoryName, java.lang.String charge, java.lang.String receiveErpLocation)" bounds="71,1082,141,105" partnerLink="MaterialShipRequestDetailServiceImpl" partnerLinkType="MaterialShipRequestDetailServiceImpl" operation="BMDTcreate" operationDesc="public void BMDTcreate(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpFactoryName, java.lang.String charge, java.lang.String receiveErpLocation)" 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 variable="MATERIALSPECNAME" type="java.lang.String" />
                        <input variable="QUANTITY" type="java.lang.String" />
                        <input variable="ERPLOCATION" type="java.lang.String" />
                        <input variable="ERPFACTORYNAME" type="java.lang.String" />
                        <input variable="CHARGE" type="java.lang.String" />
                        <input variable="ERPRECEIVELOCATION" type="java.lang.String" />
                    </invoke>
                    <whileend name="whileend" type="whileend" bounds="86,1207,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
            </case>
            <case name="case" type="case" condition="string(getVariable('MESSAGEFLAG')) ='1'" bounds="302,645,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialShipRequestServiceImpl BMDTmodify" type="invokebean" description="public void BMDTmodify(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailType, java.lang.String customerNO, java.lang.String shipPlanDate, java.lang.String erpFactoryName, java.lang.String erpReceiveFactory)" bounds="262,694,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="BMDTmodify" operationDesc="public void BMDTmodify(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailType, java.lang.String customerNO, java.lang.String shipPlanDate, java.lang.String erpFactoryName, java.lang.String erpReceiveFactory)" 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="SHIPREQUESTDETAILTYPE" type="java.lang.String" />
                    <input variable="REQUESTPERSONNO" type="java.lang.String" />
                    <input variable="SHIPPLANDATE" type="java.lang.String" />
                    <input variable="ERPFACTORYNAME" type="java.lang.String" />
                    <input variable="ERPRECEIVEFACTORYNAME" type="java.lang.String" />
                </invoke>
                <while name="while" bounds="316,829,32,32" type="2" collection="DETAILINFOLIST" element="DETAILINFO">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="277,908,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="262,987,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('SHIPREQUESTDETAILNAME',getXmlData('DETAILINFO','//SHIPREQUESTDETAILNAME'))" />
                        <function value="setVariable('MATERIALSPECNAME',getXmlData('DETAILINFO','//MATERIALSPECNAME'))" />
                        <function value="setVariable('QUANTITY',getXmlData('DETAILINFO','//QUANTITY'))" />
                        <function value="setVariable('CHARGE',getXmlData('DETAILINFO','//CHARGE'))" />
                        <function value="setVariable('ERPFACTORYNAME',getXmlData('DETAILINFO','//ERPFACTORYNAME'))" />
                        <function value="setVariable('ERPLOCATION',getXmlData('DETAILINFO','//ERPLOCATION'))" />
                        <function value="setVariable('ERPRECEIVELOCATION',getXmlData('DETAILINFO','//ERPRECEIVELOCATION'))" />
                    </expression>
                    <invoke name="MaterialShipRequestDetailServiceImpl BMDTmodify" type="invokebean" description="public void BMDTmodify(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpFactoryName, java.lang.String charge, java.lang.String receiveErpLocation)" bounds="262,1082,141,105" partnerLink="MaterialShipRequestDetailServiceImpl" partnerLinkType="MaterialShipRequestDetailServiceImpl" operation="BMDTmodify" operationDesc="public void BMDTmodify(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName, java.lang.String materialSpecName, java.lang.String requestQuantity, java.lang.String erpLocation, java.lang.String erpFactoryName, java.lang.String charge, java.lang.String receiveErpLocation)" 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 variable="MATERIALSPECNAME" type="java.lang.String" />
                        <input variable="QUANTITY" type="java.lang.String" />
                        <input variable="ERPLOCATION" type="java.lang.String" />
                        <input variable="ERPFACTORYNAME" type="java.lang.String" />
                        <input variable="CHARGE" type="java.lang.String" />
                        <input variable="ERPRECEIVELOCATION" type="java.lang.String" />
                    </invoke>
                    <whileend name="whileend" type="whileend" bounds="277,1207,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="493,645,88,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialShipRequestServiceImpl remove" type="invokebean" description="public void remove(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName)" bounds="467,694,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="remove" operationDesc="public void remove(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName)" 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" />
                </invoke>
                <while name="while" bounds="521,829,32,32" type="2" collection="DETAILINFOLIST" element="DETAILINFO">
                    <source idx="0" terminal="5,A" />
                    <whilestart name="whilestart" type="whilestart" bounds="482,908,110,49">
                        <source idx="0" terminal="5,A" />
                    </whilestart>
                    <expression name="expression" type="expression" bounds="467,987,141,65">
                        <source idx="0" terminal="5,A" />
                        <function value="setVariable('SHIPREQUESTDETAILNAME',getXmlData('DETAILINFO','//SHIPREQUESTDETAILNAME'))" />
                        <function value="setVariable('MATERIALSPECNAME',getXmlData('DETAILINFO','//MATERIALSPECNAME'))" />
                        <function value="setVariable('QUANTITY',getXmlData('DETAILINFO','//QUANTITY'))" />
                        <function value="setVariable('CHARGE',getXmlData('DETAILINFO','//CHARGE'))" />
                        <function value="setVariable('ERPFACTORYNAME',getXmlData('DETAILINFO','//ERPFACTORYNAME'))" />
                        <function value="setVariable('ERPLOCATION',getXmlData('DETAILINFO','//ERPLOCATION'))" />
                        <function value="setVariable('ERPRECEIVELOCATION',getXmlData('DETAILINFO','//ERPRECEIVELOCATION'))" />
                    </expression>
                    <invoke name="MaterialShipRequestDetailServiceImpl remove" type="invokebean" description="public void remove(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName)" bounds="467,1082,141,105" partnerLink="MaterialShipRequestDetailServiceImpl" partnerLinkType="MaterialShipRequestDetailServiceImpl" operation="remove" operationDesc="public void remove(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String shipRequestDetailName)" 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" />
                    </invoke>
                    <whileend name="whileend" type="whileend" bounds="482,1207,110,49">
                        <source idx="0" terminal="5,A" />
                    </whileend>
                </while>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="86,1276,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="71,1355,141,105" 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="71,1490,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>
    </sequence>
</process>

