Class ExecutableScript
- java.lang.Object
-
- org.camunda.bpm.engine.impl.scripting.ExecutableScript
-
- Direct Known Subclasses:
CompiledExecutableScript
,DynamicExecutableScript
public abstract class ExecutableScript extends Object
Represents an executable script.
- Author:
- Daniel Meyer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExecutableScript(String language)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Object
evaluate(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings)
Object
execute(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings)
Evaluates the script using the provided engine and bindingsprotected String
getActivityIdExceptionMessage(VariableScope variableScope)
String
getLanguage()
The language in which the script is written.
-
-
-
Field Detail
-
language
protected final String language
The language of the script. Used to resolve theScriptEngine
.
-
-
Constructor Detail
-
ExecutableScript
protected ExecutableScript(String language)
-
-
Method Detail
-
getLanguage
public String getLanguage()
The language in which the script is written.- Returns:
- the language
-
execute
public Object execute(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings)
Evaluates the script using the provided engine and bindings
- Parameters:
scriptEngine
- the script engine to use for evaluating the script.variableScope
- the variable scope of the executionbindings
- the bindings to use for evaluating the script.- Returns:
- the result of the script evaluation
- Throws:
ProcessEngineException
- in case the script cannot be evaluated.
-
getActivityIdExceptionMessage
protected String getActivityIdExceptionMessage(VariableScope variableScope)
-
evaluate
protected abstract Object evaluate(ScriptEngine scriptEngine, VariableScope variableScope, Bindings bindings)
-
-