<?xml version="1.0" encoding="GBK"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="ResendToPMS.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="MaterialPackingServiceUtil" partnerLinkType="bean:MaterialPackingServiceUtil" />
    </partnerLinks>
    <variables>
        <variable name="boxList" messageType="java.util.List"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="PMSSender" messageType="java.lang.String"></variable>
        <variable name="receiveActNo" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/RECEIVEACTNO')" />
        <variable name="replaySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="sendFlag" messageType="java.lang.String"></variable>
        <variable name="shiprequestName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SHIPREQUESTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="toPMSMessage" messageType="org.jdom.Document"></variable>
    </variables>
    <sequence>
        <receive name="ResendToPMS" bounds="70,30,149,62">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <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,122,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 constant="ResendToPMS" 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" />
        </invoke>
        <switch name="switch" bounds="128,257,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="89,336,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('siteName') = 'B4'&#xD;&#xA; or getVariable('siteName') = 'B3'" bounds="114,415,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl MessageForPMS" type="invokebean" description="public org.jdom.Document MessageForPMS(java.lang.String siteName, java.lang.String shiprequestName, java.lang.String receiveActno)" bounds="74,464,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="MessageForPMS" operationDesc="public org.jdom.Document MessageForPMS(java.lang.String siteName, java.lang.String shiprequestName, java.lang.String receiveActno)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="shiprequestName" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                    <output variable="toPMSMessage" />
                </invoke>
                <invoke name="ESBService sendByMesSender" type="invokebean" description="public static void sendByMesSender(org.jdom.Document doc, java.lang.String senderName)" bounds="74,599,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendByMesSender" operationDesc="public static void sendByMesSender(org.jdom.Document doc, java.lang.String senderName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="toPMSMessage" type="org.jdom.Document" />
                    <input constant="PMSSender" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="305,415,88,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceUtil getPackingListForPMS" type="invokebean" description="public java.util.List getPackingListForPMS(java.lang.String invoiceNo, java.lang.String receiveActNo)" bounds="279,464,141,105" partnerLink="MaterialPackingServiceUtil" partnerLinkType="MaterialPackingServiceUtil" operation="getPackingListForPMS" operationDesc="public java.util.List getPackingListForPMS(java.lang.String invoiceNo, java.lang.String receiveActNo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="shiprequestName" type="java.lang.String" />
                    <input variable="receiveActNo" type="java.lang.String" />
                    <output variable="boxList" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl createMessageForPMS" type="invokebean" description="public org.jdom.Document createMessageForPMS(java.lang.String siteName, java.util.List materialPackingKeyList)" bounds="279,599,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="createMessageForPMS" operationDesc="public org.jdom.Document createMessageForPMS(java.lang.String siteName, java.util.List materialPackingKeyList)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="boxList" type="java.util.List" />
                    <output variable="toPMSMessage" />
                </invoke>
                <invoke name="ESBService sendByMesSender" type="invokebean" description="public static void sendByMesSender(org.jdom.Document doc, java.lang.String senderName)" bounds="279,734,141,105" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendByMesSender" operationDesc="public static void sendByMesSender(org.jdom.Document doc, java.lang.String senderName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="toPMSMessage" type="org.jdom.Document" />
                    <input constant="PMSSender" type="java.lang.String" />
                </invoke>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="89,859,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
            </switchend>
        </switch>
        <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName)" bounds="74,938,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="replaySubjectName" type="java.lang.String" />
            <input variable="message" type="org.jdom.Document" />
            <input constant="OICSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

