Class SourceExecutableScript
java.lang.Object
org.finos.fluxnova.bpm.engine.impl.scripting.ExecutableScript
org.finos.fluxnova.bpm.engine.impl.scripting.CompiledExecutableScript
org.finos.fluxnova.bpm.engine.impl.scripting.SourceExecutableScript
- Direct Known Subclasses:
ResourceExecutableScript
A script which is provided as source code.
- Author:
- Daniel Meyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringDigest of the processed script source used to produce the currentCompiledExecutableScript.compiledScript.protected StringThe source of the script.protected booleanFlag to signal if the script should be compiledFields inherited from class org.finos.fluxnova.bpm.engine.impl.scripting.CompiledExecutableScript
compiledScriptFields inherited from class org.finos.fluxnova.bpm.engine.impl.scripting.ExecutableScript
language -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompile(ScriptEngine scriptEngine, String language, String src) protected voidcompileScript(ScriptEngine engine, String processedScript) evaluate(ScriptEngine engine, VariableScope variableScope, Bindings bindings) protected ObjectevaluateScript(ScriptEngine engine, String processedScript, Bindings bindings) protected voidInvalidates all cached compilation state for this script instance.booleanvoidsetScriptSource(String scriptSource) Sets the script source code.Methods inherited from class org.finos.fluxnova.bpm.engine.impl.scripting.CompiledExecutableScript
evaluateCompiledScript, getCompiledScript, setCompiledScriptMethods inherited from class org.finos.fluxnova.bpm.engine.impl.scripting.ExecutableScript
execute, getActivityIdExceptionMessage, getLanguage, preprocessScript
-
Field Details
-
scriptSource
The source of the script. -
shouldBeCompiled
protected volatile boolean shouldBeCompiledFlag to signal if the script should be compiled -
compiledScriptSourceDigest
Digest of the processed script source used to produce the currentCompiledExecutableScript.compiledScript. Anullvalue indicates no compiled artifact is present.
-
-
Constructor Details
-
SourceExecutableScript
-
-
Method Details
-
evaluate
- Overrides:
evaluatein classCompiledExecutableScript
-
compileScript
-
compile
-
evaluateScript
protected Object evaluateScript(ScriptEngine engine, String processedScript, Bindings bindings) throws ScriptException - Throws:
ScriptException
-
getScriptSource
-
setScriptSource
Sets the script source code. And invalidates any cached compilation result.- Parameters:
scriptSource- the new script source code
-
invalidateCompiledScript
protected void invalidateCompiledScript()Invalidates all cached compilation state for this script instance.This method clears the currently cached compiled artifact and its associated source digest, and marks the script as eligible for compilation on the next evaluation. The method is synchronized to guarantee that cache reset is applied atomically with respect to concurrent evaluation and source updates.
-
isShouldBeCompiled
public boolean isShouldBeCompiled()
-