Class ExpressionEvaluationHandler
java.lang.Object
org.camunda.bpm.dmn.engine.impl.evaluation.ExpressionEvaluationHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ElProviderprotected final FeelEngineprotected static final DmnEngineLoggerprotected final DmnScriptEngineResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BindingscreateScriptBindings(ScriptEngine scriptEngine, VariableContext variableContext) Creates the bindings a script expression is evaluated against: the variables ofvariableContextplus thevariableContextitself.protected voiddisposeScriptBindings(ScriptEngine scriptEngine, Bindings bindings) Releases bindings created bycreateScriptBindings(javax.script.ScriptEngine, org.camunda.bpm.engine.variable.context.VariableContext); for GraalJS the polyglotContextbehind them.protected ObjectevaluateElExpression(String expressionLanguage, String expressionText, VariableContext variableContext, CachedExpressionSupport cachedExpressionSupport) evaluateExpression(String expressionLanguage, DmnExpressionImpl expression, VariableContext variableContext) protected ObjectevaluateFeelSimpleExpression(String expressionText, VariableContext variableContext) protected ObjectevaluateScriptExpression(String expressionLanguage, VariableContext variableContext, String expressionText, CachedCompiledScriptSupport cachedCompiledScriptSupport) protected StringgetExpressionTextForLanguage(DmnExpressionImpl expression, String expressionLanguage) protected ScriptEnginegetScriptEngineForName(String expressionLanguage) protected booleanisEcmaScript(ScriptEngine scriptEngine) protected booleanisElExpression(String expressionLanguage) booleanisFeelExpressionLanguage(String expressionLanguage) protected booleanisGraalJs(ScriptEngine scriptEngine)
-
Field Details
-
LOG
-
scriptEngineResolver
-
elProvider
-
feelEngine
-
-
Constructor Details
-
ExpressionEvaluationHandler
-
-
Method Details
-
evaluateExpression
public Object evaluateExpression(String expressionLanguage, DmnExpressionImpl expression, VariableContext variableContext) -
evaluateScriptExpression
protected Object evaluateScriptExpression(String expressionLanguage, VariableContext variableContext, String expressionText, CachedCompiledScriptSupport cachedCompiledScriptSupport) -
evaluateElExpression
protected Object evaluateElExpression(String expressionLanguage, String expressionText, VariableContext variableContext, CachedExpressionSupport cachedExpressionSupport) -
evaluateFeelSimpleExpression
protected Object evaluateFeelSimpleExpression(String expressionText, VariableContext variableContext) -
getExpressionTextForLanguage
protected String getExpressionTextForLanguage(DmnExpressionImpl expression, String expressionLanguage) -
createScriptBindings
Creates the bindings a script expression is evaluated against: the variables ofvariableContextplus thevariableContextitself.For GraalJS the variables are copied into the engine's own
Bindings. Passing a foreignBindingsimplementation such asVariableContextScriptBindingswould make GraalJS create an additional polyglotContextfor every evaluation and keep it to itself, so that it can never be closed - see issue #3174. Every other engine evaluates againstVariableContextScriptBindings. Release the result withdisposeScriptBindings(javax.script.ScriptEngine, javax.script.Bindings). -
disposeScriptBindings
Releases bindings created bycreateScriptBindings(javax.script.ScriptEngine, org.camunda.bpm.engine.variable.context.VariableContext); for GraalJS the polyglotContextbehind them. Never throws. -
isGraalJs
-
getScriptEngineForName
-
isEcmaScript
- Returns:
trueifscriptEngine's factory reports the ECMAScript/GraalJS language name - see the exclusion inevaluateScriptExpression(java.lang.String, org.camunda.bpm.engine.variable.context.VariableContext, java.lang.String, org.camunda.bpm.dmn.engine.impl.CachedCompiledScriptSupport).
-
isElExpression
-
isFeelExpressionLanguage
-