<?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="dispatching.bpel">
    <partnerLinks>
        <partnerLink name="bpelj" partnerLinkType="bpel:bpelj" />
        <partnerLink name="BpelExRepository" partnerLinkType="bean:BpelExRepository" />
        <partnerLink name="BpelExecuter" partnerLinkType="bean:BpelExecuter" />
        <partnerLink name="ESBService" partnerLinkType="bean:ESBService" />
    </partnerLinks>
    <variables>
        <variable name="error" messageType="java.lang.Exception"></variable>
        <variable name="lanuage" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/LANGUAGE')" />
        <variable name="message" messageType="org.jdom.Document"></variable>
        <variable name="msg" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/MESSAGENAME')" />
        <variable name="replySubjectName" messageType="java.lang.String" expression="getXmlData('message', '//Message/Header/ORIGINALSOURCESUBJECTNAME')" />
        <variable name="sendSubjectName" messageType="java.lang.String"></variable>
        <variable name="serverName" messageType="java.lang.String"></variable>
    </variables>
    <sequence>
        <receive name="dispatching{SEQ}0" bounds="423,30,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <switch name="switch" bounds="477,135,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="438,214,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getVariable('msg')='StopWatcherAll'" bounds="124,293,32,49">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExRepository stopWatcherAll" type="invokebean" description="public void stopWatcherAll(String temp)" bounds="70,372,140,102" partnerLink="BpelExRepository" partnerLinkType="BpelExRepository" operation="stopWatcherAll" operationDesc="public void stopWatcherAll(String temp)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input constant="temp" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('msg')='StartWatcherAll'" bounds="300,293,32,49">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExRepository startWatcherAll" type="invokebean" description="public void startWatcherAll(String temp)" bounds="246,372,140,102" partnerLink="BpelExRepository" partnerLinkType="BpelExRepository" operation="startWatcherAll" operationDesc="public void startWatcherAll(String temp)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input constant="temp" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('msg')='RequestUnixProcessState'" bounds="477,293,32,49">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExecuter replyForEvisor" type="invokebean" description="public org.jdom.Document replyForEvisor(org.jdom.Document doc)" bounds="423,372,140,102" partnerLink="BpelExecuter" partnerLinkType="BpelExecuter" operation="replyForEvisor" operationDesc="public org.jdom.Document replyForEvisor(org.jdom.Document doc)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="message" type="org.jdom.Document" />
                    <output variable="message" />
                </invoke>
                <invoke name="ESBService sendBySender" type="invokebean" description="public void sendBySender(org.jdom.Document doc, String senderName)" bounds="422,504,143,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendBySender" operationDesc="public void sendBySender(org.jdom.Document doc, String senderName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="message" type="org.jdom.Document" />
                    <input constant="EvisorSender" type="java.lang.String" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('msg')='TerminateAfterManagement'" bounds="671,293,32,49">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="617,372,140,62">
                    <source idx="0" terminal="5,A" />
                    <function value="setVariable('serverName',getXmlData('message','//Body/SERVERNAME'))" />
                </expression>
                <invoke name="BpelExecuter terminateAfterManagement" type="invokebean" description="public void terminateAfterManagement(String serverName)" bounds="601,464,172,102" partnerLink="BpelExecuter" partnerLinkType="BpelExecuter" operation="terminateAfterManagement" operationDesc="public void terminateAfterManagement(String serverName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="serverName" type="java.lang.String" />
                </invoke>
            </case>
            <otherwise name="otherwise" type="otherwise" bounds="1052,293,61,49">
                <source idx="0" terminal="5,A" />
                <switch name="switch{SEQ}1" bounds="1066,372,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="1027,451,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getVariable('msg') = 'GetQueryResult'" bounds="890,530,32,49">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService getSendSubject" type="invokebean" description="public String getSendSubject(String serverName)" bounds="836,609,140,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="getSendSubject" operationDesc="public String getSendSubject(String serverName)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="QRYsvr" type="java.lang.String" />
                            <output variable="sendSubjectName" />
                        </invoke>
                    </case>
                    <case name="case" type="case" condition="getVariable('msg') = 'TransportCommandRequest'&#xA; or getVariable('msg') = 'TransportCommandCancelRequest'&#xA; or getVariable('msg') = 'TransportCommandChangeDest'&#xA; or getVariable('msg') = 'AdjustTrayInfoRequest'&#xA; or getVariable('msg') = 'ShelfInfoRequest'&#xA; or getVariable('msg') = 'InitialMachineDataRequest'&#xA; or getVariable('msg') = 'InitialShelfDataRequest'&#xA; or getVariable('msg') = 'AbnormalInOutInfoRequest'" bounds="1066,530,32,49">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService getSendSubject" type="invokebean" description="public String getSendSubject(String serverName)" bounds="1012,609,140,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="getSendSubject" operationDesc="public String getSendSubject(String serverName)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="AWXsvr" type="java.lang.String" />
                            <output variable="sendSubjectName" />
                        </invoke>
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="1242,530,61,49">
                        <source idx="0" terminal="5,A" />
                        <invoke name="ESBService getSendSubject" type="invokebean" description="public String getSendSubject(String serverName)" bounds="1202,609,140,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="getSendSubject" operationDesc="public String getSendSubject(String serverName)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input constant="CNXsvr" type="java.lang.String" />
                            <output variable="sendSubjectName" />
                        </invoke>
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="1050,731,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                        <source idx="2" terminal="5,A" />
                    </switchend>
                </switch>
                <switch name="switch" bounds="1089,810,33,33" type="switch">
                    <source idx="0" terminal="5,A" />
                    <switchstart name="switchstart" type="switchstart" bounds="1050,889,110,49">
                        <source idx="0" terminal="5,A" />
                    </switchstart>
                    <case name="case" type="case" condition="getXmlData('message', '//Message/Header/MESSAGENAME') = 'UserLogin'&#xD;&#xA;or&#xD;&#xA;getXmlData('message', '//Message/Header/MESSAGENAME') = 'UserLogout'" bounds="1066,968,32,49">
                        <source idx="0" terminal="5,A" />
                    </case>
                    <otherwise name="otherwise" type="otherwise" bounds="1098,968,61,49">
                        <source idx="0" terminal="5,A" />
                        <invoke name="BpelExecuter insertMessageLog" type="invokebean" description="public static void insertMessageLog(org.jdom.Document doc, java.lang.String serverName)" bounds="1058,1047,140,102" partnerLink="BpelExecuter" partnerLinkType="BpelExecuter" operation="insertMessageLog" operationDesc="public static void insertMessageLog(org.jdom.Document doc, java.lang.String serverName)" ignoreThrow="false" fork="false">
                            <source idx="0" terminal="5,A" />
                            <input variable="message" type="org.jdom.Document" />
                            <input constant="CNMsvr" type="java.lang.String" />
                        </invoke>
                    </otherwise>
                    <switchend name="switchend" type="switchend" bounds="1050,1169,110,49">
                        <source idx="0" terminal="5,A" />
                        <source idx="1" terminal="5,A" />
                    </switchend>
                </switch>
                <invoke name="ESBService sendBySender" type="invokebean" description="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" bounds="1022,1248,166,102" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendBySender" operationDesc="public void sendBySender(java.lang.String replySubject, org.jdom.Document doc, org.jdom.Element element, java.lang.String senderName)" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="sendSubjectName" />
                    <input variable="message" />
                    <input constant="GenericSender" type="java.lang.String" />
                </invoke>
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="438,1370,110,49">
                <source idx="0" terminal="5,A" />
                <source idx="1" terminal="5,A" />
                <source idx="2" terminal="5,A" />
                <source idx="3" terminal="5,A" />
                <source idx="4" terminal="5,A" />
            </switchend>
        </switch>
        <terminate name="terminate" bounds="423,1449,140,62">
            <source idx="0" terminal="5,A" />
        </terminate>
    </sequence>
</process>

