code: public static ExecutableScript getScriptFormSource(String language, String source, ExpressionManager expressionManager, ScriptFactory scriptFactory) {
      ensureNotEmpty(NotValidException.class, "Script language", language);
      ensureNotNull(NotValidException.class, "Script source", source);
      if (isDynamicScriptExpression(language, source)) {
        Expression sourceExpression = expressionManager.createExpression(source);
        return getScriptFromSourceExpression(language, sourceExpression, scriptFactory);
      }
      else {
        return getScriptFromSource(language, source, scriptFactory);
      }
    }
docs: Creates a new {@link ExecutableScript} from a source. It excepts static and dynamic sources.
  Dynamic means that the source is an expression which will be evaluated during execution.
  
  @param language the language of the script
  @param source the source code of the script or an expression which evaluates to the source code
  @param expressionManager the expression manager to use to generate the expressions of dynamic scripts
  @param scriptFactory the script factory used to create the script
  @return the newly created script
  @throws NotValidException if language is null or empty or source is null