<?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="CancelReserveShipRequestForFG.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="BSShipRequestServiceUtil" partnerLinkType="bean:BSShipRequestServiceUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="BSShipRequestServiceImpl" partnerLinkType="bean:BSShipRequestServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="deliveryType" 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="invoiceNo" messageType="java.lang.String" expression="getXmlData('message', '/Message/Body/SHIPREQUESTNAME')" />
        <variable name="J" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '/Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="setEventInfo" messageType="com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '/Message/Body/SITENAME')" />
        <variable name="userColumns" messageType="java.util.Map" expression="newInstance('java.util.HashMap', 10)" />
    </variables>
    <sequence>
        <receive name="CancelReserveShipRequestForFG" bounds="70,30,165,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="BSShipRequestServiceUtil checkInvoiceExist" type="invokebean" description="public void checkInvoiceExist(java.lang.String invoiceNo, java.lang.String siteName)" bounds="82,135,140,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="checkInvoiceExist" operationDesc="public void checkInvoiceExist(java.lang.String invoiceNo, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="invoiceNo" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
        </invoke>
        <invoke name="BSShipRequestServiceUtil getDeliveryType" type="invokebean" description="public java.lang.String getDeliveryType(java.lang.String invoiceNo, java.lang.String siteName)" bounds="315,179,140,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="getDeliveryType" operationDesc="public java.lang.String getDeliveryType(java.lang.String invoiceNo, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="8,A" />
            <input variable="invoiceNo" type="java.lang.String" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="deliveryType" />
        </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="0,267,305,102" 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="CancelReserveShipRequest" 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="82,399,140,62">
            <source idx="0" terminal="5,A" />
            <function value="addMap(getVariable('userColumns'),'shipRequestState','Created')" />
        </expression>
        <invoke name="BSShipRequestServiceUtil makeSetEventInfo" type="invokebean" description="public com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo makeSetEventInfo(java.util.Map userColumns)" bounds="82,491,140,102" partnerLink="BSShipRequestServiceUtil" partnerLinkType="BSShipRequestServiceUtil" operation="makeSetEventInfo" operationDesc="public com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo makeSetEventInfo(java.util.Map userColumns)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="userColumns" type="java.util.Map" />
            <output variable="setEventInfo" />
        </invoke>
        <invoke name="BSShipRequestServiceImpl cancelReserved" type="invokebean" description="public void cancelReserved(java.lang.String invoiceNo, com.cim.idm.framework.data.EventInfo eventInfo, com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo setEventInfo, java.lang.String siteName)" bounds="53,623,199,102" partnerLink="BSShipRequestServiceImpl" partnerLinkType="BSShipRequestServiceImpl" operation="cancelReserved" operationDesc="public void cancelReserved(java.lang.String invoiceNo, com.cim.idm.framework.data.EventInfo eventInfo, com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo setEventInfo, java.lang.String siteName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="invoiceNo" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="setEventInfo" type="com.cim.idm.wmspackage.productshiprequest.management.info.SetEventInfo" />
            <input variable="siteName" type="java.lang.String" />
        </invoke>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="40,755,224,102" 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>
        <switch name="switch" bounds="319,905,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="300,984,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('deliveryType')='Delivery'" bounds="79,1124,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="ERPInterfaceServiceImpl insertBS_ERPIF_10887" type="invokebean" description="public static void insertBS_ERPIF_10887(java.lang.String SiteName, java.lang.String invoiceNo, java.lang.String eventName)" bounds="19,1243,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="insertBS_ERPIF_10887" operationDesc="public static void insertBS_ERPIF_10887(java.lang.String SiteName, java.lang.String invoiceNo, java.lang.String eventName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="invoiceNo" type="java.lang.String" />
                    <input constant="quxiao" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="300,1203,88,19">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <case name="case" type="case" condition="getVariable('deliveryType')='Reserve'" bounds="531,1130,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="ERPInterfaceServiceImpl insertBS_ERPINF_LG19" type="invokebean" description="public static void insertBS_ERPINF_LG19(java.lang.String SiteName, java.lang.String invoiceNo, java.lang.String flag)" bounds="502,1210,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="insertBS_ERPINF_LG19" operationDesc="public static void insertBS_ERPINF_LG19(java.lang.String SiteName, java.lang.String invoiceNo, java.lang.String flag)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="invoiceNo" type="java.lang.String" />
                    <input constant="1" type="java.lang.String" />
                </invoke>
            </case>
            <switchend name="switchend" type="switchend" bounds="272,1443,110,49">
                <source idx="0" terminal="8,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
            </switchend>
        </switch>
    </sequence>
</process>

