Codota Logo
PipelineExecutorRegistry.getExecutorTrace
Code IndexAdd Codota to your IDE (free)

How to use
getExecutorTrace
method
in
org.guvnor.ala.registry.PipelineExecutorRegistry

Best Java code snippets using org.guvnor.ala.registry.PipelineExecutorRegistry.getExecutorTrace (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: org.guvnor/guvnor-ala-spi

@Test
public void testDeleteTask() throws Exception {
  PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class);
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  PipelineExecutorTask.Status status = PipelineExecutorTask.Status.STOPPED;
  when(task.getPipelineStatus()).thenReturn(status);
  when(trace.getTask()).thenReturn(task);
  when(pipelineExecutorRegistry.getExecutorTrace(TASK_ID)).thenReturn(trace);
  taskManager.delete(TASK_ID);
  verify(pipelineExecutorRegistry,
      times(1)).deregister(TASK_ID);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void testDeleteTaskInNonStopeableState(PipelineExecutorTask.Status nonStopeableStatus) throws Exception {
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  when(task.getPipelineStatus()).thenReturn(nonStopeableStatus);
  PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class);
  when(trace.getTask()).thenReturn(task);
  when(pipelineExecutorRegistry.getExecutorTrace(TASK_ID)).thenReturn(trace);
  expectedException.expectMessage(new StartsWith("A PipelineExecutorTask in status: "
                              + nonStopeableStatus + " can not" +
                              " be deleted. Delete operation is available for the following status set:"));
  taskManager.delete(TASK_ID);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Test
public void testDeleteTask() throws Exception {
  PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class);
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  PipelineExecutorTask.Status status = PipelineExecutorTask.Status.STOPPED;
  when(task.getPipelineStatus()).thenReturn(status);
  when(trace.getTask()).thenReturn(task);
  when(pipelineExecutorRegistry.getExecutorTrace(TASK_ID)).thenReturn(trace);
  taskManager.delete(TASK_ID);
  verify(pipelineExecutorRegistry,
      times(1)).deregister(TASK_ID);
}
origin: org.guvnor/guvnor-ala-spi

private void testDeleteTaskInNonStopeableState(PipelineExecutorTask.Status nonStopeableStatus) throws Exception {
  PipelineExecutorTask task = mock(PipelineExecutorTask.class);
  when(task.getPipelineStatus()).thenReturn(nonStopeableStatus);
  PipelineExecutorTrace trace = mock(PipelineExecutorTrace.class);
  when(trace.getTask()).thenReturn(task);
  when(pipelineExecutorRegistry.getExecutorTrace(TASK_ID)).thenReturn(trace);
  expectedException.expectMessage(new StartsWith("A PipelineExecutorTask in status: "
                              + nonStopeableStatus + " can not" +
                              " be deleted. Delete operation is available for the following status set:"));
  taskManager.delete(TASK_ID);
}
origin: org.guvnor/guvnor-ala-services-rest

@Override
public void destroyRuntime(String runtimeId,
              boolean forced) throws BusinessException {
  final Runtime runtimeById = runtimeRegistry.getRuntimeById(runtimeId);
  if (runtimeById == null) {
    throw new BusinessException("No runtime was found for runtimeId: " + runtimeId);
  }
  final PipelineExecutorTrace pipelineTrace = pipelineExecutorRegistry.getExecutorTrace(runtimeById);
  try {
    runtimeFactory.destroyRuntime(runtimeById);
  } catch (Exception e) {
    if (forced) {
      LOG.warn("Runtime destroy raised the following error for runtime: " + runtimeId +
               " but forced destroy will still remove the runtime from registry.",
           e);
      runtimeRegistry.deregisterRuntime(runtimeById);
    } else {
      throw e;
    }
  }
  if (pipelineTrace != null) {
    pipelineExecutorRegistry.deregister(pipelineTrace.getTaskId());
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Override
public void delete(final String taskId) throws PipelineExecutorException {
  final TaskEntry entry = getTaskEntry(taskId);
  if (entry != null) {
    throw new PipelineExecutorException("An active PipelineExecutorTask was found for taskId: " + taskId +
                          " delete operation is only available for the following status set: " + deleteEnabledStatus);
  }
  final PipelineExecutorTrace trace = pipelineExecutorRegistry.getExecutorTrace(taskId);
  if (trace == null) {
    throw new PipelineExecutorException("No PipelineExecutorTask was found for taskId: " + taskId);
  } else {
    if (!deleteEnabledStatus.contains(trace.getTask().getPipelineStatus())) {
      throw new PipelineExecutorException("A PipelineExecutorTask in status: "
                            + trace.getTask().getPipelineStatus().name() + " can not" +
                            " be deleted. Delete operation is available for the following status set: " + deleteEnabledStatus);
    } else {
      pipelineExecutorRegistry.deregister(taskId);
    }
  }
}
origin: org.guvnor/guvnor-ala-spi

@Override
public void delete(final String taskId) throws PipelineExecutorException {
  final TaskEntry entry = getTaskEntry(taskId);
  if (entry != null) {
    throw new PipelineExecutorException("An active PipelineExecutorTask was found for taskId: " + taskId +
                          " delete operation is only available for the following status set: " + deleteEnabledStatus);
  }
  final PipelineExecutorTrace trace = pipelineExecutorRegistry.getExecutorTrace(taskId);
  if (trace == null) {
    throw new PipelineExecutorException("No PipelineExecutorTask was found for taskId: " + taskId);
  } else {
    if (!deleteEnabledStatus.contains(trace.getTask().getPipelineStatus())) {
      throw new PipelineExecutorException("A PipelineExecutorTask in status: "
                            + trace.getTask().getPipelineStatus().name() + " can not" +
                            " be deleted. Delete operation is available for the following status set: " + deleteEnabledStatus);
    } else {
      pipelineExecutorRegistry.deregister(taskId);
    }
  }
}
org.guvnor.ala.registryPipelineExecutorRegistrygetExecutorTrace

Javadoc

Gets a registered pipeline executor trace.

Popular methods of PipelineExecutorRegistry

  • deregister
    Deregisters a pipeline executor trace.
  • register
    Registers a pipeline executor trace.
  • getExecutorTraces
    Get the currently registered pipeline executor traces.

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JTextField (javax.swing)
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now