TSK-722: fixed Javadoc problems.
This commit is contained in:
parent
d740ead477
commit
e3b472ed84
|
|
@ -9,6 +9,10 @@ public interface JobService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a schedule a new job.
|
* Create a schedule a new job.
|
||||||
|
*
|
||||||
|
* @param job
|
||||||
|
* {@link ScheduledJob} The job to be created.
|
||||||
|
* @return {@link ScheduledJob} The created job.
|
||||||
*/
|
*/
|
||||||
ScheduledJob createJob(ScheduledJob job);
|
ScheduledJob createJob(ScheduledJob job);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ public interface Task {
|
||||||
/**
|
/**
|
||||||
* Returns the businessProcessId of a task.
|
* Returns the businessProcessId of a task.
|
||||||
*
|
*
|
||||||
* @return businessProcessId
|
* @return businessProcessId Gets the business process id the task belongs to.
|
||||||
*/
|
*/
|
||||||
String getBusinessProcessId();
|
String getBusinessProcessId();
|
||||||
|
|
||||||
|
|
@ -167,13 +167,14 @@ public interface Task {
|
||||||
* Sets the external business process id.
|
* Sets the external business process id.
|
||||||
*
|
*
|
||||||
* @param businessProcessId
|
* @param businessProcessId
|
||||||
|
* Sets the business process id the task belongs to.
|
||||||
*/
|
*/
|
||||||
void setBusinessProcessId(String businessProcessId);
|
void setBusinessProcessId(String businessProcessId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the parentBusinessProcessId of a task.
|
* Returns the parentBusinessProcessId of a task.
|
||||||
*
|
*
|
||||||
* @return parentBusinessProcessId
|
* @return parentBusinessProcessId Gets the parent business process id the task belongs to
|
||||||
*/
|
*/
|
||||||
String getParentBusinessProcessId();
|
String getParentBusinessProcessId();
|
||||||
|
|
||||||
|
|
@ -181,6 +182,7 @@ public interface Task {
|
||||||
* Sets the parent business process id to group associated processes.
|
* Sets the parent business process id to group associated processes.
|
||||||
*
|
*
|
||||||
* @param parentBusinessProcessId
|
* @param parentBusinessProcessId
|
||||||
|
* Sets the parent business process id the task belongs to
|
||||||
*/
|
*/
|
||||||
void setParentBusinessProcessId(String parentBusinessProcessId);
|
void setParentBusinessProcessId(String parentBusinessProcessId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,11 @@ import java.util.stream.Collectors;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import pro.taskana.*;
|
import pro.taskana.BaseQuery;
|
||||||
|
import pro.taskana.BulkOperationResults;
|
||||||
|
import pro.taskana.TaskSummary;
|
||||||
|
import pro.taskana.TaskanaEngine;
|
||||||
|
import pro.taskana.TimeInterval;
|
||||||
import pro.taskana.exceptions.InvalidArgumentException;
|
import pro.taskana.exceptions.InvalidArgumentException;
|
||||||
import pro.taskana.exceptions.TaskanaException;
|
import pro.taskana.exceptions.TaskanaException;
|
||||||
import pro.taskana.transaction.TaskanaTransactionProvider;
|
import pro.taskana.transaction.TaskanaTransactionProvider;
|
||||||
|
|
@ -39,7 +43,8 @@ public class TaskCleanupJob extends AbstractTaskanaJob {
|
||||||
runEvery = taskanaEngine.getConfiguration().getTaskCleanupJobRunEvery();
|
runEvery = taskanaEngine.getConfiguration().getTaskCleanupJobRunEvery();
|
||||||
minimumAge = taskanaEngine.getConfiguration().getTaskCleanupJobMinimumAge();
|
minimumAge = taskanaEngine.getConfiguration().getTaskCleanupJobMinimumAge();
|
||||||
batchSize = taskanaEngine.getConfiguration().getMaxNumberOfTaskUpdatesPerTransaction();
|
batchSize = taskanaEngine.getConfiguration().getMaxNumberOfTaskUpdatesPerTransaction();
|
||||||
allCompletedSameParentBusiness = taskanaEngine.getConfiguration().isTaskCleanupJobAllCompletedSameParentBusiness();
|
allCompletedSameParentBusiness = taskanaEngine.getConfiguration()
|
||||||
|
.isTaskCleanupJobAllCompletedSameParentBusiness();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -75,7 +80,11 @@ public class TaskCleanupJob extends AbstractTaskanaJob {
|
||||||
Map<String, Long> numberParentTasksShouldHave = new HashMap<>();
|
Map<String, Long> numberParentTasksShouldHave = new HashMap<>();
|
||||||
Map<String, Long> countParentTask = new HashMap<>();
|
Map<String, Long> countParentTask = new HashMap<>();
|
||||||
for (TaskSummary task : taskList) {
|
for (TaskSummary task : taskList) {
|
||||||
numberParentTasksShouldHave.put(task.getParentBusinessProcessId(), taskanaEngineImpl.getTaskService().createTaskQuery().parentBusinessProcessIdIn(task.getParentBusinessProcessId()).count());
|
numberParentTasksShouldHave.put(task.getParentBusinessProcessId(),
|
||||||
|
taskanaEngineImpl.getTaskService()
|
||||||
|
.createTaskQuery()
|
||||||
|
.parentBusinessProcessIdIn(task.getParentBusinessProcessId())
|
||||||
|
.count());
|
||||||
countParentTask.merge(task.getParentBusinessProcessId(), 1L, Long::sum);
|
countParentTask.merge(task.getParentBusinessProcessId(), 1L, Long::sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -159,6 +168,7 @@ public class TaskCleanupJob extends AbstractTaskanaJob {
|
||||||
* All scheduled cleanup jobs are cancelled/deleted and a new one is scheduled.
|
* All scheduled cleanup jobs are cancelled/deleted and a new one is scheduled.
|
||||||
*
|
*
|
||||||
* @param taskanaEngine
|
* @param taskanaEngine
|
||||||
|
* the TASKANA engine.
|
||||||
*/
|
*/
|
||||||
public static void initializeSchedule(TaskanaEngine taskanaEngine) {
|
public static void initializeSchedule(TaskanaEngine taskanaEngine) {
|
||||||
TaskCleanupJob job = new TaskCleanupJob(taskanaEngine, null, null);
|
TaskCleanupJob job = new TaskCleanupJob(taskanaEngine, null, null);
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ public interface TaskanaJob {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the TaskanaJob.
|
* Runs the TaskanaJob.
|
||||||
|
*
|
||||||
|
* @throws TaskanaException
|
||||||
|
* if an exception occured during the run.
|
||||||
*/
|
*/
|
||||||
void run() throws TaskanaException;
|
void run() throws TaskanaException;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue