Search in sources :

Example 1 with QueryProcessCommand

use of com.evolveum.midpoint.wf.impl.messages.QueryProcessCommand in project midpoint by Evolveum.

the class WfProcessInstanceShadowTaskHandler method queryProcessInstance.

private void queryProcessInstance(String id, Task task, OperationResult parentResult) {
    String taskOid = task.getOid();
    Validate.notEmpty(taskOid, "Task oid must not be null or empty (task must be persistent).");
    OperationResult result = parentResult.createSubresult(DOT_CLASS + "queryProcessInstance");
    QueryProcessCommand qpc = new QueryProcessCommand();
    qpc.setTaskOid(taskOid);
    qpc.setPid(id);
    try {
        activitiInterface.queryActivitiProcessInstance(qpc, task, result);
    } catch (RuntimeException | ObjectNotFoundException | ObjectAlreadyExistsException | SchemaException e) {
        LoggingUtils.logUnexpectedException(LOGGER, "Couldn't send a request to query a process instance to workflow management system", e);
        result.recordPartialError("Couldn't send a request to query a process instance to workflow management system", e);
    } finally {
        result.computeStatusIfUnknown();
    }
}
Also used : SchemaException(com.evolveum.midpoint.util.exception.SchemaException) QueryProcessCommand(com.evolveum.midpoint.wf.impl.messages.QueryProcessCommand) ObjectNotFoundException(com.evolveum.midpoint.util.exception.ObjectNotFoundException) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) ObjectAlreadyExistsException(com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)

Aggregations

OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)1 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)1 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)1 QueryProcessCommand (com.evolveum.midpoint.wf.impl.messages.QueryProcessCommand)1