ow2-proactive / scheduling

Multi-platform Scheduling and Workflows Engine
http://www.activeeon.com/workflows-scheduling
GNU Affero General Public License v3.0
62 stars 54 forks source link

Selection Script output is not displayed in the server log #3107

Open MarioQuillas opened 6 years ago

MarioQuillas commented 6 years ago

When executing the following workflow on try.activeeon.com

<?xml version="1.0" encoding="UTF-8"?>
<job
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="urn:proactive:jobdescriptor:3.9"
     xsi:schemaLocation="urn:proactive:jobdescriptor:3.9 http://www.activeeon.com/public_content/schemas/proactive/jobdescriptor/3.9/schedulerjob.xsd"
    name="SelectionWorkflow" 
    priority="normal"
    onTaskError="continueJobExecution"
     maxNumberOfExecution="2"
>
  <taskFlow>
    <task name="Groovy_Task">
      <description>
        <![CDATA[ The simplest task, ran by a groovy engine. ]]>
      </description>
      <selection>
        <script
         type="dynamic" >
          <code language="groovy">
            <![CDATA[
hostname = InetAddress.getLocalHost().getHostName()
println "Executed on " + hostname
selected = ("try.activeeon.com" == hostname)
]]>
          </code>
        </script>
      </selection>
      <scriptExecutable>
        <script>
          <code language="groovy">
            <![CDATA[
println "uname -a".execute().text
]]>
          </code>
        </script>
      </scriptExecutable>
    </task>
  </taskFlow>
</job>

1) the nodes inside the try machines should be selected 2) the output of the selection script should appear in the server logs.

Neither 1) or 2) happens, the output of the script is lost, and the task remains pending forever

tobwiens commented 6 years ago

Hello Mario,

thank you for opening the issue.

1) This is correct. I could not re-produce your error. It works fine on try.activeeon.com 2) This is correct, the same, it works fine on try.activeeon.com

In your case the server logs would look something like this:

[2018-01-26 22:16:46,687 5-thread-6 INFO        o.o.p.r.s.ScriptExecutor] pamr://4097/local__localhost__0_2 : -1317002113 result true
[2018-01-26 22:16:46,687 5-thread-6 INFO        o.o.p.r.s.ScriptExecutor] pamr://4097/local__localhost__0_2 : -1317002113 output
Executed on try.activeeon.com

I cannot see your jobs on try.activeeon.com did you remove them?