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()
Returns compiled context.
|
CompiledContext |
getCompiled(String moduleName)
Returns compiled context of the module
|
ComponentService |
getComponentService()
Returns component service
|
long |
getContextId()
Returns the context id.
|
RuntimeToPersistentConverter |
getConverter()
Returns converter.
|
String |
getEvaluationLevel()
Returns evaluation level.
|
default <T extends ValueHolder> |
getInLevel(T holder)
Returns the value holder in the evaluation level of this context.
|
com.whitestein.lsps.model.ContextModelElement |
getModelElement()
Returns the corresponding context model element.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
ModelProvider |
getModelProvider()
Returns model provider.
|
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.
|
String |
getProcessPath()
Returns the full path to model element that is bound to this context.
|
QID |
getProcessPathQID()
Returns the full path to model element that is bound to this context.
|
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.
|
Namespace |
resolveVariableNamespace(QID name)
Resolves variable for given name and returns its containing namespace.
|
Namespace |
resolveVariableNamespace(String name)
Deprecated.
|
void |
setCompiled(CompiledContext compiledContext)
Sets compiled context.
|
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()
QID getPathQID()
String getPath()
QID getProcessPathQID()
String getProcessPath()
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
- CompiledContext getCompiled()
CompiledContext getCompiled(String moduleName)
moduleName
- ModelProvider getModelProvider()
RuntimeToPersistentConverter getConverter()
default <T extends ValueHolder> T getInLevel(T holder)
T
- holder
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.