ExecutionError.getErrorId
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.kie.internal.runtime.error.ExecutionError.getErrorId(Showing top 14 results out of 315)

origin: kiegroup/jbpm

@Override
public ExecutionError get(String errorId) {                
  return errors.stream().filter(err -> err.getErrorId().equals(errorId)).findFirst().get();
}

origin: org.jbpm/jbpm-kie-services

@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());
    }
  }
}

origin: kiegroup/jbpm

@Test
public void testErrorHandlingOnScriptTask() {
  
  try {
    processService.startProcess(deploymentUnit.getIdentifier(), "BrokenScriptTask");
  } catch (Exception e) {
    // expected as this is broken script process
  }
  
  List<ExecutionError> errors = processAdminService.getErrors(true, new QueryContext());
  assertNotNull(errors);
  assertEquals(1, errors.size());
  
  ExecutionError error = errors.get(0);
  assertNotNull(error);
  assertFalse(error.isAcknowledged());
  
  processAdminService.acknowledgeError(error.getErrorId());
  
  errors = processAdminService.getErrors(true, new QueryContext());
  assertNotNull(errors);
  assertEquals(1, errors.size());
  
  error = errors.get(0);
  assertNotNull(error);
  assertTrue(error.isAcknowledged());
}
origin: kiegroup/droolsjbpm-integration

public static ExecutionErrorInstance convertToErrorInstance(ExecutionError executionError) {
  if (executionError == null) {
    return null;
  }
  ExecutionErrorInstance errorInstance = ExecutionErrorInstance.builder()
      .error(executionError.getError())
      .errorId(executionError.getErrorId())
      .errorDate(executionError.getErrorDate())
      .processInstanceId(executionError.getProcessInstanceId())
      .acknowledged(executionError.isAcknowledged())
      .acknowledgedAt(executionError.getAcknowledgedAt())
      .acknowledgedBy(executionError.getAcknowledgedBy())
      .activityId(executionError.getActivityId())
      .activityName(executionError.getActivityName())
      .jobId(executionError.getJobId())
      .containerId(executionError.getDeploymentId())
      .message(executionError.getErrorMessage())
      .processId(executionError.getProcessId())
      .type(executionError.getType())
      .build();
  return errorInstance;
}
origin: org.jbpm/jbpm-runtime-manager

@Override
public ExecutionError store(ExecutionError error) {
  if (!isActive()) {
    return error;
  }
  return call((EntityManager em) -> {
    
    ExecutionErrorInfo errorEntity = new ExecutionErrorInfo(
        error.getErrorId(),
        error.getType(),
        error.getDeploymentId(),
        error.getProcessInstanceId(),
        error.getProcessId(),
        error.getActivityId(),
        error.getActivityName(),
        error.getJobId(),
        error.getErrorMessage(),
        error.getError(),
        error.getErrorDate(),
        error.getInitActivityId()
        );
    
    em.persist(errorEntity);
    return error;
  });
}
origin: kiegroup/jbpm

@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());
    }
  }
}

origin: org.jbpm/jbpm-kie-services

@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());
    }
  }
}

origin: kiegroup/jbpm

@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());
    }
  }
}

origin: org.jbpm/jbpm-kie-services

@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());
    }
  }
}

origin: org.jbpm/jbpm-kie-services

@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());
    }
  }
}

origin: org.jbpm/jbpm-kie-services

@Test
public void testErrorHandlingOnScriptTask() {
  
  try {
    processService.startProcess(deploymentUnit.getIdentifier(), "BrokenScriptTask");
  } catch (Exception e) {
    // expected as this is broken script process
  }
  
  List<ExecutionError> errors = processAdminService.getErrors(true, new QueryContext());
  assertNotNull(errors);
  assertEquals(1, errors.size());
  
  ExecutionError error = errors.get(0);
  assertNotNull(error);
  assertFalse(error.isAcknowledged());
  
  processAdminService.acknowledgeError(error.getErrorId());
  
  errors = processAdminService.getErrors(true, new QueryContext());
  assertNotNull(errors);
  assertEquals(1, errors.size());
  
  error = errors.get(0);
  assertNotNull(error);
  assertTrue(error.isAcknowledged());
}
origin: kiegroup/jbpm

@Override
public ExecutionError store(ExecutionError error) {
  if (!isActive()) {
    return error;
  }
  return call((EntityManager em) -> {
    
    ExecutionErrorInfo errorEntity = new ExecutionErrorInfo(
        error.getErrorId(),
        error.getType(),
        error.getDeploymentId(),
        error.getProcessInstanceId(),
        error.getProcessId(),
        error.getActivityId(),
        error.getActivityName(),
        error.getJobId(),
        error.getErrorMessage(),
        error.getError(),
        error.getErrorDate(),
        error.getInitActivityId()
        );
    
    em.persist(errorEntity);
    return error;
  });
}
origin: org.jbpm/jbpm-runtime-manager

@Override
public ExecutionError store(ExecutionError error) {
  if (!isActive()) {
    return error;
  }
  return call((EntityManager em) -> {
    
    ExecutionErrorInfo errorEntity = new ExecutionErrorInfo(
        error.getErrorId(),
        error.getType(),
        error.getDeploymentId(),
        error.getProcessInstanceId(),
        error.getProcessId(),
        error.getActivityId(),
        error.getActivityName(),
        error.getJobId(),
        error.getErrorMessage(),
        error.getError(),
        error.getErrorDate(),
        error.getInitActivityId()
        );
    
    em.persist(errorEntity);
    return error;
  });
}
origin: org.jbpm/jbpm-runtime-manager

@Override
public ExecutionError store(ExecutionError error) {
  if (!isActive()) {
    return error;
  }
  return call((EntityManager em) -> {
    
    ExecutionErrorInfo errorEntity = new ExecutionErrorInfo(
        error.getErrorId(),
        error.getType(),
        error.getDeploymentId(),
        error.getProcessInstanceId(),
        error.getProcessId(),
        error.getActivityId(),
        error.getActivityName(),
        error.getJobId(),
        error.getErrorMessage(),
        error.getError(),
        error.getErrorDate(),
        error.getInitActivityId()
        );
    
    em.persist(errorEntity);
    return error;
  });
}
org.kie.internal.runtime.errorExecutionErrorgetErrorId

Popular methods of ExecutionError

  • getDeploymentId
  • getActivityId
  • getActivityName
  • getError
  • getErrorMessage
  • getProcessId
  • getProcessInstanceId
  • getType
  • isAcknowledged
  • getAcknowledgedAt
  • getAcknowledgedBy
  • getJobId
  • getAcknowledgedBy,
  • getJobId,
  • setAcknowledged,
  • setAcknowledgedAt,
  • setAcknowledgedBy,
  • builder,
  • getErrorDate,
  • <init>,
  • getInitActivityId

Popular classes and methods

  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • findViewById (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)