You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by "Mallder, Valerie" <Va...@jhuapl.edu> on 2015/11/05 21:13:33 UTC

how to specify workflow’s ExternScripTaskInstance "Args" metadata

Hi All,

I am trying to create a workflow task using workflow’s ExternScripTaskInstance class. There is an example extern script task in the default workflow “tasks.xml” file, but it doesn’t provide any key/value pairs for the “Args” metadata so I don’t see how the example task could actually work. The unit test program does not read the task information from an .xml file, so it is not very helpful in figuring this out. But, the ExternScriptTaskInstance class fails on line 72 where it attempts to access the “args.interator()” object, because “args” is null.  Neither of the following task definitions will work.  Can someone tell me what keywords I am need to use to define the “Args” value in the metadata for the task?

Thanks,
Val


   <task id="urn:oodt:helloWorldTask" name="helloWorldTask" class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
      <configuration>
           <property name="ShellType" value="/bin/sh"/>
           <property name="PathToScript" value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
      </configuration>
      <metadata key="Args" value="myArg" />
   </task>

   <task id="urn:oodt:helloWorldTask" name="helloWorldTask" class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
      <configuration>
           <property name="ShellType" value="/bin/sh"/>
           <property name="PathToScript" value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
      </configuration>
      <customMetadata>
           <metadata key="Args" value="myArg" />
      </customMetadata>
   </task>




Valerie A. Mallder

New Horizons Deputy Mission System Engineer
The Johns Hopkins University/Applied Physics Laboratory
11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
240-228-7846 (Office) 410-504-2233 (Blackberry)


RE: how to specify workflow’s ExternScripTaskInstance "Args" metadata

Posted by "Mallder, Valerie" <Va...@jhuapl.edu>.
Hi Chris,

Funny, you made the same suggestion last year when I couldn't get the ExternScriptTaskInstance to work!  Ok, so, I have already built a bunch of PGE tasks and integrated them into a pipeline, and yes, I do see that they are very powerful. But, right now I am trying to investigate something that will not use a PGE task. I'd just like to get the workflow manager to launch an ExternScriptTaskInstance.  So, I still have the same question. How and where do I specify the arguments that the ExternScriptTaskInstance seems to require? In addition to the two examples I showed in my original email, I have also tried specifying them this way and it causes the IterativeWorkflowProcessorThread  that is the ExternScriptTaskInstance crash with a null pointer on line 79.

The reason the test program that is used to test the ExternScriptTaskInstance completes successfully is because the metadata value for Args is asserted locally within the test program and not read in from an xml file like I am trying to do.  So I have been unable to find an example of how to specify the args in the xml file :(

Thanks,
Val


   <task id="urn:oodt:helloWorldTask" name="helloWorldTask" 
                               class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
      <conditions/>

      <configuration>
         <property name="ShellType" value="/bin/sh"/>
         <property name="PathToScript" value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
      </configuration>
      <requiredMetFields>
			<metfield name="Args" />
	  </requiredMetFields>
    <metadata>
      <keyval>
        <key>Args</key>
        <val>myArguement</val>
      </keyval>
   </metadata>
</task>
Valerie A. Mallder
New Horizons Deputy Mission System Engineer
Johns Hopkins University/Applied Physics Laboratory


> -----Original Message-----
> From: Mattmann, Chris A (3980) [mailto:chris.a.mattmann@jpl.nasa.gov]
> Sent: Friday, November 06, 2015 2:05 AM
> To: dev@oodt.apache.org
> Subject: Re: how to specify workflow’s ExternScripTaskInstance "Args" metadata
> 
> Val - I would consider not using ExternScriptTaskInstance and instead using the
> more powerful CAS-PGE.
> 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++
> Chris Mattmann, Ph.D.
> Chief Architect
> Instrument Software and Science Data Systems Section (398) NASA Jet
> Propulsion Laboratory Pasadena, CA 91109 USA
> Office: 168-519, Mailstop: 168-527
> Email: chris.a.mattmann@nasa.gov
> WWW:  http://sunset.usc.edu/~mattmann/
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++
> Adjunct Associate Professor, Computer Science Department University of
> Southern California, Los Angeles, CA 90089 USA
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> +++++
> 
> 
> 
> 
> 
> -----Original Message-----
> From: "Mallder, Valerie" <Va...@jhuapl.edu>
> Reply-To: "dev@oodt.apache.org" <de...@oodt.apache.org>
> Date: Thursday, November 5, 2015 at 12:13 PM
> To: "dev@oodt.apache.org" <de...@oodt.apache.org>
> Subject: how to specify workflow’s ExternScripTaskInstance "Args" metadata
> 
> >Hi All,
> >
> >I am trying to create a workflow task using workflow’s
> >ExternScripTaskInstance class. There is an example extern script task
> >in the default workflow “tasks.xml” file, but it doesn’t provide any
> >key/value pairs for the “Args” metadata so I don’t see how the example
> >task could actually work. The unit test program does not read the task
> >information from an .xml file, so it is not very helpful in figuring
> >this out. But, the ExternScriptTaskInstance class fails on line 72
> >where it attempts to access the “args.interator()” object, because “args” is null.
> > Neither of the following task definitions will work.  Can someone tell
> >me what keywords I am need to use to define the “Args” value in the
> >metadata for the task?
> >
> >Thanks,
> >Val
> >
> >
> >   <task id="urn:oodt:helloWorldTask" name="helloWorldTask"
> >class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
> >      <configuration>
> >           <property name="ShellType" value="/bin/sh"/>
> >           <property name="PathToScript"
> >value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
> >      </configuration>
> >      <metadata key="Args" value="myArg" />
> >   </task>
> >
> >   <task id="urn:oodt:helloWorldTask" name="helloWorldTask"
> >class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
> >      <configuration>
> >           <property name="ShellType" value="/bin/sh"/>
> >           <property name="PathToScript"
> >value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
> >      </configuration>
> >      <customMetadata>
> >           <metadata key="Args" value="myArg" />
> >      </customMetadata>
> >   </task>
> >
> >
> >
> >
> >Valerie A. Mallder
> >
> >New Horizons Deputy Mission System Engineer The Johns Hopkins
> >University/Applied Physics Laboratory
> >11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
> >240-228-7846 (Office) 410-504-2233 (Blackberry)
> >


Re: how to specify workflow’s ExternScripTaskInstance "Args" metadata

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Val - I would consider not using ExternScriptTaskInstance and instead
using the more powerful CAS-PGE.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





-----Original Message-----
From: "Mallder, Valerie" <Va...@jhuapl.edu>
Reply-To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Date: Thursday, November 5, 2015 at 12:13 PM
To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Subject: how to specify workflow’s ExternScripTaskInstance "Args" metadata

>Hi All,
>
>I am trying to create a workflow task using workflow’s
>ExternScripTaskInstance class. There is an example extern script task in
>the default workflow “tasks.xml” file, but it doesn’t provide any
>key/value pairs for the “Args” metadata so I don’t see how the example
>task could actually work. The unit test program does not read the task
>information from an .xml file, so it is not very helpful in figuring this
>out. But, the ExternScriptTaskInstance class fails on line 72 where it
>attempts to access the “args.interator()” object, because “args” is null.
> Neither of the following task definitions will work.  Can someone tell
>me what keywords I am need to use to define the “Args” value in the
>metadata for the task?
>
>Thanks,
>Val
>
>
>   <task id="urn:oodt:helloWorldTask" name="helloWorldTask"
>class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
>      <configuration>
>           <property name="ShellType" value="/bin/sh"/>
>           <property name="PathToScript"
>value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
>      </configuration>
>      <metadata key="Args" value="myArg" />
>   </task>
>
>   <task id="urn:oodt:helloWorldTask" name="helloWorldTask"
>class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
>      <configuration>
>           <property name="ShellType" value="/bin/sh"/>
>           <property name="PathToScript"
>value="[PROJECT_HOME]/bin/hello_world.sh" envReplace="true" />
>      </configuration>
>      <customMetadata>
>           <metadata key="Args" value="myArg" />
>      </customMetadata>
>   </task>
>
>
>
>
>Valerie A. Mallder
>
>New Horizons Deputy Mission System Engineer
>The Johns Hopkins University/Applied Physics Laboratory
>11100 Johns Hopkins Rd (MS 23-282), Laurel, MD 20723
>240-228-7846 (Office) 410-504-2233 (Blackberry)
>