checkIsAvailable(taskID, task, credentials);
if (task instanceof ITaskWithAttachments == false) {
throw new UnavailableTaskException("Task does not support attachments");
}
ITaskWithAttachments taskWithAttachments = (ITaskWithAttachments) task;
taskWithAttachments.addAttachment(attachment);
dao.updateTask(task);
dao.commit();
if (_logger.isDebugEnabled())
_logger.debug(credentials.getUserID() + " has added attachment " + attachment + "to Workflow Task " + task);
}