com.massimo.tools.scriptrunner.control
Class OptionalTask
java.lang.Object
com.massimo.tools.scriptrunner.AbstractTask
com.massimo.tools.scriptrunner.control.AbstractCompoundTask
com.massimo.tools.scriptrunner.control.OptionalTask
- All Implemented Interfaces:
- Task
public class OptionalTask
- extends AbstractCompoundTask
Optional execution of contained task.
Asks the user whether the task should be executed.
Methods inherited from class com.massimo.tools.scriptrunner.AbstractTask |
getBooleanProperty, getCurrentWorkingDirectory, getDefinition, getIntProperty, getName, getParent, getProperties, getStartProcessingRow, getText, getType, isIgnoreableError, isIgnoreableError, isInterrupted, isLogProgress, postProcess, preProcess, process, resultCodeToString, substituteParameters, toString, validate, validateConnections, validateParameters |
OptionalTask
public OptionalTask(Task parent,
String type,
Element definition,
Map<String,String> contextProperties)
- Parameters:
parent
- type
- definition
- contextProperties
-
getLogger
protected org.apache.log4j.Logger getLogger()
-
- Specified by:
getLogger
in class AbstractTask
- Returns:
- Class logger
processCompound
protected int processCompound(ExecutionContext context,
Elements tasks)
throws Exception
- Process any and all child tasks.
Created Tasks should be added to children using addChild(Task)
- Specified by:
processCompound
in class AbstractCompoundTask
tasks
- A list of Task definition Elements
- Returns:
- The result of running all tasks
- Throws:
Exception