Class ExecutableScript
- java.lang.Object
-
- org.camunda.bpm.engine.impl.scripting.ExecutableScript
-
- Direct Known Subclasses:
CompiledExecutableScript,DynamicExecutableScript
public abstract class ExecutableScript extends java.lang.ObjectRepresents an executable script.
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringlanguageThe language of the script.
-
Constructor Summary
Constructors Modifier Constructor Description protectedExecutableScript(java.lang.String language)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Objectevaluate(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.Bindings bindings)java.lang.Objectexecute(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.Bindings bindings)Evaluates the script using the provided engine and bindingsprotected java.lang.StringgetActivityIdExceptionMessage(VariableScope variableScope)java.lang.StringgetLanguage()The language in which the script is written.
-
-
-
Method Detail
-
getLanguage
public java.lang.String getLanguage()
The language in which the script is written.- Returns:
- the language
-
execute
public java.lang.Object execute(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.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 java.lang.String getActivityIdExceptionMessage(VariableScope variableScope)
-
evaluate
protected abstract java.lang.Object evaluate(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.Bindings bindings)
-
-