All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.tasks.xml Maven / Gradle / Ivy

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<cas:tasks xmlns:cas="http://oodt.jpl.nasa.gov/1.0/cas">
	<task id="urn:oodt:HelloWorld" name="Hello World"
		class="org.apache.oodt.cas.workflow.examples.HelloWorld">
		<conditions>
			<condition id="urn:oodt:TrueCondition" />
		</conditions>
		<configuration>
			<property name="Person" value="Chris" />
		</configuration>
	</task>
	<task id="urn:oodt:GoodbyeWorld" name="Goodbye World"
		class="org.apache.oodt.cas.workflow.examples.GoodbyeWorld">
		<conditions>
			<condition id="urn:oodt:TrueCondition" />
		</conditions>
		<configuration>
			<property name="Person" value="Chris" />
		</configuration>
	</task>
	<task id="urn:oodt:YoureStuck" name="You're Stuck"
		class="org.apache.oodt.cas.workflow.examples.GoodbyeWorld">
		<conditions>
			<condition id="urn:oodt:FalseCondition" />
		</conditions>
		<configuration>
			<property name="Person" value="Chris" />
		</configuration>
	</task>
	<task id="urn:oodt:IntensiveTask" name="Processor Intensive Task"
		class="org.apache.oodt.cas.workflow.examples.LongTask">
		<conditions />
		<configuration />
	</task>
	<task id="urn:oodt:IntensiveTaskWithWait" name="Intensive Waiter"
		class="org.apache.oodt.cas.workflow.examples.LongTask">
		<conditions>
			<condition id="urn:oodt:LongCondition" />
		</conditions>
		<configuration />
	</task>
	<task id="urn:oodt:PropReplaceTask" name="PRTask"
		class="org.apache.oodt.cas.workflow.examples.LongTask">
		<conditions />
		<configuration>
			<property name="PathToReplace" value="[HOME]/my/path"
				envReplace="true" />
			<property name="DontReplaceMe" value="[HOME]/my/path"
				envReplace="false" />
			<property name="DontReplaceMeNoSpec" value="[HOME]/my/path" />
		</configuration>
	</task>
	<task id="urn:oodt:NumIncrementTask" name="Num Increment Task"
		class="org.apache.oodt.cas.workflow.examples.NumIncrementTask">
		<conditions />
		<configuration />
	</task>
	<task id="urn:oodt:RandomStatusUpdateTask"
		name="Random Status Update"
		class="org.apache.oodt.cas.workflow.examples.RandomStatusUpdateTask">
		<conditions />
		<configuration />
	</task>
	<task id="urn:oodt:TestMultiConditionTask"
		name="Test Multi Condition"
		class="org.apache.oodt.cas.workflow.examples.HelloWorld">
		<conditions>
			<condition id="urn:oodt:TrueCondition" />
			<condition id="urn:oodt:FalseCondition" />
		</conditions>
		<configuration>
			<property name="Person" value="Chris" />
		</configuration>
	</task>
	<task id="urn:oodt:TestReqMetFieldsTask" name="Test Met Fields"
		class="org.apache.oodt.cas.workflow.examples.LongTask">
		<conditions />
		<configuration />
		<requiredMetFields>
			<metfield name="numSeconds" />
		</requiredMetFields>
	</task>
		<task id="urn:oodt:ExternalScriptTask" name="External Script Task"
		class="org.apache.oodt.cas.workflow.examples.ExternScriptTaskInstance">
		<conditions />
		<configuration>
		    <property name="ShellType" value="/bin/sh"/> <!-- or /bin/tcsh if you have tcsh shell envionment; or /usr/bin/ if you have a compiled program -->
			<property name="PathToScript" value="/usr/local/sampleScript.sh"/> <!-- This should include the file name as well-->
		</configuration>
	</task>
	<task id="urn:oodt:mailTask" name="Ingest e-Mail"
		class="org.apache.oodt.cas.workflow.examples.MailTask">
		<conditions/>
		<configuration>
			<property name="user.name" value="Costin"/>
			<property name="msg.subject" value="Ingest Notification"/>
			<property name="mail.to" value="[email protected]"/>
			<property name="mail.from" value="[email protected]"/>
		</configuration>
	</task>	
	<task id="urn:oodt:TestTimeoutTask" name="Test Timeout"
		class="org.apache.oodt.cas.workflow.examples.LongTask">
		<conditions>
		   <condition id="urn:oodt:TimeoutCondition"/>
		</conditions>
		<configuration />
		<requiredMetFields>
			<metfield name="numSeconds" />
		</requiredMetFields>
	</task>	
	<task id="urn:oodt:OptionalTask" name="Optional Task" 
	    class="org.apache.oodt.cas.workflow.examples.LongTask">
	  <conditions>
	     <condition id="urn:oodt:OptionalCondition"/>
	  </conditions>
	  <configuration/>
	  <requiredMetFields>
	     <metfield name="numSeconds"/>
	  </requiredMetFields>
	</task>
	<task id="urn:oodt:TaskWithLoad" name="Task with Load"
	   class="org.apache.oodt.cas.workflow.examples.LongTask">
	   <conditions>
	   </conditions> 
	   <configuration>
	      <!--  now settable since OODT-602
	            controls the load value of this task when running
	            Workflow Manager with connection to the Resource Manager.
	       -->
	      <property name="TaskLoad" value="2"/>
	   </configuration>  
	</task>
    <task id="urn:oodt:FilterTask" name="Filter Task"
       class="org.apache.oodt.cas.workflow.examples.FilterTask">
       <conditions>
       </conditions> 
       <configuration>
          <!--  comma separated list of keys to remove from the metadata. -->
          <property name="Remove_Key" value="ProductionDateTime"/>
          <!-- you can list many of these Rename_[Key] parameters, to
               remove specific keys from the metadata. Note that renames
               are processed *first* before removes, so you can conceivably
               rename a field, and then *remove* it too, so be careful.
           -->
          <property name="Rename_Filename" value="Prior_Filename"/>
       </configuration>  
    </task>
</cas:tasks>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy