Class SourceExecutableScript
- java.lang.Object
-
- org.camunda.bpm.engine.impl.scripting.ExecutableScript
-
- org.camunda.bpm.engine.impl.scripting.CompiledExecutableScript
-
- org.camunda.bpm.engine.impl.scripting.SourceExecutableScript
-
- Direct Known Subclasses:
ResourceExecutableScript
public class SourceExecutableScript extends CompiledExecutableScript
A script which is provided as source code.- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected StringscriptSourceThe source of the script.protected booleanshouldBeCompiledFlag to signal if the script should be compiled-
Fields inherited from class org.camunda.bpm.engine.impl.scripting.CompiledExecutableScript
compiledScript
-
Fields inherited from class org.camunda.bpm.engine.impl.scripting.ExecutableScript
language
-
-
Constructor Summary
Constructors Constructor Description SourceExecutableScript(String language, String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledScriptcompile(ScriptEngine scriptEngine, String language, String src)protected voidcompileScript(ScriptEngine engine)Objectevaluate(ScriptEngine engine, VariableScope variableScope, Bindings bindings)protected ObjectevaluateScript(ScriptEngine engine, Bindings bindings)StringgetScriptSource()booleanisShouldBeCompiled()voidsetScriptSource(String scriptSource)Sets the script source code.-
Methods inherited from class org.camunda.bpm.engine.impl.scripting.CompiledExecutableScript
getCompiledScript, setCompiledScript
-
Methods inherited from class org.camunda.bpm.engine.impl.scripting.ExecutableScript
execute, getActivityIdExceptionMessage, getLanguage
-
-
-
-
Field Detail
-
scriptSource
protected String scriptSource
The source of the script.
-
shouldBeCompiled
protected boolean shouldBeCompiled
Flag to signal if the script should be compiled
-
-
Method Detail
-
evaluate
public Object evaluate(ScriptEngine engine, VariableScope variableScope, Bindings bindings)
- Overrides:
evaluatein classCompiledExecutableScript
-
compileScript
protected void compileScript(ScriptEngine engine)
-
compile
public CompiledScript compile(ScriptEngine scriptEngine, String language, String src)
-
evaluateScript
protected Object evaluateScript(ScriptEngine engine, Bindings bindings) throws ScriptException
- Throws:
ScriptException
-
getScriptSource
public String getScriptSource()
-
setScriptSource
public void setScriptSource(String scriptSource)
Sets the script source code. And invalidates any cached compilation result.- Parameters:
scriptSource- the new script source code
-
isShouldBeCompiled
public boolean isShouldBeCompiled()
-
-