<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:bean="http://bean.boe.com/" xmlns:bpel="http://bpel.boe.com/" targetNamespace="http://bpel.boe.com/bpelj/" name="SMTStockIn.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="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
    </partnerLinks>
    <variables>
        <variable name="boaName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="checkresult" messageType="java.lang.String"></variable>
        <variable name="eventComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTCOMMENT')" />
        <variable name="eventInfo" messageType="com.cim.idm.framework.data.EventInfo"></variable>
        <variable name="eventUser" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/EVENTUSER')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="returnElement" messageType="org.jdom.Element"></variable>
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="SMTSender" messageType="java.lang.String"></variable>
        <variable name="SMTStockIn" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="SMTStockIn" bounds="70,30,140,75">
            <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="70,135,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="SMTStockIn" 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="MaterialPackingServiceImpl CheckMessageName_SMT" type="invokebean" description="public java.lang.String CheckMessageName_SMT(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="70,270,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="CheckMessageName_SMT" operationDesc="public java.lang.String CheckMessageName_SMT(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" ignoreThrow="false" fork="false">
            <source idx="0" terminal="5,A" />
            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
            <input variable="message" type="org.jdom.Document" />
            <output variable="checkresult" />
        </invoke>
        <switch name="switch" bounds="124,405,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="85,484,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('checkresult') = 'OK|0'" bounds="98,563,85,45">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl PDACreateBoxByLabelSMT" type="invokebean" description="public void PDACreateBoxByLabelSMT(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="70,638,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="PDACreateBoxByLabelSMT" operationDesc="public void PDACreateBoxByLabelSMT(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                    <input variable="message" type="org.jdom.Document" />
                </invoke>
                <expression name="expression" type="expression" bounds="70,773,141,65">
                    <source idx="0" terminal="5,A" />
                    <function value="setXmlData('message','/Message/Header/MESSAGENAME','SMTStockInReply')" />
                </expression>
                <invoke name="ESBService sendReplyBySender" type="invokebean" description="public void sendReplyBySender(String replySubject, org.jdom.Document doc, org.jdom.Element element, String senderName)&#xD;&#xA;&#x9;&#x9;throws java.lang.Exception" bounds="-8,868,296,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendReplyBySender" operationDesc="public void sendReplyBySender(String replySubject, org.jdom.Document doc, org.jdom.Element element, String senderName)&#xA;&#x9;&#x9;throws java.lang.Exception" 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 variable="returnElement" type="org.jdom.Element" />
                    <input constant="SMTSender" type="java.lang.String" />
                </invoke>
                <invoke name="ERPInterfaceServiceImpl erpInterface_PI056_SMT" type="invokebean" description="public void erpInterface_PI056_SMT(java.lang.String siteName, java.lang.String boxName, com.cim.idm.framework.data.EventInfo eventInfo)" bounds="70,1000,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_PI056_SMT" operationDesc="public void erpInterface_PI056_SMT(java.lang.String siteName, java.lang.String boxName, com.cim.idm.framework.data.EventInfo eventInfo)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="siteName" type="java.lang.String" />
                    <input variable="boaName" type="java.lang.String" />
                    <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                </invoke>
                <terminate name="terminate" bounds="70,1135,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="456,563,105,53">
                <source idx="0" terminal="5,A" />
                <invoke name="ESBService SMTsendReplyBySender" type="invokebean" description="public void sendReplyBySender(String replySubject, org.jdom.Document doc, org.jdom.Element element, String senderName)&#xD;&#xA;&#x9;&#x9;throws java.lang.Exception" bounds="360,646,296,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="SMTsendReplyBySender" operationDesc="public void SMTsendReplyBySender(java.lang.String replySubject, org.jdom.Document doc, java.lang.String senderName, java.lang.String checkresult)" 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="SMTSender" type="java.lang.String" />
                    <input variable="checkresult" type="java.lang.String" />
                </invoke>
            </otherwise>
        </switch>
    </sequence>
</process>

