You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by "Gerard, Ryan S. (GSFC-586.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC]" <ry...@nasa.gov> on 2012/04/10 21:35:38 UTC

workflow task/condition question

Hello,

We have a question regarding our workflow tasks. We are configuring our tasks.xml file and need to define some properties for our conditions. We would like to create a general condition and reuse it for many tasks. Is there a way to do this? 

<task id="urn:oodt:HelloWorld" name="Hello World"
                class="org.apache.oodt.cas.workflow.examples.HelloWorld">
                <conditions>
                        <condition id="urn:oodt:TrueCondition" 
                         IS THERE A WAY TO DEFINE A PROPERTY IN THE CONDITION HERE
                        />
                </conditions>
                <configuration>
                        <property name="Person" value="Chris" />
                </configuration>
        </task>

Thanks,
Ryan Gerard

Re: workflow task/condition question

Posted by "Mattmann, Chris A (388J)" <ch...@jpl.nasa.gov>.
Hi Ryan,

I think Sheryl's answer here was correct -- condition properties are defined in the conditions.xml file, and
then conditions are linked in to the tasks.xml file via their IDs. This is an artifact of using the XMLRepositoryManager
and the way that it reads its policy. Check this javadoc here:

http://s.apache.org/qg

Beyond that, in Apache OODT 0.4, (and as of OODT-70 [1]), there is a "PackagedWorkflowRepository" that reads in
its policy as a single workflow XML file (if you so chose). Check out this file as an example:

http://s.apache.org/cot

HTH!

Cheers,
Chris

[1] http://issues.apache.org/jira/browse/OODT-70

On Apr 10, 2012, at 12:35 PM, Gerard, Ryan S. (GSFC-586.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC] wrote:

> Hello,
> 
> We have a question regarding our workflow tasks. We are configuring our tasks.xml file and need to define some properties for our conditions. We would like to create a general condition and reuse it for many tasks. Is there a way to do this? 
> 
> <task id="urn:oodt:HelloWorld" name="Hello World"
>                class="org.apache.oodt.cas.workflow.examples.HelloWorld">
>                <conditions>
>                        <condition id="urn:oodt:TrueCondition" 
>                         IS THERE A WAY TO DEFINE A PROPERTY IN THE CONDITION HERE
>                        />
>                </conditions>
>                <configuration>
>                        <property name="Person" value="Chris" />
>                </configuration>
>        </task>
> 
> Thanks,
> Ryan Gerard


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


RE: workflow task/condition question

Posted by "Mistry, Chintu (GSFC-586.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC]" <ch...@nasa.gov>.
Sheryl,

No. We already know that.

We want to define generic condition class in policy/conditions.xml file. And we want use that condition class with different input params (properties - look for "CustomCondition" in following example) in tasks.xml file.

So for example:

<task id="urn:oodt:HelloWorld" name="Hello World" class="org.apache.oodt.cas.workflow.examples.HelloWorld">
     <conditions>
       <condition id="urn:oodt:CustomCondition">
           <property name="searchFile" value="VIIRS[0-9]{1,3}" />
     </conditions>
     <configuration>
          <property name="Person" value="Task1" />
     </configuration>
</task>

<task id="urn:oodt:HelloWorld1" name="Hello World1" class="org.apache.oodt.cas.workflow.examples.HelloWorld1">
     <conditions>
       <condition id="urn:oodt:CustomCondition">
           <property name="searchFile" value="CrIs_[0-9]{1,3}" />
     </conditions>
     <configuration>
          <property name="Person" value="Task2" />
     </configuration>
</task>


Thanks
Chintu




________________________________________
From: Sheryl John [sheryljj@gmail.com]
Sent: Tuesday, April 10, 2012 10:46 PM
To: dev@oodt.apache.org
Cc: Mistry, Chintu (GSFC-586.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC]
Subject: Re: workflow task/condition question

Hi Ryan,

You can specify properties for your conditions in the conditions.xml.
There's an example with properties for "urn:oodt:CheckForMetadataKeys" in the /policy/conditions.xml. Also check out the other examples.
So if you're defining a new condition class, you'll have add that to the conditions.xml and include properties for that condition.

Is that what you were looking for?



On Tue, Apr 10, 2012 at 12:35 PM, Gerard, Ryan S. (GSFC-586.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC] <ry...@nasa.gov>> wrote:
Hello,

We have a question regarding our workflow tasks. We are configuring our tasks.xml file and need to define some properties for our conditions. We would like to create a general condition and reuse it for many tasks. Is there a way to do this?

<task id="urn:oodt:HelloWorld" name="Hello World"
               class="org.apache.oodt.cas.workflow.examples.HelloWorld">
               <conditions>
                       <condition id="urn:oodt:TrueCondition"
                        IS THERE A WAY TO DEFINE A PROPERTY IN THE CONDITION HERE
                       />
               </conditions>
               <configuration>
                       <property name="Person" value="Chris" />
               </configuration>
       </task>

Thanks,
Ryan Gerard



--
-Sheryl

Re: workflow task/condition question

Posted by Sheryl John <sh...@gmail.com>.
Hi Ryan,

You can specify properties for your conditions in the conditions.xml.
There's an example with properties for "urn:oodt:CheckForMetadataKeys" in
the /policy/conditions.xml. Also check out the other examples.
So if you're defining a new condition class, you'll have add that to the
conditions.xml and include properties for that condition.

Is that what you were looking for?



On Tue, Apr 10, 2012 at 12:35 PM, Gerard, Ryan S. (GSFC-586.0)[COLUMBUS
TECHNOLOGIES AND SERVICES INC] <ry...@nasa.gov> wrote:

> Hello,
>
> We have a question regarding our workflow tasks. We are configuring our
> tasks.xml file and need to define some properties for our conditions. We
> would like to create a general condition and reuse it for many tasks. Is
> there a way to do this?
>
> <task id="urn:oodt:HelloWorld" name="Hello World"
>                class="org.apache.oodt.cas.workflow.examples.HelloWorld">
>                <conditions>
>                        <condition id="urn:oodt:TrueCondition"
>                         IS THERE A WAY TO DEFINE A PROPERTY IN THE
> CONDITION HERE
>                        />
>                </conditions>
>                <configuration>
>                        <property name="Person" value="Chris" />
>                </configuration>
>        </task>
>
> Thanks,
> Ryan Gerard
>



-- 
-Sheryl