com.waveset.workflow
Class WorkflowSimulator

java.lang.Object
  extended bycom.waveset.workflow.WorkflowSimulator

public class WorkflowSimulator
extends java.lang.Object


Field Summary
static java.lang.String code_id
           
 
Constructor Summary
WorkflowSimulator()
          Build a workflow executor.
WorkflowSimulator(LighthouseSimulator lh)
           
WorkflowSimulator(java.lang.String path)
           
 
Method Summary
 void add(WFProcess p)
           
 void clearExecutionState()
          Remove all TaskInstances and WorkItems from the environment.
 TaskInstance execute(java.lang.String objname)
           
 TaskInstance execute(java.lang.String objname, GenericObject inputs)
           
 TaskInstance execute(java.lang.String objname, java.lang.String taskname, GenericObject inputs)
          The main task entry point for workflow task simulation.
 TaskInstance execute(TaskDefinition def, java.lang.String taskname, GenericObject inputs)
          Execute a workflow task definition.
 void execute(TaskInstance task)
          Execute directly from a TaskInstance.
 LighthouseContext getLighthouseContext()
           
 LighthouseSimulator getLighthouseSimulator()
          If you need some of the extended methods defined on LighthouseSimulator call this.
 WorkflowContext getWorkflowContext()
           
 WorkflowEngine getWorkflowEngine()
           
 java.util.List getWorkItems(java.lang.String owner)
          Return a list of all WorkItem objects assigned to the given user.
 void load(java.lang.String path)
           
static void main(java.lang.String[] args)
           
static void println(java.lang.String msg)
           
 void run(WFProcess p)
           
 void setInterceptor(Interceptor i)
          Install an interceptor for WorkflowApplication calls.
 void setInvokeInterceptor(InvokeInterceptor ii)
          Install an interceptor for expressions.
 void setNewDirectory(java.lang.String path)
           
 void setTrace(boolean b)
           
 void setVerbose(boolean b)
           
 void updateWorkItem(WorkItem item)
           
static void usage()
           
 
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
Constructor Detail

WorkflowSimulator

public WorkflowSimulator()
Build a workflow executor.


WorkflowSimulator

public WorkflowSimulator(java.lang.String path)

WorkflowSimulator

public WorkflowSimulator(LighthouseSimulator lh)
Method Detail

setNewDirectory

public void setNewDirectory(java.lang.String path)

load

public void load(java.lang.String path)
          throws WavesetException
Throws:
WavesetException

getWorkflowEngine

public WorkflowEngine getWorkflowEngine()

getWorkflowContext

public WorkflowContext getWorkflowContext()

getLighthouseContext

public LighthouseContext getLighthouseContext()

getLighthouseSimulator

public LighthouseSimulator getLighthouseSimulator()
If you need some of the extended methods defined on LighthouseSimulator call this.


setTrace

public void setTrace(boolean b)

setVerbose

public void setVerbose(boolean b)

println

public static void println(java.lang.String msg)

setInterceptor

public void setInterceptor(Interceptor i)
Install an interceptor for WorkflowApplication calls.


setInvokeInterceptor

public void setInvokeInterceptor(InvokeInterceptor ii)
Install an interceptor for expressions.


add

public void add(WFProcess p)
         throws WavesetException
Throws:
WavesetException

clearExecutionState

public void clearExecutionState()
                         throws WavesetException
Remove all TaskInstances and WorkItems from the environment.

Throws:
WavesetException

run

public void run(WFProcess p)
         throws WavesetException
Throws:
WavesetException

execute

public TaskInstance execute(java.lang.String objname,
                            java.lang.String taskname,
                            GenericObject inputs)
                     throws WavesetException
The main task entry point for workflow task simulation. The "objname" may either be a TaskDefinition name or a TaskInstance name. If it is a TaskDefinition name, an new TaskInstance will be created whose name is "taskname". If you do not specify "taskName" a random name will be generated.

Throws:
WavesetException

execute

public TaskInstance execute(TaskDefinition def,
                            java.lang.String taskname,
                            GenericObject inputs)
                     throws WavesetException
Execute a workflow task definition.

Throws:
WavesetException

execute

public TaskInstance execute(java.lang.String objname)
                     throws WavesetException
Throws:
WavesetException

execute

public TaskInstance execute(java.lang.String objname,
                            GenericObject inputs)
                     throws WavesetException
Throws:
WavesetException

execute

public void execute(TaskInstance task)
             throws WavesetException
Execute directly from a TaskInstance.

Throws:
WavesetException

getWorkItems

public java.util.List getWorkItems(java.lang.String owner)
                            throws WavesetException
Return a list of all WorkItem objects assigned to the given user. If no user name is given, all work items are returned.

Throws:
WavesetException

updateWorkItem

public void updateWorkItem(WorkItem item)
                    throws WavesetException
Throws:
WavesetException

usage

public static void usage()

main

public static void main(java.lang.String[] args)