<?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="Cancel.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="MaterialPackingServiceUtil" partnerLinkType="bean:MaterialPackingServiceUtil" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="MaterialShipRequestServiceUtil" partnerLinkType="bean:MaterialShipRequestServiceUtil" />
        <partnerLink name="MaterialShipRequestServiceImpl" partnerLinkType="bean:MaterialShipRequestServiceImpl" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="acctype" messageType="java.lang.String"></variable>
        <variable name="CancelStockIn" messageType="java.lang.String"></variable>
        <variable name="Confirmed" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/REACODE')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/LASTEVENTNAME')" />
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="MakeMaterialScrapedDrift" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageid" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MESSAGEID')" />
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="reasonCodeType" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="requestName" messageType="java.lang.String"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="unDoDetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/UNDODETAILNAME')" />
        <variable name="unDoId" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MESSAGEID')" />
    </variables>
    <sequence>
        <receive name="Cancel" bounds="446,30,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="MaterialPackingServiceUtil checkCancelCondition" type="invokebean" description="public boolean checkCancelCondition(java.lang.String siteName, java.lang.String unDoID, java.lang.String eventName)" bounds="432,135,168,102" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="checkCancelCondition" operationDesc="public boolean checkCancelCondition(java.lang.String siteName, java.lang.String unDoID, java.lang.String eventName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="unDoId" type="java.lang.String" />
            <input variable="eventName" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="446,267,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <switch name="switch" bounds="500,402,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="461,481,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('eventName') ='RefundStockIn'&#xA; or &#xA;getVariable('eventName') ='NormalStockIn'&#xA; or &#xA;getVariable('eventName') ='BMDTOEMStockIn'&#xA; or &#xA;getVariable('eventName') ='PONormalStockIn'" bounds="110,560,60,58">
                <source idx="0" terminal="5,A" />
                <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="59,648,162,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="CancelStockIn" 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="MaterialPackingStockInImpl GetCancelActType" type="invokebean" description="public java.lang.String GetCancelActType(java.lang.String UnDoID, java.lang.String siteName)" bounds="70,780,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetCancelActType" operationDesc="public java.lang.String GetCancelActType(java.lang.String UnDoID, java.lang.String siteName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="unDoId" type="java.lang.String" />
                    <input variable="siteName" type="java.lang.String" />
                    <output variable="acctype" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl GetCancelReceiveActNo" type="invokebean" description="public java.lang.String GetCancelReceiveActNo(java.lang.String UnDoID, java.lang.String siteName)" bounds="70,915,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetCancelReceiveActNo" operationDesc="public java.lang.String GetCancelReceiveActNo(java.lang.String UnDoID, java.lang.String siteName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="unDoId" type="java.lang.String" />
                    <input variable="siteName" type="java.lang.String" />
                    <output variable="receiveActNo" />
                </invoke>
                <invoke name="MaterialPackingStockInImpl makeStockInCancel" type="invokebean" description="public void makeStockInCancel(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String UnDoID, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String acttype)" bounds="70,1050,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="makeStockInCancel" operationDesc="public void makeStockInCancel(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String UnDoID, java.lang.String siteName, java.lang.String receiveActNo, java.lang.String acttype)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="unDoId" type="java.lang.String" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                    <input variable="acctype" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('eventName') ='CompleteShipRequest'&#xD;&#xA;or&#xD;&#xA;getVariable('eventName') ='PDAStockOut'&#xD;&#xA;or&#xD;&#xA;getVariable('eventName') ='PreShipRequestDetailStockOut'" bounds="325,560,60,31">
                <source idx="0" terminal="5,A" />
                <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="274,621,162,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="CancelStockOut" 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="MaterialShipRequestServiceUtil getMaterialShiprequestByUndoID" type="invokebean" description="public java.lang.String getMaterialShiprequestByUndoID(java.lang.String UndoID)" bounds="285,888,141,105" partnerLink="MaterialShipRequestServiceUtil" partnerLinkType="MaterialShipRequestServiceUtil" operation="getMaterialShiprequestByUndoID" operationDesc="public java.lang.String getMaterialShiprequestByUndoID(java.lang.String UndoID)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="unDoId" type="java.lang.String" />
                    <output variable="requestName" />
                </invoke>
                <invoke name="MaterialShipRequestServiceImpl updateComplete" type="invokebean" description="public void updateComplete(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String invoiceNo, java.lang.String shipRequestState)" bounds="285,1023,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="updateComplete" operationDesc="public void updateComplete(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="requestName" type="java.lang.String" />
                    <input constant="Created" type="java.lang.String" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl cancelStockOut" type="invokebean" description="public void cancelStockOut(com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String Undoid, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String receiveActNo)" bounds="285,1158,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="cancelStockOut" operationDesc="public void cancelStockOut(com.cim.idm.framework.data.EventInfo eventinfo, java.lang.String Undoid, java.lang.String siteName, java.lang.String shipRequestName, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="unDoId" type="java.lang.String" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="requestName" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('eventName') ='StockOutToOEM'&#xD;&#xA;or&#xD;&#xA;getVariable('eventName') ='PDAStockOutToOEM'" bounds="486,560,60,34">
                <source idx="0" terminal="5,A" />
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="606,560,88,19">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="461,1283,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
                <source idx="3" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="MaterialPackingStockInImpl cancelMessageLog" type="invokebean" description="public void cancelMessageLog(java.lang.String messageID)" bounds="446,1362,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="cancelMessageLog" operationDesc="public void cancelMessageLog(java.lang.String messageID)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="unDoId" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="435,1497,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="446,1630,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>

