@Override
public List<Task> createTaskForProcess(CoreSession coreSession, NuxeoPrincipal principal,
List<DocumentModel> documents, String taskDocumentType, String taskName, String taskType, String processId,
String processName, List<String> actorIds, boolean createOneTaskPerActor, String directive, String comment,
Date dueDate, Map<String, String> taskVariables, String parentPath, Map<String, Serializable> eventInfo) {
if (StringUtils.isBlank(parentPath)) {
parentPath = getTaskRootParentPath(coreSession);
}
CreateTaskUnrestricted runner = new CreateTaskUnrestricted(coreSession, principal, documents, taskDocumentType,
taskName, taskType, processId, processName, actorIds, createOneTaskPerActor, directive, comment,
dueDate, taskVariables, parentPath);
runner.runUnrestricted();
List<Task> tasks = runner.getTasks();
for (Task task : tasks) {
notifyEvent(coreSession, task, documents, TaskEventNames.WORKFLOW_TASK_ASSIGNED, eventInfo, comment,
principal, task.getActors());
}
return tasks;
}
}