<?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="RevertNPStockIn.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="MaterialPackingServiceUtil" partnerLinkType="bean:MaterialPackingServiceUtil" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingStockInImpl" partnerLinkType="bean:MaterialPackingStockInImpl" />
        <partnerLink name="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="acctype" messageType="java.lang.String"></variable>
        <variable name="erpEventTime" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVETIME')" />
        <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"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="index" messageType="int"></variable>
        <variable name="itemElement" messageType="org.jdom.Element"></variable>
        <variable name="itemList" messageType="java.util.List"></variable>
        <variable name="MakeMaterialPreScrapedDrift" messageType="java.lang.String"></variable>
        <variable name="MakeMaterialScrapedDrift" messageType="java.lang.String"></variable>
        <variable name="MakeReturnDrift" messageType="java.lang.String"></variable>
        <variable name="MakeUnship" messageType="java.lang.String"></variable>
        <variable name="materialPackingList" messageType="java.util.List"></variable>
        <variable name="materialPackingMakeUnScrappedInfo" messageType="com.cim.idm.wmspackage.materialpacking.management.info.MaterialPackingMakeUnScrappedInfo"></variable>
        <variable name="materialQuantity" messageType="java.lang.String"></variable>
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="messageid" messageType="java.lang.String"></variable>
        <variable name="newUnDoId" messageType="java.lang.String"></variable>
        <variable name="newUnDoList" messageType="java.util.List"></variable>
        <variable name="OICSender" messageType="java.lang.String"></variable>
        <variable name="reasonCode" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/UndoItemInfo/REASONCODE')" />
        <variable name="reasonCodeType" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/UndoItemInfo/REASONCODETYPE')" />
        <variable name="receiveActNo" messageType="java.lang.String"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="requestDetailName" messageType="java.lang.String"></variable>
        <variable name="requestDetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/REQUESTDETAILNAME')" />
        <variable name="requestName" messageType="java.lang.String"></variable>
        <variable name="requestNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/REQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/SITENAME')" />
        <variable name="siteNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/SITENAME')" />
        <variable name="unDoDetailName" messageType="java.lang.String"></variable>
        <variable name="unDoDetailNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/UNDODETAILNAME')" />
        <variable name="unDoFactoryNameList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/ERPFACTORY')" />
        <variable name="unDoId" messageType="java.lang.String"></variable>
        <variable name="unDoIdDateList" messageType="java.util.List" expression="getXmlDataList('message', '//Message/Body/UndoItemInfo/UNDOIDDATE')" />
    </variables>
    <sequence>
        <receive name="RevertNPStockIn" bounds="70,30,149,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,122,140,102" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
        </invoke>
        <expression name="expression" type="expression" bounds="74,254,140,62">
            <source idx="0" terminal="5,A" />
            <function value="setVariable('itemList', getElementList('message', '//Message/Body/UndoItemInfo'))" />
        </expression>
        <while name="while" bounds="128,346,32,49" type="2" collection="itemList" element="itemElement">
            <source idx="0" terminal="5,A" />
            <whilestart name="whilestart" type="whilestart" bounds="89,425,110,49">
                <source idx="0" terminal="5,A" />
            </whilestart>
            <expression name="expression" type="expression" bounds="74,504,140,62">
                <source idx="0" terminal="5,A" />
                <function value="setVariable('unDoId',getXmlData('message', '//Message/Body/UNDOID'))" />
                <function value="setVariable('materialQuantity',getXmlData('itemElement','//MATERIALQUANTITY'))" />
                <function value="setVariable('eventName',getXmlData('itemElement','//LASTEVENTNAME'))" />
                <function value="setVariable('unDoDetailName',getXmlData('itemElement','//UNDODETAILNAME'))" />
            </expression>
            <invoke name="MaterialPackingServiceUtil checkUnDoCondition" type="invokebean" description="public boolean checkUnDoCondition(java.lang.String siteName, java.lang.String unDoID, java.lang.String materialQuantity, java.lang.String unDoDetailName, java.lang.String eventName)" bounds="60,596,168,102" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="checkUnDoCondition" operationDesc="public boolean checkUnDoCondition(java.lang.String siteName, java.lang.String unDoID, java.lang.String materialQuantity, java.lang.String unDoDetailName, 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="materialQuantity" type="java.lang.String" />
                <input variable="unDoDetailName" type="java.lang.String" />
                <input variable="eventName" type="java.lang.String" />
            </invoke>
            <whileend name="whileend" type="whileend" bounds="89,718,110,49">
                <source idx="0" terminal="5,A" />
            </whileend>
        </while>
        <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="62,797,165,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="MakeUnStockIn" type="java.lang.String" />
            <input variable="eventUser" type="java.lang.String" />
            <input variable="eventComment" type="java.lang.String" />
            <input variable="reasonCodeType" type="java.lang.String" />
            <input variable="reasonCode" type="java.lang.String" />
            <output variable="eventInfo" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl GetMessageID" type="invokebean" description="public java.lang.String GetMessageID(java.lang.String sitename)" bounds="74,929,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="GetMessageID" operationDesc="public java.lang.String GetMessageID(java.lang.String sitename)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="siteName" type="java.lang.String" />
            <output variable="messageid" />
        </invoke>
        <invoke name="ERPInterfaceServiceImpl erpInterface_WMS22" type="invokebean" description="public static java.util.List erpInterface_WMS22(java.lang.String unDoID, java.util.List unDoDetailNameList, java.util.List unDoIdDateList, java.util.List unDoFactoryNameList, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID)" bounds="74,1064,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_WMS22" operationDesc="public static java.util.List erpInterface_WMS22(java.lang.String unDoID, java.util.List unDoDetailNameList, java.util.List unDoIdDateList, java.util.List unDoFactoryNameList, java.lang.String erpEventTime, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String messageID)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="unDoId" type="java.lang.String" />
            <input variable="unDoDetailNameList" type="java.util.List" />
            <input variable="unDoIdDateList" type="java.util.List" />
            <input variable="unDoFactoryNameList" type="java.util.List" />
            <input variable="erpEventTime" type="java.lang.String" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="messageid" type="java.lang.String" />
            <output variable="newUnDoList" />
        </invoke>
        <invoke name="MaterialPackingStockInImpl SaveMessageIDToMaterialPackingUsedByUnDO" type="invokebean" description="public void SaveMessageIDToMaterialPackingUsedByUnDO(java.lang.String unDoID, java.util.List unDoDetailNameList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String sitename, java.lang.String messageid)" bounds="74,1199,141,105" partnerLink="MaterialPackingStockInImpl" partnerLinkType="MaterialPackingStockInImpl" operation="SaveMessageIDToMaterialPackingUsedByUnDO" operationDesc="public void SaveMessageIDToMaterialPackingUsedByUnDO(java.lang.String unDoID, java.util.List unDoDetailNameList, com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String sitename, java.lang.String messageid)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="unDoId" type="java.lang.String" />
            <input variable="unDoDetailNameList" type="java.util.List" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="siteName" type="java.lang.String" />
            <input variable="messageid" type="java.lang.String" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1334,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="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="74,1469,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="MaterialPackingServiceImpl RevertNPStockIn" type="invokebean" description="public void RevertNPStockIn(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List newUnDoList, java.lang.String UnDoID, java.lang.String erpEventTime, java.util.List siteNameList, java.util.List unDoDetailNameList)" bounds="74,1604,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="RevertNPStockIn" operationDesc="public void RevertNPStockIn(com.cim.idm.framework.data.EventInfo eventInfo, java.util.List newUnDoList, java.lang.String UnDoID, java.lang.String erpEventTime, java.util.List siteNameList, java.util.List unDoDetailNameList)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="newUnDoList" type="java.util.List" />
            <input variable="unDoId" type="java.lang.String" />
            <input variable="erpEventTime" type="java.lang.String" />
            <input variable="siteNameList" type="java.util.List" />
            <input variable="unDoDetailNameList" type="java.util.List" />
        </invoke>
        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="74,1739,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="74,1874,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>
        <terminate name="terminate" bounds="74,2009,141,65">
            <source idx="0" terminal="5,A" />
        </terminate>
    </sequence>
</process>

