Message Boards
Liferay 7.1 Custom Form Storage Adapter - showing error message
Gopal Satapathy, modified 2 Years ago.
Liferay 7.1 Custom Form Storage Adapter - showing error message
Junior Member Posts: 74 Join Date: 7/28/15 Recent PostsHello,
i have created a Custom Form Storage Adapter which gets called on form submission and will call an external webservice to send data.
@Override
protected long doCreate(long companyId, long ddmStructureId, DDMFormValues ddmFormValues,
ServiceContext serviceContext) throws Exception {
//call exteral web service
if (success) {
LOGGER.info("success");
} else {
LOGGER.error("failure");
throw new Exception();
}
validate(ddmFormValues, serviceContext);
long fileId = _counterLocalService.increment();
DDMStructureVersion ddmStructureVersion = _ddmStructureVersionLocalService
.getLatestStructureVersion(ddmStructureId);
long classNameId = PortalUtil.getClassNameId(CustomFormAdapterComponent.class.getName());
_ddmStorageLinkLocalService.addStorageLink(classNameId, fileId, ddmStructureVersion.getStructureVersionId(),
serviceContext);
saveFile(ddmStructureVersion.getStructureVersionId(), fileId, ddmFormValues);
return fileId;
}
i am already throwing new Exception() in case of webservice call failure , but no error is coming in UI. Can somebody please help with this issue ?