public interface ExecutionContext extends HandleResolver, TraceableExecution
Modifier and Type | Method and Description |
---|---|
void |
addSignal(Object signal)
Adds a signal to the signal queue.
|
void |
flushAll()
Flush of all sessions (core, org, human,...
|
CompiledContext |
getCompiled() |
CompiledContext |
getCompiled(String moduleName) |
ComponentService |
getComponentService()
Returns component service
|
long |
getContextId()
Returns the context id.
|
String |
getEvaluationLevel()
Returns evaluation level.
|
com.whitestein.lsps.model.ContextModelElement |
getModelElement()
Returns the corresponding context model element.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
ModelProviderClientService |
getModelProviderService() |
Namespace |
getNamespace()
Returns namespace associated with this context.
|
ExecutionContext |
getParentContext()
Returns the parent execution context or null if it does not exist.
|
String |
getPath()
Returns the full path to this context as a string.
|
QID |
getPathQID()
Returns the full path to this context as a QID.
|
ProcessInstance |
getProcessInstance()
Returns the process instance.
|
com.whitestein.lsps.model.ProcessModel |
getProcessModel()
Returns the process model.
|
InterpreterStackTrace |
getStackTrace()
Returns the interpreter stack trace.
|
String[] |
getStackTraceInfo()
Returns the stack trace info from the interpreter stack trace.
|
Object |
getVariableValue(QID name)
Resolves variable for given name and returns its value.
|
Object |
getVariableValue(String name)
Deprecated.
|
void |
persist(ValueHolder object)
When getting
ValueHolder s from the context, they may be later garbage collected. |
Namespace |
resolveVariableNamespace(QID name)
Resolves variable for given name and returns its containing namespace.
|
Namespace |
resolveVariableNamespace(String name)
Deprecated.
|
void |
setCompiled(CompiledContext compiledContext) |
void |
setVariableValue(QID name,
Object value)
Resolves variable for given name and sets its value.
|
void |
setVariableValue(String name,
Object value)
Deprecated.
|
getHandle, getValueHolder
addExecutionTrace, addExecutionTraceElement, getExecutionTrace
Namespace getNamespace()
Object getVariableValue(QID name)
Difference between this method and
Namespace.getVariableValue(String)
is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String)
on the resolved namespace.
name
- a variable nameIllegalArgumentException
- if variable for given name does not exist or the name is ambiguous@Deprecated Object getVariableValue(String name)
getVariableValue(QID)
Difference between this method and
Namespace.getVariableValue(String)
is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String)
on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
name
- a variable nameIllegalArgumentException
- if variable for given name does not exist or the name is ambiguousvoid setVariableValue(QID name, Object value)
Difference between this method and
Namespace.setVariableValue(String, Object)
is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object)
on the resolved namespace.
name
- a variable namevalue
- a new variable valueIllegalArgumentException
- if variable for given name does not exist or the name is ambiguous or if the
value cannot be assigned to the variable because of validation errors@Deprecated void setVariableValue(String name, Object value)
setVariableValue(QID, Object)
Difference between this method and
Namespace.setVariableValue(String, Object)
is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object)
on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
name
- a variable namevalue
- a new variable valueIllegalArgumentException
- if variable for given name does not exist or the name is ambiguous or if the
value cannot be assigned to the variable because of validation errorsNamespace resolveVariableNamespace(QID name)
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException
if the variable is not found
or the name is ambiguous.
name
- variable nameIllegalArgumentException
- if variable for given name does not exist or the name is ambiguous@Deprecated Namespace resolveVariableNamespace(String name)
resolveVariableNamespace(QID)
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException
if the variable is not found
or the name is ambiguous.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
name
- variable nameIllegalArgumentException
- if variable for given name does not exist or the name is ambiguousvoid addSignal(Object signal)
signal
- com.whitestein.lsps.model.ContextModelElement getModelElement()
long getContextId()
ExecutionContext getParentContext()
void persist(ValueHolder object)
ValueHolder
s from the context, they may be later garbage collected. This
method ensures that the object will never be garbage collected.object
- object to make persistentIllegalArgumentException
- if the object
cannot be made persistent (e.g. when the object
is
not from the context)QID getPathQID()
String getPath()
com.whitestein.lsps.model.ProcessModel getProcessModel()
ModelInstance getModelInstance()
ProcessInstance getProcessInstance()
void flushAll()
String getEvaluationLevel()
InterpreterStackTrace getStackTrace()
error exceptions
.
The method returns null
if the execution context is not a
JavaOperationExecutionContext
.
null
String[] getStackTraceInfo()
Should be equivalent to
return getStackTrace() != null ? getStackTrace().getStackTraceInfo() : null;
ComponentService getComponentService()
void setCompiled(CompiledContext compiledContext)
CompiledContext getCompiled()
CompiledContext getCompiled(String moduleName)
ModelProviderClientService getModelProviderService()
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.