}
}
input = UtilMisc.toMap("userLogin", userLogin, "emailAddress", email, "partyId", partyId, "fromDate", fromDate, "contactMechPurposeTypeId", "OTHER_EMAIL");
Map<String, Object> serviceResults = dispatcher.runSync("createPartyEmailAddress", input);
if (ServiceUtil.isError(serviceResults)) {
throw new GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
}
String contactMechId = (String) serviceResults.get("contactMechId");
// create a new association at this fromDate to the anonymous party with status accepted
input = UtilMisc.toMap("userLogin", userLogin, "contactListId", contactList.get("contactListId"),
"partyId", partyId, "fromDate", fromDate, "statusId", "CLPT_PENDING", "preferredContactMechId", contactMechId, "baseLocation", context.get("baseLocation"));
serviceResults = dispatcher.runSync("createContactListParty", input);
if (ServiceUtil.isError(serviceResults)) {
throw new GenericServiceException(ServiceUtil.getErrorMessage(serviceResults));
}
} catch (GenericEntityException e) {
String error = UtilProperties.getMessage(resourceOrder, "checkhelper.problems_reading_database", locale);
Debug.logInfo(e, error + e.getMessage(), module);
return ServiceUtil.returnError(error);