taskService.completeTask(taskId, linkedObject, taskData, ContextUtil.getLoggedUsername());
}
@Override
public TaskAvailabilityResponse requestTaskAvailabilityAndLockTask(String taskId, String lockedBy, Locale locale) {
TaskAvailabilityResponse response = new TaskAvailabilityResponse();
// check if task is available
if (processService.getTaskById(taskId) != null) {
// lock associated
response.setAvailable(taskDataService.lock(taskId, lockedBy));
} else {
response.setAvailable(false);
response.setMessage(messageSource.getMessage(InfrastructureConstants.TASK_LOCKED_OR_COMPLETED,
null, InfrastructureConstants.UNDEFINED_MESSAGE, locale));
}
return response;
}