Class ExecutableScript

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String language
      The language of the script.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ExecutableScript​(java.lang.String language)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.Object evaluate​(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.Bindings bindings)  
      java.lang.Object execute​(javax.script.ScriptEngine scriptEngine, VariableScope variableScope, javax.script.Bindings bindings)
      Evaluates the script using the provided engine and bindings
      protected java.lang.String getActivityIdExceptionMessage​(VariableScope variableScope)  
      java.lang.String getLanguage()
      The language in which the script is written.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • language

        protected final java.lang.String language
        The language of the script. Used to resolve the ScriptEngine.
    • Constructor Detail

      • ExecutableScript

        protected ExecutableScript​(java.lang.String language)
    • 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 execution
        bindings - 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)