Script script = InvokerHelper.createScript(GroovyUtil.getScriptClassFromLocation(this.getLocation(modelService)), GroovyUtil.getBinding(gContext));
Object resultObj = null;
if (UtilValidate.isEmpty(modelService.invoke)) {
resultObj = script.run();
} else {
resultObj = script.invokeMethod(modelService.invoke, EMPTY_ARGS);
}
if (resultObj != null && resultObj instanceof Map<?, ?>) {
return cast(resultObj);
} else if (gContext.get("result") != null && gContext.get("result") instanceof Map<?, ?>) {
return cast(gContext.get("result"));