本文整理了Java中com.evolveum.midpoint.task.api.Task.startWaitingForTasksImmediate()
方法的一些代码示例,展示了Task.startWaitingForTasksImmediate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.startWaitingForTasksImmediate()
方法的具体详情如下:
包路径:com.evolveum.midpoint.task.api.Task
类名称:Task
方法名:startWaitingForTasksImmediate
[英]Starts "passive" waiting for other tasks. Precondition: The task must already be in WAITING state. Postcondition: If there are any tasks to wait for, task remains in WAITING/OTHER_TASKS state. However, if there are no tasks to wait for, task is either unpaused (if there is any handler) or closed (if there is not). Passive waiting consists of putting the task into WAITING/OTHER_TASKS state. Unpausing it is the responsibility of task manager - it does it when any of prerequisite tasks closes. At that moment, task manager checks all dependent tasks (explicit or implicit) of the closing task, and unpauses these, which can be unpaused.
[中]开始“被动”等待其他任务。前提条件:任务必须已处于等待状态。后置条件:如果有任何任务要等待,则任务仍处于等待/其他任务状态。但是,如果没有要等待的任务,则该任务要么未暂停(如果有处理程序),要么已关闭(如果没有)。被动等待包括将任务置于等待/其他任务状态。解除暂停是任务经理的责任——当任何先决任务结束时,任务经理都会这样做。此时,任务管理器检查结束任务的所有依赖任务(显式或隐式),并取消暂停这些任务,这些任务可以取消暂停。
代码示例来源:origin: Evolveum/midpoint
public void startWaitingForSubtasks(OperationResult result) throws SchemaException, ObjectNotFoundException {
task.startWaitingForTasksImmediate(result);
}
代码示例来源:origin: Evolveum/midpoint
@Override
public TaskRunResult run(Task task) {
OperationResult result = task.getResult().createSubresult(WaitForTasksTaskHandler.class.getName()+".run");
result.recordInProgress();
LOGGER.debug("WaitForTasksTaskHandler run starting; in task " + task.getName());
try {
// todo resolve this brutal hack
taskManagerImpl.pauseTask(task, TaskWaitingReason.OTHER, result);
task.startWaitingForTasksImmediate(result);
} catch (SchemaException | ObjectNotFoundException e) {
throw new SystemException("Couldn't mark task as waiting for prerequisite tasks", e); // should not occur; will be handled by task runner
}
LOGGER.debug("WaitForTasksTaskHandler run finishing; in task " + task.getName());
result.computeStatus();
TaskRunResult runResult = new TaskRunResult();
runResult.setOperationResult(result);
runResult.setRunResultStatus(TaskRunResultStatus.FINISHED);
return runResult;
}
代码示例来源:origin: Evolveum/midpoint
rootTask.startWaitingForTasksImmediate(result);
代码示例来源:origin: Evolveum/midpoint
parentTask.startWaitingForTasksImmediate(result);
内容来源于网络,如有侵权,请联系作者删除!