de.esprit.appsuite.workflow.wft

## Class AbstractTaskOptionWFT<C extends ApplicationContext>

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<C>
    - - de.esprit.appsuite.task.AbstractAsyncExecutable<C>
      - - de.esprit.appsuite.task.AbstractAsyncTask<C>
        - - de.esprit.appsuite.gui.task.AbstractSwingTask<C>
          - - de.esprit.appsuite.workflow.wft.AbstractWFT<C>
            - - de.esprit.appsuite.workflow.wft.AbstractTaskOptionWFT<C>

- All Implemented Interfaces:
    ApplicationObject<C>, AsyncExecutable<C>, AsyncTask<C>, CancellableTask, LocalCancellableTask, TaskMonitorSupport, TaskEvent.Source, TaskIdHolder, WorkflowTask<C>, ErrorHandlerSupport, Renderable, SimpleLogSupport, Dumpable, Executable, java.lang.Runnable
  Direct Known Subclasses:
    AbstractTaskOptionDialogWFT

      public abstract class AbstractTaskOptionWFT<C extends ApplicationContext>
      extends AbstractWFT<C>

  This task requests to make a decision between a set of `CheckOption` objects.
  Author:
    Rainer Buesch

- - ### Field Summary

    - ### Fields inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `childTaskRef, isTestMode, monitorController, resultRef, stateFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTaskOptionWFT(AbstractWorkflow<C> workflow)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `enterTask(WorkflowTask previousTask)` Overridden to popup a `TaskOptionDialog` for choosing the next step to happen in the workflow.
    `void` | `fillAvailableOptions(java.util.List<CheckOption> optionList, WorkflowTask previousTask)` Fills up the list of options of which the user has got to choose one.
    `CheckOption` | `getDefaultOption()` This option is preselected in the option dialog, it must be one of the options given by `fillAvailableOptions(List, WorkflowTask)`
    `abstract CheckOption` | `getSelectedOption(java.util.List<CheckOption> validOptions)` Returns the selected options which must be one of the given options or null.
    `boolean` | `isDeciderTask()` Tells, whether this is a decider-WFT.

    - ### Methods inherited from class de.esprit.appsuite.workflow.wft.AbstractWFT

      `executeAsync, executeAsyncImpl, exitTask, getTaskIndex, getWorkflow, getWorkingDir, isTaskRepeating, setName, setTaskIndex, updateTaskName`

    - ### Methods inherited from class de.esprit.appsuite.gui.task.AbstractSwingTask

      `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`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncTask

      `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`

    - ### Methods inherited from class de.esprit.appsuite.task.AbstractAsyncExecutable

      `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`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

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

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### 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, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, 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`

- - ### Constructor Detail

    - #### AbstractTaskOptionWFT

          public AbstractTaskOptionWFT(AbstractWorkflow<C> workflow)

  - ### Method Detail

    - #### enterTask

          public final void enterTask(WorkflowTask previousTask)
                               throws java.lang.Exception

      Overridden to popup a `TaskOptionDialog` for choosing the next step to happen in the workflow.
      Specified by:
        `enterTask` in interface `WorkflowTask<C extends ApplicationContext>`
      Overrides:
        `enterTask` in class `AbstractWFT<C extends ApplicationContext>`
      Throws:
        `java.lang.Exception`

    - #### getSelectedOption

          public abstract CheckOption getSelectedOption(java.util.List<CheckOption> validOptions)

      Returns the selected options which must be one of the given options or null. A null value is interpreted as a cancel of the workflow.

    - #### fillAvailableOptions

          public void fillAvailableOptions(java.util.List<CheckOption> optionList,
                                  WorkflowTask previousTask)

      Fills up the list of options of which the user has got to choose one. Note that the options list is created dynamically when needed in the workflow. The available options may depend on the status of the previous Workflowtask. By default all `StandardTaskOption` constants are added to the optionList.
      Parameters:
        `optionList` - the list to be filled with TaskOptions
        `previousTask` - the previous WorkflowTask (will be null, if the first task is being run)

    - #### getDefaultOption

          public CheckOption getDefaultOption()

      This option is preselected in the option dialog, it must be one of the options given by `fillAvailableOptions(List, WorkflowTask)`

    - #### isDeciderTask

          public final boolean isDeciderTask()

      Description copied from interface: `WorkflowTask`
      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.
      Specified by:
        `isDeciderTask` in interface `WorkflowTask<C extends ApplicationContext>`
      Overrides:
        `isDeciderTask` in class `AbstractWFT<C extends ApplicationContext>`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.