113114115116117118119120121122123
enc.setObjectInstance(oi); // save the instance and template try { campaign.save(); oi.save(); } catch(Exception e) { logger.error("Exception while saving encounter: " + e.getLocalizedMessage(), e); // TODO: alert service
155156157158159160161162163164165
campaign.addObjectInstance(oi); // save the object instance and the campaign try { oi.save(); campaign.save(); } catch(Exception e) { logger.error("Exception while trying to save object instance: " + e.getLocalizedMessage(), e);