Search in sources :

Example 11 with Campaign

use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.

the class CampaignServiceImpl method generateAndSendMessage.

@Transactional(rollbackOn = { Exception.class })
protected void generateAndSendMessage(Campaign campaign, Model model, Template template) throws ClassNotFoundException, InstantiationException, IllegalAccessException, MessagingException, IOException, AxelorException, JSONException {
    Message message = templateMessageMarketingService.generateAndSendMessage(model, template);
    message.setRelatedTo1Select(Campaign.class.getCanonicalName());
    message.setRelatedTo1SelectId(campaign.getId());
}
Also used : Campaign(com.axelor.apps.marketing.db.Campaign) Message(com.axelor.apps.message.db.Message) IExceptionMessage(com.axelor.apps.marketing.exception.IExceptionMessage) Transactional(com.google.inject.persist.Transactional)

Aggregations

Campaign (com.axelor.apps.marketing.db.Campaign)11 CampaignService (com.axelor.apps.marketing.service.CampaignService)10 MetaFile (com.axelor.meta.db.MetaFile)2 Partner (com.axelor.apps.base.db.Partner)1 Lead (com.axelor.apps.crm.db.Lead)1 IExceptionMessage (com.axelor.apps.marketing.exception.IExceptionMessage)1 Message (com.axelor.apps.message.db.Message)1 Transactional (com.google.inject.persist.Transactional)1