<?xml version="1.0" encoding="iso-8859-1"?>
<spooler>
  <config>

    <web_services>
        <!-- Web Service for asynchronous job execution -->
        <web_service debug="no"
                     name="shell_job"
                     url_path="/shell_job"
                     request_xslt_stylesheet="config/scheduler_soap_request.xslt"
                     response_xslt_stylesheet="config/scheduler_soap_response.xslt">
        </web_service>

        <!-- Web Service for synchronous job execution -->
        <web_service debug="no"
                     name="shell_job_service"
                     url_path="/shell_job_service"
                     job_chain="shell_job_service">
        </web_service>
    </web_services>

    <jobs>

      <job name  = "shell_job"
           title = "Process shell script for asynchronous Web Service request">

          <description>
              <include file="jobs/JobSchedulerWebServiceShellJob.xml"/>
          </description>

          <params>
            <!-- Unix: the command to be executed, modify this sample to an executable script for your platform -->
            <!--
            <param name="shell_command"
                   value="./samples/shell.webservice.command/webservice_shell.sh"/> 
            -->
            <!-- Windows: the command to be executed, modify this sample to an executable script for your platform -->
            <param name="shell_command"
                   value="cmd.exe /V:ON /C /scheduler/samples/shell.webservice.command/webservice_shell.cmd"/>
          </params>

          <script language="java"
                  java_class="sos.stacks.webservice.JobSchedulerWebServiceShellJob"/>
      </job>

      <job name  = "shell_job_request"
           title = "Transform request for synchronous Web Service"
           order = "yes"
           idle_timeout="300">

          <description>
              <include file="jobs/JobSchedulerWebServiceShellJobRequest.xml"/>
          </description>

          <params>
              <param name="request_stylesheet"
                     value="config/scheduler_soap_request.xslt"/>
          </params>

          <script language="java"
                  java_class="sos.stacks.webservice.JobSchedulerWebServiceShellJobRequest"/>
      </job>

      <job name  = "shell_job_service"
           title = "Process shell script for synchronous Web Service"
           order = "yes"
           idle_timeout="300">

          <description>
              <include file="jobs/JobSchedulerWebServiceShellJob.xml"/>
          </description>

          <params>
            <!-- Unix: the command to be executed, modify this sample to an executable script for your platform -->
            <!--
            <param name="shell_command"
                   value="./samples/shell.webservice.command/webservice_shell.sh"/> 
            -->
            <!-- Windows: the command to be executed, modify this sample to an executable script for your platform -->
            <param name="shell_command"
                   value="cmd.exe /V:ON /C /scheduler/samples/shell.webservice.command/webservice_shell.cmd"/>
          </params>

          <script language="java"
                  java_class="sos.stacks.webservice.JobSchedulerWebServiceShellJob"/>
      </job>

      <job name="shell_job_response"
           title="Process response for synchronous Web Service"
           order="yes"
           idle_timeout="300">

          <description>
              <include file="jobs/JobSchedulerWebServiceShellJobResponse.xml"/>
          </description>

          <params>
              <param name="response_stylesheet" 
                     value="config/scheduler_soap_response.xslt"/>
          </params>
          
          <script language="java"
                  java_class="sos.stacks.webservice.JobSchedulerWebServiceShellJobResponse"/>
      </job>

    </jobs>

    <job_chains>
        <job_chain name="shell_job_service"
                   orders_recoverable="no"
                   visible="yes">
            <job_chain_node state="request"
                            job="shell_job_request"
                            next_state="service"
                            error_state="error"/>
            <job_chain_node state="service"
                            job="shell_job_service"
                            next_state="response"
                            error_state="error"/>
            <job_chain_node state="response"
                            job="shell_job_response"
                            next_state="success"
                            error_state="error"/>
            <job_chain_node state="success"/>
            <job_chain_node state="error"/>
        </job_chain>
    </job_chains>

  </config>
</spooler>