After an extensive investigation I was never able to figure out how to define 
metadata values for ExternScriptTaskInstance in the tasks.xml file, but I was 
able to get my ExternScriptTaskInstance to run by putting some temporary code 
in my workflow condition class that adds the "Args" key and a value to the 
metadata before starting the workflow starts. 

I also figured out that the workflow manager itself doesn't use the 
"workflow-instance-met.xml" or "workflow-lifecycle.xml" files that are found in 
the deployed workflow/policy directory. Those files are only used if you are 
running one of the webapp components. 

Val



Valerie A. Mallder
New Horizons Deputy Mission System Engineer
Johns Hopkins University/Applied Physics Laboratory


> -----Original Message-----
> From: Mallder, Valerie [mailto:valerie.mall...@jhuapl.edu]
> Sent: Monday, November 09, 2015 10:56 AM
> To: dev@oodt.apache.org
> Subject: RE: how to specify workflow’s ExternScripTaskInstance "Args" metadata
> 
> 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.mattm...@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.mattm...@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" <valerie.mall...@jhuapl.edu>
> > Reply-To: "dev@oodt.apache.org" <dev@oodt.apache.org>
> > Date: Thursday, November 5, 2015 at 12:13 PM
> > To: "dev@oodt.apache.org" <dev@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)
> > >

Reply via email to