<?xml version="1.0" encoding="euc-kr"?>
<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="ESBService" partnerLinkType="bean:ESBService" />
        <partnerLink name="BpelExRepository" partnerLinkType="bean:BpelExRepository" />
        <partnerLink name="BpelExecuter" partnerLinkType="bean:BpelExecuter" />
    </partnerLinks>
    <variables>
        <variable name="error" messageType="java.lang.Exception"></variable>
        <variable name="language" messageType="java.lang.String" expression="getXmlData('message', '//Message/Body/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="serverName" messageType="java.lang.String"></variable>
    </variables>
    <note name="note" bounds="239,81,149,-1">?? msg ? ?? Exception Throw ?? Activity ?? ?? (?? Activity ???)</note>
    <faultHandlers name="faultHandlers" bounds="754,23,272,220">
        <catchAll name="catchAll" type="catchAll" bounds="10,34,243,157">
            <invoke name="ESBService sendErrorBySender" type="invokebean" description="public void sendErrorBySender(String replySubject, org.jdom.Document doc, String lanuage, Exception e, String senderName)" bounds="61,36,101,71" partnerLink="ESBService" partnerLinkType="ESBService" operation="sendErrorBySender" operationDesc="public void sendErrorBySender(String replySubject, org.jdom.Document doc, String lanuage, Exception e, String senderName)" ignoreThrow="false" fork="false">
                <input variable="replySubjectName" type="java.lang.String" />
                <input variable="message" type="org.jdom.Document" />
                <input variable="language" type="java.lang.String" />
                <input variable="error" type="java.lang.Exception" />
                <input constant="OICSender" type="java.lang.String" />
            </invoke>
        </catchAll>
    </faultHandlers>
    <sequence>
        <receive name="dispatching{SEQ}0" bounds="26,5,140,75">
            <input variable="message" type="org.jdom.Document" />
        </receive>
        <switch name="switch{SEQ}1" bounds="84,95,33,33" type="switch">
            <source idx="0" terminal="5,A" />
            <switchstart name="switchstart" type="switchstart" bounds="45,144,110,49">
                <source idx="0" terminal="5,A" />
            </switchstart>
            <case name="case" type="case" condition="getXmlData('message', '//Message/Header/MESSAGENAME') = 'GetQueryResult'" bounds="70,193,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="Query.bpel" type="invokewf" partnerLink="bpelj" partnerLinkType="bpel" bounds="50,242,101,71" operation="Query.bpel" ignoreThrow="false" fork="false">
                    <source idx="0" terminal="5,A" />
                    <input variable="message" />
                    <fault faultName="catchAll" variable="error" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getXmlData('message', '//Message/Header/MESSAGENAME') = 'StopWatcherAll'" bounds="171,193,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExRepository stopWatcherAll" type="invokebean" description="public void stopWatcherAll(String temp)" bounds="151,242,101,71" 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="getXmlData('message', '//Message/Header/MESSAGENAME') = 'StartWatcherAll'" bounds="291,193,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExRepository startWatcherAll" type="invokebean" description="public void startWatcherAll(String temp)" bounds="271,242,101,71" 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="416,192,60,19">
                <source idx="0" terminal="5,A" />
                <invoke name="BpelExecuter replyForEvisor" type="invokebean" description="public org.jdom.Document replyForEvisor(org.jdom.Document doc)" bounds="396,241,101,83" 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="396,354,101,83" 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" />
                </invoke>
            </case>
            <case name="case" type="case" condition="getVariable('msg')='TerminateAfterManagement'" bounds="536,192,60,19">
                <source idx="0" terminal="5,A" />
                <expression name="expression" type="expression" bounds="516,241,100,47">
                    <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="516,318,101,83" 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="637,194,88,19">
                <source idx="0" terminal="5,A" />
            </otherwise>
            <switchend name="switchend" type="switchend" bounds="594,458,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" />
                <source idx="5" terminal="5,A" />
            </switchend>
        </switch>
    </sequence>
</process>

