// If action result is an TMLForm, transform it back into a services form
if (result instanceof de.innovationgate.wgpublisher.webtml.utils.TMLForm) {
de.innovationgate.wgpublisher.webtml.utils.TMLForm tmlForm = (de.innovationgate.wgpublisher.webtml.utils.TMLForm) result;
Form servicesForm = tmlForm.exportServicesForm();
ActionResult actionResult = new ActionResult();
actionResult.setForm(servicesForm);
return actionResult;
} else {
ActionResult actionResult = new ActionResult();
actionResult.setNativeResult(result);
return actionResult;
}
}
catch (TMLScriptException e) {
throw new WGAServiceException(e.getMessage());