com.waveset.workflow
Class WorkflowExecutor

java.lang.Object
  extended bycom.waveset.task.Executor
      extended bycom.waveset.workflow.WorkflowExecutor

public class WorkflowExecutor
extends Executor

A task Executor implementation that wraps the workflow engine so that it may be run as a background task within the Lighthouse server. The engine itself is found in WorkflowEngine.


Field Summary
static java.lang.String code_id
           
static java.lang.String RES_WORK_ITEMS
          The name of a result item in the task result that holds information about all outstanding work items.
 
Fields inherited from class com.waveset.task.Executor
_monitor, _suspendRequested, _terminateRequested, trace, XML_HEADER
 
Constructor Summary
WorkflowExecutor()
          Build a workflow executor.
 
Method Summary
 void execute(TaskContext context, TaskInstance taskInstance)
          The main task entry point.
 WorkflowEngine getEngine()
           
 boolean isTerminateRequested()
          Test the terminate request flag.
 void setTerminateRequested(boolean term)
          Set the terminate request flag.
 
Methods inherited from class com.waveset.task.Executor
addExtendedResult, delete, doRealWork, getExtendedResult, getPool, isSuspendRequested, println, processEvent, setPool, setSuspendRequested
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

RES_WORK_ITEMS

public static final java.lang.String RES_WORK_ITEMS
The name of a result item in the task result that holds information about all outstanding work items. The value of this result is a list of lists. Each sublist has these elements:
      id          work item id
      owner       administrator/owner of the item
      itemType    type of the work item
 
This was introduced primarily to support synchronous workflow execution, where we could tell immediately after checking in a work item, whether there was another item for the same user.

See Also:
Constant Field Values
Constructor Detail

WorkflowExecutor

public WorkflowExecutor()
Build a workflow executor.

Method Detail

getEngine

public WorkflowEngine getEngine()

execute

public void execute(TaskContext context,
                    TaskInstance taskInstance)
The main task entry point. We transition some state maintained in the TaskInstance into the case and call the engine.

Overrides:
execute in class Executor
See Also:
Executor.doRealWork(TaskContext, TaskInstance)

isTerminateRequested

public boolean isTerminateRequested()
Test the terminate request flag.

Overrides:
isTerminateRequested in class Executor

setTerminateRequested

public void setTerminateRequested(boolean term)
Set the terminate request flag.

Overrides:
setTerminateRequested in class Executor