use of org.jbpm.services.api.admin.ExecutionErrorNotFoundException in project jbpm by kiegroup.
the class UserTaskAdminServiceImpl method acknowledgeError.
@Override
public void acknowledgeError(String... errorId) throws ExecutionErrorNotFoundException {
for (String error : errorId) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("errorId", error);
params.put("ack", new Short("0"));
List<ExecutionError> execErrors = commandService.execute(new QueryNameCommand<List<ExecutionError>>("getErrorById", params));
if (execErrors.isEmpty()) {
throw new ExecutionErrorNotFoundException("No execution error found for id " + errorId);
}
ExecutionError errorInstance = execErrors.get(0);
RuntimeManager runtimeManager = RuntimeManagerRegistry.get().getManager(errorInstance.getDeploymentId());
if (runtimeManager != null) {
((AbstractRuntimeManager) runtimeManager).getExecutionErrorManager().getStorage().acknowledge(identityProvider.getName(), errorInstance.getErrorId());
}
}
}
use of org.jbpm.services.api.admin.ExecutionErrorNotFoundException in project jbpm by kiegroup.
the class ProcessInstanceAdminServiceImpl method acknowledgeError.
@Override
public void acknowledgeError(String... errorId) throws ExecutionErrorNotFoundException {
for (String error : errorId) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("errorId", error);
params.put("ack", new Short("0"));
List<ExecutionError> execErrors = commandService.execute(new QueryNameCommand<List<ExecutionError>>("getErrorById", params));
if (execErrors.isEmpty()) {
throw new ExecutionErrorNotFoundException("No execution error found for id " + errorId);
}
ExecutionError errorInstance = execErrors.get(0);
RuntimeManager runtimeManager = RuntimeManagerRegistry.get().getManager(errorInstance.getDeploymentId());
if (runtimeManager != null) {
((AbstractRuntimeManager) runtimeManager).getExecutionErrorManager().getStorage().acknowledge(identityProvider.getName(), errorInstance.getErrorId());
}
}
}
use of org.jbpm.services.api.admin.ExecutionErrorNotFoundException in project jbpm by kiegroup.
the class ProcessInstanceAdminServiceImpl method getError.
@Override
public ExecutionError getError(String errorId) throws ExecutionErrorNotFoundException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("errorId", errorId);
List<ExecutionError> execErrors = commandService.execute(new QueryNameCommand<List<ExecutionError>>("getErrorByIdSkipAckCheck", params));
if (execErrors.isEmpty()) {
throw new ExecutionErrorNotFoundException("No execution error found for id " + errorId);
}
ExecutionError error = execErrors.get(0);
return error;
}
use of org.jbpm.services.api.admin.ExecutionErrorNotFoundException in project jbpm by kiegroup.
the class UserTaskAdminServiceImpl method getError.
@Override
public ExecutionError getError(String errorId) throws ExecutionErrorNotFoundException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("errorId", errorId);
List<ExecutionError> execErrors = commandService.execute(new QueryNameCommand<List<ExecutionError>>("getErrorByIdSkipAckCheck", params));
if (execErrors.isEmpty()) {
throw new ExecutionErrorNotFoundException("No execution error found for id " + errorId);
}
ExecutionError error = execErrors.get(0);
return error;
}
Aggregations