de.esprit.appsuite.workflow

## Interface WorkflowTask<C extends ApplicationContext>

- All Superinterfaces:
    ApplicationObject<C>, AsyncExecutable<C>, AsyncTask<C>, CancellableTask, Dumpable, Executable, LocalCancellableTask, java.lang.Runnable, SimpleLogSupport, TaskIdHolder, TaskMonitorSupport
  All Known Implementing Classes:
    AbstractAsciiParserWFT, AbstractClientWFT, AbstractDataParserWFT, AbstractEventDrivenWFT, AbstractFileStreamWFT, AbstractJavaCommandWFT, AbstractOsProcessWFT, AbstractStreamParserWFT, AbstractTaskOptionDialogWFT, AbstractTaskOptionWFT, AbstractWFT, AbstractZipArchiverWFT, ArchiveConfigDialogWFT, ArchiveExtractWFT, ArchiveListWFT, CheckWorkingDirectoryWFT, CleanupWorkingDirectoryWFT, CreateZipArchiveWFT, FileDownloadWFT, FileNameInputWFT, FileTransferWFT, FileUploadWFT, InputFileChooserWFT, OutputFileChooserWFT, RemoteArchiveExtractWFT, RemoteArchiveListWFT

      public interface WorkflowTask<C extends ApplicationContext>
      extends AsyncTask<C>

  This interface defines what makes up a workflow task
  Author:
    Rainer Buesch

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `enterTask(WorkflowTask<C> previousTask)` Runs in the ET before the task starts to run async
    `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>> W` | `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` | `setTaskIndex(int taskIndex, WorkflowTask<C> 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.

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncTask

      `awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout, submit, submit`

    - ### Methods inherited from interface de.esprit.appsuite.task.AsyncExecutable

      `checkCancelled, checkForErrorAndRethrow, executeAsync, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, setName, setResult, setRunStateFlag, sleepChecked`

    - ### Methods inherited from interface de.esprit.appsuite.launch.ApplicationObject

      `getApplicationContext`

    - ### Methods inherited from interface de.esprit.common.type.Executable

      `execute`

    - ### Methods inherited from interface de.esprit.appsuite.task.monitor.TaskMonitorSupport

      `addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor`

    - ### Methods inherited from interface de.esprit.common.log.SimpleLogSupport

      `getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from interface java.lang.Runnable

      `run`

    - ### Methods inherited from interface de.esprit.appsuite.task.LocalCancellableTask

      `cancel`

    - ### Methods inherited from interface de.esprit.appsuite.task.CancellableTask

      `wasCancelled`

    - ### Methods inherited from interface de.esprit.appsuite.task.TaskIdHolder

      `getTaskId`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toDumpString, toString, toString`

- - ### Method Detail

    - #### getWorkflow

          <W extends AbstractWorkflow<C>> W getWorkflow()

      Returns the workflow this task obtains to.

    - #### enterTask

          void enterTask(WorkflowTask<C> previousTask)
                         throws java.lang.Exception

      Runs in the ET before the task starts to run async
      Throws:
        `java.lang.Exception`

    - #### executeAsyncImpl

          void executeAsyncImpl()
                                throws java.lang.Exception

      This method is executed asynchronously
      Throws:
        `java.lang.Exception`

    - #### exitTask

          void exitTask()
                        throws java.lang.Exception

      Runs in the ET after the task has run async
      Throws:
        `java.lang.Exception`

    - #### isTaskRepeating

          boolean isTaskRepeating()

      Is called after the task has been executed. As long as this method returns true the task will be re-submitted again.

    - #### setTaskIndex

          void setTaskIndex(int taskIndex,
                          WorkflowTask<C> previousTask)

      Sets the previous task from which this task may have to overtake results

    - #### getTaskIndex

          int getTaskIndex()

      Returns the index of this task within the controlling workflow

    - #### isDeciderTask

          boolean isDeciderTask()

      Tells, whether this is a decider-WFT. Such a WFT will ask the user for a decision by popping up an choice editor with choosable `CheckOption`s.

    - #### getWorkingDir

          java.io.File getWorkingDir()

      Returns the working-dir of the executing task.

    - #### updateTaskName

          void updateTaskName()

      Is called when a change in the task-naming may be required.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.