<?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="CancelReserveShipRequest.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="assignedBoxCount" messageType="int"></variable>
        <variable name="CancelReserveShipRequest" messageType="org.jdom.Document"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Header/EVENTUSER')" />
        <variable name="Language" messageType="java.lang.String"></variable>
        <variable name="messagename" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Header/MESSAGENAME')" />
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="replysubjectname" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="shipRequestName" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="shipRequestState" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Body/SHIPREQUESTSTATE')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('CancelReserveShipRequest', '//Message/Body/SITENAME')" />
    </variables>
    <sequence>
        <receive name="CancelReserveShipRequest" bounds="163,30,149,62">
            <input variable="CancelReserveShipRequest" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="167,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="167,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 cancelReserve" type="invokebean" description="public void cancelReserve(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String siteName, java.lang.String shipRequestName)" bounds="167,392,141,105" partnerLink="MaterialShipRequestServiceImpl" partnerLinkType="MaterialShipRequestServiceImpl" operation="cancelReserve" operationDesc="public void cancelReserve(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>
        <invoke name="ESBService sendBySender" type="invokebean" description="public void sendBySender(java.lang.String subject, org.jdom.Document doc, java.lang.String senderName)" bounds="167,527,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendBySender" operationDesc="public void sendBySender(java.lang.String subject, org.jdom.Document doc, java.lang.String senderName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="replysubjectname" />
            <input variable="CancelReserveShipRequest" />
            <input variable="returnElement" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="167,662,141,105" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()">
            <source idx="0" terminal="5,A" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl queryAssignedBoxCount" type="invokebean" description="public int queryAssignedBoxCount(java.lang.String siteName, java.lang.String shipRequestName)" bounds="167,797,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="queryAssignedBoxCount" operationDesc="public int queryAssignedBoxCount(java.lang.String siteName, java.lang.String shipRequestName)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="shipRequestName" type="java.lang.String" />
            <output variable="assignedBoxCount" />
        </invoke>
        <switch name="switch" bounds="221,932,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="182,1011,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('assignedBoxCount') = 0" bounds="109,1090,70,62">
                <source idx="0" terminal="5,A" />
                <invoke name="ERPInterfaceServiceImpl sendAssignInfo" type="invokebean" description="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" bounds="74,1182,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="sendAssignInfo" operationDesc="public static java.util.List sendAssignInfo(java.lang.String siteName, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID, java.lang.String receiveActNo, java.lang.String shipRequestName, java.lang.String jpFlag)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input constant="" type="java.lang.String" />
                    <input constant="" type="java.lang.String" />
                    <input variable="shipRequestName" type="java.lang.String" />
                    <input constant="00" type="java.lang.String" />
                    <output variable="assignedBoxCount" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="283,1090,96,72">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="182,1307,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
    </sequence>
</process>

