<?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="SMTDynamicInfoReceiver.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="EventInfoUtil" partnerLinkType="bean:EventInfoUtil" />
        <partnerLink name="MaterialPackingServiceImpl" partnerLinkType="bean:MaterialPackingServiceImpl" />
        <partnerLink name="TransactionUtil" partnerLinkType="bean:TransactionUtil" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </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="checkresultSpec" messageType="java.lang.String"></variable>
        <variable name="checkresultTray" 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="materialtype" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/MATERIALTYPE')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="siteName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/SITENAME')" />
        <variable name="SMTSender" messageType="java.lang.String"></variable>
        <variable name="trayName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/TRAYNAME')" />
    </variables>
    <sequence>
        <receive name="SMTDynamicInfoReceiver" bounds="798,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="798,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="SMTDynamicInfoReceiver" 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>
        <switch name="switch" bounds="852,270,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="813,349,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('materialtype') = 'SMTWAREHOUSEINVENTORY'" bounds="257,428,68,49">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl CheckSMTWarehouseInventoryInfo" type="invokebean" description="public java.lang.String CheckSMTWarehouseInventoryInfo(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="221,507,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="CheckSMTWarehouseInventoryInfo" operationDesc="public java.lang.String CheckSMTWarehouseInventoryInfo(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="checkresultSpec" />
                </invoke>
                <switch name="switch" bounds="275,642,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="236,721,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('checkresultSpec') = 'OK|0'" bounds="80,800,121,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="61,884,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingServiceImpl CreateSMTWarehouseInventoryInfo" type="invokebean" description="public void CreateSMTWarehouseInventoryInfo(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="70,1020,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="CreateSMTWarehouseInventoryInfo" operationDesc="public void CreateSMTWarehouseInventoryInfo(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>
                        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="59,1155,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="389,800,109,57">
                        <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="295,887,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="checkresultSpec" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="373,1019,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <case name="case" type="case" condition="getVariable('materialtype') = 'PCBATrayInfo'" bounds="838,428,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl checkSMTTray" type="invokebean" description="public java.lang.String checkSMTTray(org.jdom.Document message)" bounds="798,477,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="checkSMTTray" operationDesc="public java.lang.String checkSMTTray(org.jdom.Document message)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="message" type="org.jdom.Document" />
                    <output variable="checkresultTray" />
                </invoke>
                <switch name="switch" bounds="852,612,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="813,691,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('checkresultTray') = 'OK|0'" bounds="692,770,60,19">
                        <source idx="0" terminal="5,A" />
                        <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="643,819,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                        <invoke name="MaterialPackingServiceImpl updateDrablePCBATray" type="invokebean" description="public void updateDrablePCBATray(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="652,955,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="updateDrablePCBATray" operationDesc="public void updateDrablePCBATray(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>
                        <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="641,1090,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="971,770,88,19">
                        <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="867,819,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="1,A" />
                            <input variable="replySubjectName" type="java.lang.String" />
                            <input variable="message" type="org.jdom.Document" />
                            <input constant="SMTSender" type="java.lang.String" />
                            <input variable="checkresultTray" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="945,951,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="1264,428,90,51">
                <source idx="0" terminal="5,A" />
                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="1230,509,158,106" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="beginTransaction" operationDesc="public void beginTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
                <invoke name="MaterialPackingServiceImpl CreateSMTReportInfo" type="invokebean" description="public void CreateSMTReportInfo(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="1239,645,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="CreateSMTReportInfo" operationDesc="public void CreateSMTReportInfo(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>
                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="1228,780,162,103" partnerLink="TransactionUtil" partnerLinkType="TransactionUtil" operation="commitTransaction" operationDesc="public void commitTransaction()" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                </invoke>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="236,1278,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
            </switchend>
        </switch>
        <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="143,1357,296,102" 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="SMTSender" type="java.lang.String" />
        </invoke>
    </sequence>
</process>

