public static AbstractScriptLanguageMgmt getAbstractScriptLanguageMgmt() {
Stack<AbstractScriptLanguageMgmt> stack = getStack(abstractScriptLanguageMgmtThreadLocal);
if (stack.isEmpty()) {
AbstractScriptLanguageMgmt abstractScriptLanguageMgmt = null;
ScriptLanguageConfig scriptLanguageConfig = getProcessEngineConfiguration().getScriptLanguageConfig();
for (ScriptLanguage scriptLanguage : scriptLanguageConfig.getScriptLanguage()) {
if (scriptLanguage.getId().equals(scriptLanguageConfig.getSelected())) {
abstractScriptLanguageMgmt = (AbstractScriptLanguageMgmt) ReflectUtil.instantiate(scriptLanguage.getClassImpl());
break;
}
}
Context.setAbstractScriptLanguageMgmt(abstractScriptLanguageMgmt.init());
return abstractScriptLanguageMgmt;
}
return stack.peek();
}