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 java.lang.String
scriptSource
The source of the script.protected boolean
shouldBeCompiled
Flag 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(java.lang.String language, java.lang.String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.script.CompiledScript
compile(javax.script.ScriptEngine scriptEngine, java.lang.String language, java.lang.String src)
protected void
compileScript(javax.script.ScriptEngine engine)
java.lang.Object
evaluate(javax.script.ScriptEngine engine, VariableScope variableScope, javax.script.Bindings bindings)
protected java.lang.Object
evaluateScript(javax.script.ScriptEngine engine, javax.script.Bindings bindings)
java.lang.String
getScriptSource()
boolean
isShouldBeCompiled()
void
setScriptSource(java.lang.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
-
-
-
-
Method Detail
-
evaluate
public java.lang.Object evaluate(javax.script.ScriptEngine engine, VariableScope variableScope, javax.script.Bindings bindings)
- Overrides:
evaluate
in classCompiledExecutableScript
-
compileScript
protected void compileScript(javax.script.ScriptEngine engine)
-
compile
public javax.script.CompiledScript compile(javax.script.ScriptEngine scriptEngine, java.lang.String language, java.lang.String src)
-
evaluateScript
protected java.lang.Object evaluateScript(javax.script.ScriptEngine engine, javax.script.Bindings bindings) throws javax.script.ScriptException
- Throws:
javax.script.ScriptException
-
getScriptSource
public java.lang.String getScriptSource()
-
setScriptSource
public void setScriptSource(java.lang.String scriptSource)
Sets the script source code. And invalidates any cached compilation result.- Parameters:
scriptSource
- the new script source code
-
isShouldBeCompiled
public boolean isShouldBeCompiled()
-
-