Commit 1369ae9a authored by Jay Jay Billings's avatar Jay Jay Billings
Browse files

Minor updates to clarify behavior.


Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent cf1ea7fd
......@@ -26,7 +26,9 @@ import org.eclipse.ice.data.IDataElement;
*
* In addition to actions, tasks use Hooks, a special type of Action that
* executes either before or after another Action to support the execution of
* that main Action. The list of supported hook types is provided below.
* that main Action. The list of supported hook types is provided below. Using
* hooks is optional, but has the benefit of reducing complexity and clarifying
* the execution instructions.
*
* When directed to execute, tasks will execute all hooks and the action
* according to the execution order provided in the hook type table (see
......@@ -96,10 +98,18 @@ public interface ITask<T extends IDataElement<T>> {
/**
* This operation executes the action.
* @return the state of the task after exection.
* @return the state of the task after execution.
*/
public TaskState execute();
/**
* This operation cancels the execution of the action if it is running.
* @return the state once execution is cancelled. The task will generally
* revert to the ready state, but in some cases canceling may cause
* failure.
*/
public TaskState cancel();
/**
* This operation returns the current state of the Task
* @return the state
......
......@@ -27,8 +27,9 @@ public enum TaskState {
INITIALIZED,
/**
* This state indicates that the task can be executed and that all
* initialization has completed. It is ready to be executed.
* This state indicates that the task is ready to be executed and that all
* initialization has completed. It requires that data and other
* information be provided to the task.
*
* Idempotent tasks may re-enter the ready state when complete, using the
* FINISHED state as a transition back to readiness.
......@@ -53,9 +54,10 @@ public enum TaskState {
EXECUTING,
/**
* This state indicates that the task is waiting on internal resources or
* events, such as the allocation of compute or data resources or the
* completion of other tasks.
* This state indicates that the task is waiting on information, internal
* resources or events, such as the allocation of compute or data resources
* or the completion of other tasks. Most commonly, this state means that
* the task is waiting on data or the action to be set.
*/
WAITING,
......@@ -65,7 +67,7 @@ public enum TaskState {
* the workflow system, such as humans, file systems that generate events,
* or automated systems that provide information to the task.
*/
WAITINGFORAGENT,
WAITING_FOR_AGENT,
/**
* This is the ideal terminal state for the task and indicates that all
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment