<?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="SMTChangeQualityStatus.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="ERPInterfaceServiceImpl" partnerLinkType="bean:ERPInterfaceServiceImpl" />
        <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="checkresultTransact" 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="materialPackingName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALPACKINGNAME')" />
        <variable name="materialSpecName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALSPECNAME')" />
        <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/Header/SITENAME')" />
        <variable name="SMTChangeOKToNG" messageType="org.jdom.Document"></variable>
        <variable name="SMTSender" messageType="java.lang.String"></variable>
        <variable name="sqeComment" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/MATERIALTYPE')" />
    </variables>
    <sequence>
        <receive name="SMTChangeQualityStatus" bounds="780,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="780,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="SMTChangeQualityStatus" 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="834,270,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="795,349,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('sqeComment') = 'OKToNG'&#xD;&#xA;or getVariable('sqeComment') = 'NGToOK'" bounds="512,428,60,63">
                <source idx="0" terminal="5,A" />
                <invoke name="MaterialPackingServiceImpl CheckTransactionID_SMT" type="invokebean" description="public java.lang.String CheckTransactionID_SMT(com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="472,521,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="CheckTransactionID_SMT" operationDesc="public java.lang.String CheckTransactionID_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="checkresultTransact" />
                </invoke>
                <switch name="switch" bounds="526,656,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="487,735,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('checkresultTransact') = 'OK|0'" bounds="253,814,66,54">
                        <source idx="0" terminal="5,A" />
                        <invoke name="MaterialPackingServiceImpl checkStorageStatus" type="invokebean" description="public java.lang.String checkStorageStatus(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String materialPackingName, java.lang.String sqeComment, java.lang.String siteName, java.lang.String materialSpecName)" bounds="216,898,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="checkStorageStatus" operationDesc="public java.lang.String checkStorageStatus(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String materialPackingName, java.lang.String sqeComment, java.lang.String siteName, java.lang.String materialSpecName)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="eventInfo" type="com.cim.idm.framework.data.EventInfo" />
                            <input variable="materialPackingName" type="java.lang.String" />
                            <input variable="sqeComment" type="java.lang.String" />
                            <input variable="siteName" type="java.lang.String" />
                            <input variable="materialSpecName" type="java.lang.String" />
                            <output variable="checkresult" />
                        </invoke>
                        <switch name="switch" bounds="270,1033,33,33" type="switch">
                            <source idx="0" terminal="5,A" />
                            <switchstart name="switchstart" type="switchstart" bounds="231,1112,110,49">
                                <source idx="0" terminal="5,A" />
                            </switchstart>
                            <case name="case" type="case" condition="getVariable('checkresult') = 'OK|0'" bounds="105,1191,71,59">
                                <source idx="0" terminal="5,A" />
                                <invoke name="TransactionUtil beginTransaction" type="invokebean" description="public void beginTransaction()" bounds="61,1280,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 SMTChangeQualityStatus" type="invokebean" description="public void SMTChangeQualityStatus(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String materialPackingName, java.lang.String sqeComment, java.lang.String siteName, org.jdom.Document message)" bounds="70,1416,141,105" partnerLink="MaterialPackingServiceImpl" partnerLinkType="MaterialPackingServiceImpl" operation="SMTChangeQualityStatus" operationDesc="public void SMTChangeQualityStatus(com.cim.idm.framework.data.EventInfo eventInfo, java.lang.String materialPackingName, java.lang.String sqeComment, java.lang.String siteName, 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="materialPackingName" type="java.lang.String" />
                                    <input variable="sqeComment" type="java.lang.String" />
                                    <input variable="siteName" type="java.lang.String" />
                                    <input variable="message" type="org.jdom.Document" />
                                </invoke>
                                <invoke name="ERPInterfaceServiceImpl erpInterface_PI056_SMT_NewManner" type="invokebean" description="public void erpInterface_PI056_SMT_NewManner(java.lang.String siteName, java.lang.String boxName, com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" bounds="70,1551,141,105" partnerLink="ERPInterfaceServiceImpl" partnerLinkType="ERPInterfaceServiceImpl" operation="erpInterface_PI056_SMT_NewManner" operationDesc="public void erpInterface_PI056_SMT_NewManner(java.lang.String siteName, java.lang.String boxName, com.cim.idm.framework.data.EventInfo eventInfo, org.jdom.Document message)" 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" />
                                    <input variable="message" type="org.jdom.Document" />
                                </invoke>
                                <invoke name="TransactionUtil commitTransaction" type="invokebean" description="public void commitTransaction()" bounds="59,1686,162,103" 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="70,1819,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="SMTSender" type="java.lang.String" />
                                </invoke>
                                <terminate name="terminate" bounds="70,1954,141,65">
                                    <source idx="0" terminal="5,A" />
                                </terminate>
                            </case>
                            <otherwise name="otherwise" type="otherwise" bounds="389,1191,88,55">
                                <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="285,1276,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>
                                <terminate name="terminate" bounds="363,1408,141,65">
                                    <source idx="0" terminal="5,A" />
                                </terminate>
                            </otherwise>
                        </switch>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="749,814,101,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="651,897,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="checkresultTransact" type="java.lang.String" />
                        </invoke>
                        <terminate name="terminate" bounds="729,1029,141,65">
                            <source idx="0" terminal="5,A" />
                        </terminate>
                    </otherwise>
                </switch>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="1115,428,88,49">
                <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="1011,507,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 constant="MATERIALTYPE IS WRONG!!|ERROR" type="java.lang.String" />
                </invoke>
                <terminate name="terminate" bounds="1089,639,141,65">
                    <source idx="0" terminal="5,A" />
                </terminate>
            </otherwise>
        </switch>
    </sequence>
</process>

