|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.workflow.WorkflowEngine
An object encapsulating the core workflow logic
Field Summary | |
static java.lang.String |
ACTION_ADD_RESULT
An action implemented by checkBuiltinAction that adds an object to the task result. |
static java.lang.String |
ACTION_SET_RESULT
An action implemented by checkBuiltinAction that adds or modifies a named object in the task result. |
static java.lang.String |
ACTION_SET_RESULT_LIMIT
An action implemented by checkBuiltinAction that modifies the result limit value of the task instance. |
static java.lang.String |
code_id
|
static java.lang.String |
VAR_ACTION_ERROR
Deprecated. Use WFProcess.VAR_ACTION_ERROR |
static java.lang.String |
VAR_ACTION_RESULT
Deprecated. Use WFProcess.VAR_ACTION_RESULT |
static java.lang.String |
VAR_ACTION_SUPPRESSED
Deprecated. Use WFProcess.VAR_ACTION_SUPPRESSED |
static java.lang.String |
VAR_ACTION_TIMEOUT
Deprecated. Use WFProcess.VAR_ACTION_TIMEOUT |
static java.lang.String |
VAR_APPLICATION
Deprecated. Use WFProcess.VAR_APPLICATION |
static java.lang.String |
VAR_CASE_OWNER
Deprecated. Use WFProcess.VAR_CASE_OWNER |
static java.lang.String |
VAR_CASE_RESULT
Deprecated. Use WFProcess.VAR_CASE_RESULT |
static java.lang.String |
VAR_CONTEXT
Deprecated. Use WFProcess.VAR_CONTEXT |
static java.lang.String |
VAR_TRACE
Deprecated. Use WFProcess.VAR_TRACE |
Fields inherited from interface com.waveset.workflow.WorkflowContext |
VAR_CASE_TERMINATED |
Constructor Summary | |
WorkflowEngine()
Build an engine. |
Method Summary | |
protected void |
breakpointEndAndAudit(VariableScope context,
com.sun.idm.debugger.common.Locatable target)
|
protected void |
breakpointEndAndAudit(VariableScope context,
com.sun.idm.debugger.common.Locatable target,
java.lang.Object value)
|
protected void |
breakpointStartAndAudit(VariableScope context,
com.sun.idm.debugger.common.Locatable target)
|
void |
execute(LighthouseContext context,
WFCase wfcase,
java.util.List items)
This is one of two main entry points for the workflow engine. |
void |
execute(LighthouseContext context,
WFCase wfcase,
java.lang.String taskId)
Execute the case, using the LighthouseContext to manage the work item list. |
com.waveset.security.authz.AccessPolicy |
getAccessPolicy()
Returns the access policy object to a WorkflowApplication. |
WFCase.Result |
getActionResult()
This is meant to be called only from a WorkflowApplication to find out where they are. |
protected WorkflowApplication |
getApplication(WFProcess.Action action)
Locate the class that implements a workflow application for an action. |
java.lang.Object |
getArgument(java.lang.String name)
Return the value of an action argument. |
java.util.Map |
getArguments()
Return a map of all arguments available to the application. |
ObjectCache |
getCache()
Returns an object cache to a WorkflowApplication. |
WavesetResult |
getCaseResult()
Obtain the global result being maintained by this case. |
ExState |
getExpressionState()
Return the ExState encapsulating all of the workflow variables so that it can be used in rules evaluated by the application. |
LighthouseContext |
getLighthouseContext()
Return the lighthouse context. |
LighthouseContext |
getLighthouseContext(java.lang.String user)
Return the lighthouse context, configured for a particular user. |
java.util.Map |
getLockOptions()
Return the lock options used with LighthouseContext calls. |
com.waveset.repository.Repository |
getRepository()
Returns a repository object to a WorkflowApplication. |
Subject |
getSubject()
Returns the Subject used for authorizing operations performed by this case. |
TaskInstance |
getTask()
Obtain the TaskInstance that contains the executing case. |
java.lang.String |
getUser()
Returns the effective user name to a WorkflowApplication. |
java.lang.Object |
getVariable(java.lang.String name)
Returns the value of a case variable. |
java.util.Map |
getVariables()
Returns a map containing all of the effective case variables. |
void |
initVariables(Variable[] variables,
VariableScope scope)
Initialize variables defined for a scope. |
boolean |
isTerminateRequested()
Test the terminate has been requested in the case. |
protected void |
markBreakpointStack(VariableScope context)
|
java.lang.Object |
resolveVariable(java.lang.String name)
WorkflowContext now extends VariableResolver, so it needs this too. |
void |
setExternalTraceControl(boolean b)
|
void |
setInterceptor(Interceptor i)
Install an interceptor for application calls. |
void |
setInvokeInterceptor(InvokeInterceptor ii)
Install an interceptor for |
void |
setTaskInstance(TaskInstance ti)
|
void |
setTerminateRequested(boolean term)
Set the terminate request case variable. |
void |
setTolerateUnresolvedOwner(boolean b)
|
void |
setTrace(WorkflowTraceBuffer buf)
Set an externally constructed trace buffer. |
void |
setVariable(java.lang.String name,
java.lang.Object value)
Sets a case variable. |
protected void |
unwindBreakpointStack()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static final java.lang.String VAR_TRACE
public static final java.lang.String VAR_APPLICATION
public static final java.lang.String VAR_CASE_OWNER
public static final java.lang.String VAR_ACTION_TIMEOUT
public static final java.lang.String VAR_ACTION_ERROR
public static final java.lang.String VAR_ACTION_RESULT
public static final java.lang.String VAR_ACTION_SUPPRESSED
public static final java.lang.String VAR_CONTEXT
public static final java.lang.String VAR_CASE_RESULT
public static final java.lang.String ACTION_ADD_RESULT
public static final java.lang.String ACTION_SET_RESULT
public static final java.lang.String ACTION_SET_RESULT_LIMIT
Constructor Detail |
public WorkflowEngine()
Method Detail |
public void setTaskInstance(TaskInstance ti)
public void setTolerateUnresolvedOwner(boolean b)
public void setExternalTraceControl(boolean b)
public void setInterceptor(Interceptor i)
public void setInvokeInterceptor(InvokeInterceptor ii)
public void execute(LighthouseContext context, WFCase wfcase, java.lang.String taskId) throws WavesetException
This entry point is used when it is known that work items are being managed in a persistent store encapsulated with the LighthouseContext. If you want more control over how the work items are managed, you may use the other execute() method that allows the work item list to be passed in and will not attempt to use the LighthouseContext.
WavesetException
public void execute(LighthouseContext context, WFCase wfcase, java.util.List items) throws WavesetException
Work items to assimilate are passed in a list, new work items will accumulate on the WFCase._newItems list, outstanding work items that become invalid due to transitions will accumulate on the WFCase._invalidItems list. There are no LighthouseContext calls by the engine below this point, though a WorkflowApplication may use it.
WavesetException
public java.util.Map getLockOptions()
protected void breakpointStartAndAudit(VariableScope context, com.sun.idm.debugger.common.Locatable target) throws WavesetException
WavesetException
protected void breakpointEndAndAudit(VariableScope context, com.sun.idm.debugger.common.Locatable target) throws WavesetException
WavesetException
protected void breakpointEndAndAudit(VariableScope context, com.sun.idm.debugger.common.Locatable target, java.lang.Object value) throws WavesetException
WavesetException
protected void markBreakpointStack(VariableScope context)
protected void unwindBreakpointStack()
public void initVariables(Variable[] variables, VariableScope scope) throws WavesetException
WavesetException
protected WorkflowApplication getApplication(WFProcess.Action action) throws WavesetException
We maintain a map of previously resolved applications for performance. Note that the application map could be shared by all Executor objects if we end up with many of them.
Similar reflection code now exists in PolicyManager, and will elsewhere. Try to move this somewhere we can share?
We'll keep asking the cache for a configuration object, but if the config changes, we don't currently invalidate the existing map, which may be stale. Could use the new lastMod to keep this in sync.
WavesetException
public LighthouseContext getLighthouseContext()
getLighthouseContext
in interface WorkflowContext
public LighthouseContext getLighthouseContext(java.lang.String user)
getLighthouseContext
in interface WorkflowContext
public ObjectCache getCache()
getCache
in interface WorkflowContext
public com.waveset.repository.Repository getRepository()
getRepository
in interface WorkflowContext
public com.waveset.security.authz.AccessPolicy getAccessPolicy() throws WavesetException
getAccessPolicy
in interface WorkflowContext
WavesetException
public java.lang.String getUser() throws WavesetException
getUser
in interface WorkflowContext
WavesetException
public Subject getSubject() throws WavesetException
getSubject
in interface WorkflowContext
WavesetException
public java.lang.Object getVariable(java.lang.String name) throws WavesetException
getVariable
in interface WorkflowContext
WavesetException
public java.lang.Object resolveVariable(java.lang.String name) throws WavesetException
resolveVariable
in interface VariableResolver
WavesetException
public java.util.Map getVariables() throws WavesetException
getVariables
in interface WorkflowContext
WavesetException
public void setVariable(java.lang.String name, java.lang.Object value) throws WavesetException
setVariable
in interface WorkflowContext
WavesetException
public java.lang.Object getArgument(java.lang.String name) throws WavesetException
getArgument
in interface WorkflowContext
WavesetException
public java.util.Map getArguments() throws WavesetException
Used by things that want to pass all the arguments to something else that knows what to look for.
Hmm, not sure I like this... Should we build a new HashMap to be safe?
getArguments
in interface WorkflowContext
WavesetException
public WavesetResult getCaseResult()
getCaseResult
in interface WorkflowContext
public TaskInstance getTask()
getTask
in interface WorkflowContext
public WFCase.Result getActionResult()
getActionResult
in interface WorkflowContext
public ExState getExpressionState()
WorkflowContext
getExpressionState
in interface WorkflowContext
public void setTrace(WorkflowTraceBuffer buf)
public boolean isTerminateRequested()
isTerminateRequested
in interface WorkflowContext
public void setTerminateRequested(boolean term)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |