Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay 7.1 Custom Form Storage Adapter - showing error message
Hello,
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 ?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™