public void acknowledgeError(List<String> errorIds) { logger.debug("About to acknowledge execution error with id {}", errorIds); String[] errors = errorIds.toArray(new String[errorIds.size()]); userTaskAdminService.acknowledgeError(errors); logger.debug("Error {} successfully acknowledged", errorIds); }
public void cancelNotification(String containerId, Number taskId, Number notificationId) { logger.debug("About to cancel notification {} from task {}", notificationId, taskId); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userTaskAdminService.cancelNotification(containerId, taskId.longValue(), notificationId.longValue()); logger.debug("Notification {} canceled successfully for task {}", notificationId, taskId); }
public void cancelReassignment(String containerId, Number taskId, Number reassignmentId) { logger.debug("About to cancel reassignment {} from task {}", reassignmentId, taskId); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); userTaskAdminService.cancelReassignment(containerId, taskId.longValue(), reassignmentId.longValue()); logger.debug("Reassignment {} canceled successfully for task {}", reassignmentId, taskId); }
public ExecutionErrorInstanceList getExecutionErrorsByTaskName(String containerId, String processId, String taskName, boolean includeAcknowledged, Integer page, Integer pageSize, String sort, boolean sortOrder) { logger.debug("About to get execution errors for task name {} in process {} and container {}", taskName, processId, containerId); List<ExecutionError> errors = null; if (containerId != null && !containerId.isEmpty()) { errors = userTaskAdminService.getErrorsByTaskName(containerId, processId, taskName, includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder)); } else if (processId != null && !processId.isEmpty()) { errors = userTaskAdminService.getErrorsByTaskName(processId, taskName, includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder)); } else if (taskName != null && !taskName.isEmpty()) { errors = userTaskAdminService.getErrorsByTaskName(taskName, includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder)); } else { errors = userTaskAdminService.getErrors(includeAcknowledged, buildQueryContext(page, pageSize, sort, sortOrder)); } logger.debug("Found errors {}", errors); ExecutionErrorInstanceList errorInstanceList = convertToErrorInstanceList(errors); return errorInstanceList; }
public ExecutionErrorInstance getError(String errorId) { logger.debug("About to get execution error for {}", errorId); ExecutionError error = userTaskAdminService.getError(errorId); logger.debug("Found error {} for error id {}", error, errorId); return convertToErrorInstance(error); }
public void addPotentialOwners(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addPotentialOwners(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Potential owners {} added to task {}", entities, taskId); }
public void addTaskInputs(String containerId, Number taskId, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); Map<String, Object> data = marshallerHelper.unmarshal(containerId, payload, marshallingType, Map.class); logger.debug("Task input data to be added to a task {} is {}", taskId, data); userTaskAdminService.addTaskInputs(containerId, taskId.longValue(), data); logger.debug("Task inputs {} added successfully to task {}", data, taskId); }
public void addExcludedOwners(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addExcludedOwners(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Excluded owners {} added to task {}", entities, taskId); }
public void addBusinessAdmins(String containerId, Number taskId, boolean removeExisting, String payload, String marshallingType) { logger.debug("About to unmarshall payload '{}' to map of task inputs", payload); containerId = context.getContainerId(containerId, new ByTaskIdContainerLocator(taskId.longValue())); OrganizationalEntity[] entities = convert(containerId, taskId, payload, marshallingType); userTaskAdminService.addBusinessAdmins(containerId, taskId.longValue(), removeExisting, entities); logger.debug("Business admins {} added to task {}", entities, taskId); }
protected org.kie.internal.task.api.model.EmailNotification buildEmail(EmailNotification emailNotification) { List<OrganizationalEntity> recipients = new ArrayList<>(); if (emailNotification.getUsers() != null) { recipients.addAll(emailNotification.getUsers().stream().map(mapToUser).collect(toList())); } if (emailNotification.getGroups() != null) { recipients.addAll(emailNotification.getGroups().stream().map(mapToGroup).collect(toList())); } org.kie.internal.task.api.model.EmailNotification email = userTaskAdminService.buildEmailNotification(emailNotification.getSubject(), recipients, emailNotification.getBody(), emailNotification.getFrom(), emailNotification.getReplyTo()); return email; }