|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.bpmn.behavior.ScriptInvocationHandler
public class ScriptInvocationHandler
Handles the script invocation in a given VariableScope. The script invocation
context supports pre-compilation of the script sources into a CompiledScript.
This class is thread-safe and instances of this class are meant to be used for evaluating the same script multiple, times in different variable scope instances.
| Field Summary | |
|---|---|
protected CompiledScript |
compiledScript
Holds the compiled script |
protected boolean |
isScriptCompilationSupported
Flag indicating whether script compilation is supported. |
protected String |
language
The language in which the scipt is written (JavaScript, Groovy ...). |
protected String |
resultVariable
The name of the variable under which the result of the script should be stored in the variable scope. |
protected String |
script
Source code of the script to execute. |
| Constructor Summary | |
|---|---|
ScriptInvocationHandler(String script,
String language,
String resultVariable)
|
|
| Method Summary | |
|---|---|
void |
evaluate(VariableScope variableScope)
Evaluates the script in the given variable scope. |
protected void |
preCompileScript(ScriptingEngines scriptingEngines)
Will attempt to pre-compile a script and cache it in compiledScript. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String script
protected String language
protected String resultVariable
protected CompiledScript compiledScript
protected boolean isScriptCompilationSupported
preCompileScript(ScriptingEngines)
| Constructor Detail |
|---|
public ScriptInvocationHandler(String script,
String language,
String resultVariable)
script - source code of the scriptlanguage - the language usedresultVariable - the variable name under which the result of the script invocation (if any) should be stored| Method Detail |
|---|
public void evaluate(VariableScope variableScope)
Evaluates the script in the given variable scope.
variableScope - the variable scope in which the script should be evaluate
ProcessEngineException - in case the script cannot be evaluated.protected void preCompileScript(ScriptingEngines scriptingEngines)
compiledScript. If the
script compilation returns 'null', isScriptCompilationSupported will be set to
false and re-compilation will not be attempted.
scriptingEngines -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||