use of com.evolveum.midpoint.util.exception.CommonException in project midpoint by Evolveum.
the class DistributingActivityRun method createSuspendedChildren.
private List<Task> createSuspendedChildren(OperationResult result) throws ActivityRunException {
try {
WorkersReconciliationOptions options = new WorkersReconciliationOptions();
options.setCreateSuspended(true);
options.setDontCloseWorkersWhenWorkDone(true);
WorkersReconciliation workersReconciliation = new WorkersReconciliation(getRunningTask().getRootTask(), getRunningTask(), getActivityPath(), options, getBeans());
workersReconciliation.execute(result);
return workersReconciliation.getCurrentWorkers(result);
} catch (CommonException e) {
throw new ActivityRunException("Couldn't create/update activity children (workers)", FATAL_ERROR, PERMANENT_ERROR, e);
}
}
Aggregations