public abstract class AbstractWFT<C extends ApplicationContext> extends AbstractSwingTask<C> implements WorkflowTask<C>
WorkflowTask
implementations. Such a task is being run
as a child task within an AbstractWorkflow
.childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
AbstractWFT(AbstractWorkflow<C> workflow) |
AbstractWFT(AbstractWorkflow<C> workflow,
NlsKey nameKey,
java.lang.Object... args) |
Modifier and Type | Method and Description |
---|---|
void |
enterTask(WorkflowTask<C> 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.
|
java.io.File |
getWorkingDir()
Returns the working-dir of the executing task.
|
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.
|
addMonitor, addTaskListener, awaitEventsDone, doneChildFinished, doneChildStarted, doneTaskCancelled, doneTaskFailed, doneTaskFinished, doneTaskProceeded, doneTaskStarted, doneTaskStateChanged, doneTaskSucceeded, getActionCancel, getRenderColor, getRenderIcon, getRenderText, getSwingTaskMonitor, isRegisterInTaskList, removeTaskListener, showError, showError, showError, showInfo, showInfo, showWarning, showWarning
awaitFinished, awaitFinished, awaitStarted, cancel, createTaskId, deregisterTask, doOnFinish, doOnStart, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submit, submit, submitInternal, toString, wasSucceeded
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, toDumpString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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 AbstractWFT(AbstractWorkflow<C> workflow, NlsKey nameKey, java.lang.Object... args)
public AbstractWFT(AbstractWorkflow<C> workflow)
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
. Note that a taskName containing a ':' will be
splitted into a basic main part and a colored detail-part when displayed
by a check-label.setName
in interface AsyncExecutable<C extends ApplicationContext>
setName
in class AbstractAsyncExecutable<C extends ApplicationContext>
public void enterTask(WorkflowTask<C> 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 boolean isDeciderTask()
WorkflowTask
CheckOption
s.isDeciderTask
in interface WorkflowTask<C extends ApplicationContext>
public <W extends AbstractWorkflow<C>> W getWorkflow()
WorkflowTask
getWorkflow
in interface WorkflowTask<C extends ApplicationContext>
public java.io.File getWorkingDir()
WorkflowTask
getWorkingDir
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 AbstractAsyncTask<C extends ApplicationContext>
java.lang.Exception
for synchronous execution
public void updateTaskName()
WorkflowTask
updateTaskName
in interface WorkflowTask<C extends ApplicationContext>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.