public abstract class AbstractJavaCommandWFT<C extends ApplicationContext> extends JavaCommandTask<C> implements WorkflowTask<C>
WorkflowTask
implementations. Such a task is being run
as a child task within an AbstractWorkflow
.OUTPUT_TYPE_CONSOLE
childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
AbstractJavaCommandWFT(AbstractWorkflow<C> workflow) |
AbstractJavaCommandWFT(AbstractWorkflow<C> workflow,
JavaCommand cmd) |
Modifier and Type | Method and Description |
---|---|
void |
enterTask(WorkflowTask previousTask)
Runs in the ET before the task starts to run async
|
void |
executeAsync()
Must be overridden to perform the async part.
|
void |
executeAsyncImpl()
This method is executed asynchronously
|
void |
exitTask()
Runs in the ET after the task has run async
|
int |
getTaskIndex()
Returns the index of this task within the controlling workflow
|
<W extends AbstractWorkflow<C>> |
getWorkflow()
Returns the workflow this task obtains to.
|
boolean |
isDeciderTask()
Tells, whether this is a decider-WFT.
|
boolean |
isTaskRepeating()
Is called after the task has been executed.
|
void |
setName(java.lang.String taskName)
Overridden to allow dynamic taskName setting.
|
void |
setTaskIndex(int taskIndex,
WorkflowTask previousTask)
Sets the previous task from which this task may have to overtake results
|
void |
updateTaskName()
Is called when a change in the task-naming may be required.
|
getJavaCommand, setJavaCommand
cancel, checkExitStatus, createStandardInput, createStandardOutput, createStandardOutputFile, doOnConsoleOutput, doOnFileSystemChange, doOnFinish, getCommandBaseName, getCommandString, getProcessBuilder, getStandardOutputFile, getWorkingDir, isNotifyConsoleOutput, putEnv, setCommand, setNotifyConsoleOutput, setNotifyFileSystemChange, setStandardOutputFile, setWorkingDir, submit, submit, toDumpString
awaitFinished, awaitFinished, awaitStarted, createTaskId, deregisterTask, doOnStart, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submitInternal, toString, wasSucceeded
addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, hasError, hasMonitor, isCancellable, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getWorkingDir
awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout, submit, submit
checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, setResult, setRunStateFlag, sleepChecked
getApplicationContext
execute
addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
cancel
wasCancelled
getTaskId
toDumpString, toDumpString, toString, toString
public AbstractJavaCommandWFT(AbstractWorkflow<C> workflow)
public AbstractJavaCommandWFT(AbstractWorkflow<C> workflow, JavaCommand cmd)
public void setTaskIndex(int taskIndex, WorkflowTask previousTask)
WorkflowTask
setTaskIndex
in interface WorkflowTask<C extends ApplicationContext>
public int getTaskIndex()
WorkflowTask
getTaskIndex
in interface WorkflowTask<C extends ApplicationContext>
public void setName(java.lang.String taskName)
TaskCheckLabel
in the
WorkflowMonitorDialog
setName
in interface AsyncExecutable<C extends ApplicationContext>
setName
in class AbstractAsyncExecutable<C extends ApplicationContext>
public void enterTask(WorkflowTask previousTask) throws java.lang.Exception
WorkflowTask
enterTask
in interface WorkflowTask<C extends ApplicationContext>
java.lang.Exception
public void executeAsyncImpl() throws java.lang.Exception
WorkflowTask
executeAsyncImpl
in interface WorkflowTask<C extends ApplicationContext>
java.lang.Exception
public void exitTask() throws java.lang.Exception
WorkflowTask
exitTask
in interface WorkflowTask<C extends ApplicationContext>
java.lang.Exception
public boolean isTaskRepeating()
WorkflowTask
isTaskRepeating
in interface WorkflowTask<C extends ApplicationContext>
public <W extends AbstractWorkflow<C>> W getWorkflow()
WorkflowTask
getWorkflow
in interface WorkflowTask<C extends ApplicationContext>
public final void executeAsync() throws java.lang.Exception
AbstractAsyncTask
AbstractAsyncTask.notifyProceeded(Object, int, int, String)
in order to notify
about task progress. Note: the running task should periodically call
AbstractAsyncExecutable.checkCancelled()
in order to detect cancellation.executeAsync
in interface AsyncExecutable<C extends ApplicationContext>
executeAsync
in class JavaCommandTask<C extends ApplicationContext>
java.lang.Exception
for synchronous execution
public boolean isDeciderTask()
WorkflowTask
CheckOption
s.isDeciderTask
in interface WorkflowTask<C extends ApplicationContext>
public void updateTaskName()
WorkflowTask
updateTaskName
in interface WorkflowTask<C extends ApplicationContext>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.