public ScriptEngine getScriptEngineForLanguage ( String language ) { if ( language != null ) { language = language . toLowerCase ( ) ; } ProcessApplicationReference pa = Context . getCurrentProcessApplication ( ) ; ProcessEngineConfigurationImpl config = Context . getProcessEngineConfiguration ( ) ; ScriptEngine engine = null ; if ( config . isEnableFetchScriptEngineFromProcessApplication ( ) ) { if ( pa != null ) { engine = getPaScriptEngine ( language , pa ) ; } } if ( engine == null ) { engine = getGlobalScriptEngine ( language ) ; } return engine ; }
Loads the given script engine by language name . Will throw an exception if no script engine can be loaded for the given language name .