}
protected void doTask(Map<Object, Object> context) throws IOException, TemplateException {
Long profileId = (Long) context.get("profileId");
String templateName = (String) context.get("template");
Profile profile = profileService.getProfile(profileId);
Activity activity = new Activity();
activity.setLinkedId(profile.getId());
activity.setEntity(Profile.NAME);
activity.setType(Profile.NAME);
activity.setDescription(templateName);
activity.setFormat(Activity.FORMAT_FTL);
activity.setEnteredId(profile.getModifiedId());
activity.setProjectId(profile.getProjectId());
activityService.createActivity(activity);
}