Search in sources :

Example 71 with CommonException

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);
    }
}
Also used : WorkersReconciliation(com.evolveum.midpoint.repo.common.activity.run.distribution.WorkersReconciliation) CommonException(com.evolveum.midpoint.util.exception.CommonException) WorkersReconciliationOptions(com.evolveum.midpoint.repo.common.activity.run.distribution.WorkersReconciliationOptions)

Aggregations

CommonException (com.evolveum.midpoint.util.exception.CommonException)71 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)44 Task (com.evolveum.midpoint.task.api.Task)33 PrismObject (com.evolveum.midpoint.prism.PrismObject)14 SystemException (com.evolveum.midpoint.util.exception.SystemException)14 ArrayList (java.util.ArrayList)12 ModelService (com.evolveum.midpoint.model.api.ModelService)11 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)8 NotNull (org.jetbrains.annotations.NotNull)7 ItemDelta (com.evolveum.midpoint.prism.delta.ItemDelta)6 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)5 ActivityRunException (com.evolveum.midpoint.repo.common.activity.run.ActivityRunException)5 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)5 RestartResponseException (org.apache.wicket.RestartResponseException)5 ModelInteractionService (com.evolveum.midpoint.model.api.ModelInteractionService)4 ModelContext (com.evolveum.midpoint.model.api.context.ModelContext)4 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)4 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)4 MidPointApplication (com.evolveum.midpoint.web.security.MidPointApplication)4 com.evolveum.midpoint.xml.ns._public.common.common_3 (com.evolveum.midpoint.xml.ns._public.common.common_3)4