<?xml version="1.0" encoding="euc-kr"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="CancelConfirmShipRequest.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="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="0" messageType="java.lang.String"></variable>
        <variable name="CancelConfirmShipRequest" messageType="org.jdom.Document"></variable>
        <variable name="Confirmed" messageType="java.lang.String"></variable>
        <variable name="Deliverytype" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Body/DELIVERYTYPE')" />
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Header/EVENTUSER')" />
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Header/MESSAGENAME')" />
        <variable name="MID0001" messageType="java.lang.String"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="ReserveShipRequest" messageType="org.jdom.Document"></variable>
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="shipRequestState" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Body/SHIPREQUESTSTATE')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('CancelConfirmShipRequest', '//Message/Body/SITENAME')" />
    </variables>
    <sequence>
        <receive name="CancelConfirmShipRequest" bounds="70,30,149,62">
            <input variable="CancelConfirmShipRequest" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,122,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
            <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="74,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 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="MaterialShipRequestServiceImpl getShipRequest" type="invokebean" description="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" bounds="74,392,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="getShipRequest" operationDesc="public com.cim.idm.wmspackage.materialshiprequest.management.data.MaterialShipRequest getShipRequest(java.lang.String siteName, java.lang.String invoiceNo)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
        </invoke>
        <invoke name="MaterialShipRequestServiceImpl MakeCancelConfirm" type="invokebean" description="public void MakeCancelConfirm(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" bounds="74,527,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="MakeCancelConfirm" operationDesc="public void MakeCancelConfirm(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" 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="Reserved" type="java.lang.String" />
        </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,662,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="CancelConfirmShipRequest" 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="74,797,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="128,932,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="89,1011,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('Deliverytype') = 'Delivery'" bounds="114,1090,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1139,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="ERPInterfaceServiceImpl erp_StockOut_WMS05ForERPAccount" type="invokebean" description="public static java.util.List erp_StockOut_WMS05ForERPAccount(java.lang.String invoiceNo, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String flag, java.lang.String messageID, java.lang.String ErpEventTime)" bounds="74,1274,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erp_StockOut_WMS05ForERPAccount" operationDesc="public static java.util.List erp_StockOut_WMS05ForERPAccount(java.lang.String invoiceNo, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String flag, java.lang.String messageID, java.lang.String ErpEventTime)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input constant="0" type="java.lang.String" />
                    <input constant="MID0001" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                </invoke>
                <invoke name="ERPInterfaceServiceImpl updateERPStateForCacelShip" type="invokebean" description="public static void updateERPStateForCacelShip(java.lang.String invoiceNo)" bounds="74,1409,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="updateERPStateForCacelShip" operationDesc="public static void updateERPStateForCacelShip(java.lang.String invoiceNo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="shipRequestName" type="java.lang.String" />
                </invoke>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1544,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
                    <source idx="0" terminal="5,A" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="279,1090,88,19">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="89,1669,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
    </sequence>
</process>

