com.waveset.workflow
Interface WorkflowContext

All Superinterfaces:
VariableResolver
All Known Implementing Classes:
WorkflowEngine

public interface WorkflowContext
extends VariableResolver

The interface of an object passed into WorkflowApplication implementations that provides a handle for various system resources, and a window into the state of the case.


Field Summary
static java.lang.String code_id
          This is only public so that it can be contained in an interface.
static java.lang.String VAR_CASE_TERMINATED
          Deprecated. Use WFProcess.VAR_CASE_TERMINATED
 
Method Summary
 com.waveset.security.authz.AccessPolicy getAccessPolicy()
          Return an access policy object, used for checking authorization.
 WFCase.Result getActionResult()
          Return the Result object in the WFCase that corresponds to the the Action in the WFProcess.
 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()
          Obtain an object cache.
 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()
          Obtain the lighthouse context.
 LighthouseContext getLighthouseContext(java.lang.String user)
          Obtain the lighthouse context, configured for access by a particular user.
 com.waveset.repository.Repository getRepository()
          Obtain a repository.
 Subject getSubject()
          Return the Subject of the user executing this case.
 TaskInstance getTask()
          Obtain the TaskInstance that contains the executing case.
 java.lang.String getUser()
          Return the name of the effective user executing the case.
 java.lang.Object getVariable(java.lang.String name)
          Return the value of a case variable.
 java.util.Map getVariables()
          Return a map of all of the case variables
 boolean isTerminateRequested()
          Test the terminate request flag.
 void setVariable(java.lang.String name, java.lang.Object value)
          Set a case variable.
 
Methods inherited from interface com.waveset.util.VariableResolver
resolveVariable
 

Field Detail

code_id

public static final java.lang.String code_id
This is only public so that it can be contained in an interface.

See Also:
Constant Field Values

VAR_CASE_TERMINATED

public static final java.lang.String VAR_CASE_TERMINATED
Deprecated. Use WFProcess.VAR_CASE_TERMINATED

See Also:
Constant Field Values
Method Detail

getLighthouseContext

public LighthouseContext getLighthouseContext()
Obtain the lighthouse context. This is a new interface that should be used for all repository access. The context will be configured for access by the workflow task owner.


getLighthouseContext

public LighthouseContext getLighthouseContext(java.lang.String user)
Obtain the lighthouse context, configured for access by a particular user.


getCache

public ObjectCache getCache()
Obtain an object cache.

Some applications we call, might want to find their own objects. To keep repository connectivity flexible, we supply this, rather than making build their own.


getRepository

public com.waveset.repository.Repository getRepository()
Obtain a repository.

Some applications we call, might need direct access to the repository.


getAccessPolicy

public com.waveset.security.authz.AccessPolicy getAccessPolicy()
                                                        throws WavesetException
Return an access policy object, used for checking authorization.

Throws:
WavesetException

getUser

public java.lang.String getUser()
                         throws WavesetException
Return the name of the effective user executing the case.

Throws:
WavesetException

getSubject

public Subject getSubject()
                   throws WavesetException
Return the Subject of the user executing this case.

Throws:
WavesetException

getVariable

public java.lang.Object getVariable(java.lang.String name)
                             throws WavesetException
Return the value of a case variable.

May throw if the variable value is derived by evaluating an expression.

Throws:
WavesetException

getVariables

public java.util.Map getVariables()
                           throws WavesetException
Return a map of all of the case variables

Throws:
WavesetException

setVariable

public void setVariable(java.lang.String name,
                        java.lang.Object value)
                 throws WavesetException
Set a case variable.

Throws:
WavesetException

getArgument

public java.lang.Object getArgument(java.lang.String name)
                             throws WavesetException
Return the value of an action argument.

May throw if the argument value is derived by evaluating an expression.

Throws:
WavesetException

getArguments

public java.util.Map getArguments()
                           throws WavesetException
Return a map of all arguments available to the application.

Used by things that want to pass all the arguments to something else that knows what to look for.

Throws:
WavesetException

getCaseResult

public WavesetResult getCaseResult()
                            throws WavesetException
Obtain the global result being maintained by this case. The engine will deposit things in here as it runs, an appliation may also wish to add (or remove) things. The WavesetResult returned by an application is normally assimilated into this result object by default so you only need direct access to the result object if you need more control.

Throws:
WavesetException

getTask

public TaskInstance getTask()
                     throws WavesetException
Obtain the TaskInstance that contains the executing case. Hmm, I don't really want to expose this but there are times when you'd like to be able to modify characteristics of the task, and I don't feel like exposing a bunch of pseudo variables right now.

With this we don't really need getCaseResult, but since this may go away, keep both.

Throws:
WavesetException

isTerminateRequested

public boolean isTerminateRequested()
Test the terminate request flag.


getActionResult

public WFCase.Result getActionResult()
Return the Result object in the WFCase that corresponds to the the Action in the WFProcess. This can be used by a WorkflowApplication to determine where in the process they are being called from.


getExpressionState

public ExState getExpressionState()
Return the ExState encapsulating all of the workflow variables so that it can be used in rules evaluated by the application.