本文整理了Java中com.evolveum.midpoint.task.api.Task.getResultStatus()
方法的一些代码示例,展示了Task.getResultStatus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getResultStatus()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:getResultStatus
[英]Returns the status of top-level OperationResult stored in the task.
[中]返回存储在任务中的顶级OperationResult的状态。
代码示例来源:origin: Evolveum/midpoint
private boolean shouldPurgeResult(Task task) {
return PURGE_SUCCESSFUL_RESULT_FOR.contains(task.getCategory()) &&
task.getResultStatus() == OperationResultStatusType.SUCCESS || task.getResultStatus() == OperationResultStatusType.IN_PROGRESS;
}
代码示例来源:origin: Evolveum/midpoint
public static OperationResult getResult(Task task) {
if (task == null) {
throw new IllegalArgumentException("Null task");
} else if (task.getResult() != null) {
return task.getResult();
} else {
LOGGER.warn("No operation result in task {}, returning a newly created one (status = {})", task, task.getResultStatus());
OperationResultStatusType status = task.getResultStatus() != null ? task.getResultStatus() : OperationResultStatusType.UNKNOWN;
OperationResult result = new OperationResult("run", OperationResultStatus.parseStatusType(status), (String) null);
task.setResultTransient(result);
return result;
}
}
代码示例来源:origin: Evolveum/midpoint
protected void assertFinishedPropagationTask(Task finishedTask, OperationResultStatusType expectedStatus) {
display("Finished propagation task", finishedTask);
OperationResultStatusType resultStatus = finishedTask.getResultStatus();
if (expectedStatus == null) {
if ( resultStatus != OperationResultStatusType.SUCCESS && resultStatus != OperationResultStatusType.IN_PROGRESS ) {
fail("Unexpected propagation task result " + resultStatus);
}
} else {
assertEquals("Unexpected propagation task result", expectedStatus, resultStatus);
}
}
代码示例来源:origin: Evolveum/midpoint
protected void waitForTaskCloseCheckingSubtasks(String taskOid, OperationResult result, long timeoutInterval, long sleepInterval) throws
CommonException {
waitFor("Waiting for task manager to execute the task", () -> {
Task task = taskManager.getTaskWithResult(taskOid, result);
display("Task tree while waiting", TaskDebugUtil.dumpTaskTree(task, result));
if (task.getExecutionStatus() == TaskExecutionStatus.CLOSED) {
display("Task is closed, finishing waiting: " + task);
return true;
}
List<Task> subtasks = task.listSubtasksDeeply(result);
for (Task subtask : subtasks) {
if (subtask.getResultStatus() == OperationResultStatusType.FATAL_ERROR
|| subtask.getResultStatus() == OperationResultStatusType.PARTIAL_ERROR) {
display("Error detected in subtask, finishing waiting: " + subtask);
return true;
}
}
return false;
}, timeoutInterval, sleepInterval);
}
代码示例来源:origin: Evolveum/midpoint
AssertJUnit.assertEquals(OperationResultStatusType.SUCCESS, task.getResultStatus());
代码示例来源:origin: Evolveum/midpoint
display("Imported " + task.getProgress() + " users in " + importDuration + " milliseconds (" + usersPerSec + " users/sec)");
OperationResultStatusType taskResultStatus = task.getResultStatus();
AssertJUnit.assertNotNull("Task has no result status", taskResultStatus);
assertEquals("Import task result is not success", OperationResultStatusType.SUCCESS, taskResultStatus);
内容来源于网络,如有侵权,请联系作者删除!