Codota Logo
PipelineExecutorTask.getPipelineStatus
Code IndexAdd Codota to your IDE (free)

How to use
getPipelineStatus
method
in
org.guvnor.ala.pipeline.execution.PipelineExecutorTask

Best Java code snippets using org.guvnor.ala.pipeline.execution.PipelineExecutorTask.getPipelineStatus (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • 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

@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.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-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.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

protected void assertHasSameInfo(PipelineExecutorTask expectedTask,
                 PipelineExecutorTask task) {
  assertEquals(expectedTask.getId(),
         task.getId());
  assertEquals(expectedTask.getPipelineStatus(),
         task.getPipelineStatus());
  assertEquals(expectedTask.getPipelineError(),
         task.getPipelineError());
  assertEquals(expectedTask.getOutput(),
         task.getOutput());
  assertHasSameInfo(expectedTask.getTaskDef(),
           task.getTaskDef());
  expectedTask.getTaskDef().getStages().forEach(stage -> {
    assertEquals(expectedTask.getStageStatus(stage),
           task.getStageStatus(stage));
    assertEquals(expectedTask.getStageError(stage),
           task.getStageError(stage));
  });
}
origin: org.kie.workbench/kie-wb-common-ala-spi

protected void assertHasSameInfo(PipelineExecutorTask expectedTask,
                 PipelineExecutorTask task) {
  assertEquals(expectedTask.getId(),
         task.getId());
  assertEquals(expectedTask.getPipelineStatus(),
         task.getPipelineStatus());
  assertEquals(expectedTask.getPipelineError(),
         task.getPipelineError());
  assertEquals(expectedTask.getOutput(),
         task.getOutput());
  assertHasSameInfo(expectedTask.getTaskDef(),
           task.getTaskDef());
  expectedTask.getTaskDef().getStages().forEach(stage -> {
    assertEquals(expectedTask.getStageStatus(stage),
           task.getStageStatus(stage));
    assertEquals(expectedTask.getStageError(stage),
           task.getStageError(stage));
  });
}
origin: org.guvnor/guvnor-ala-spi

private void assertEqualsPipelineExecutorTrace(PipelineExecutorTraceImpl expectedValue,
                        PipelineExecutorTraceImpl value) {
  assertEquals(expectedValue.getTaskId(),
         value.getTaskId());
  assertEquals(expectedValue.getPipelineId(),
         value.getPipelineId());
  assertEquals(expectedValue.getTask().getTaskDef(),
         value.getTask().getTaskDef());
  assertEquals(expectedValue.getTask().getPipelineStatus(),
         value.getTask().getPipelineStatus());
  assertEqualsPipelineExecutorException(expectedValue.getTask().getPipelineError(),
                     value.getTask().getPipelineError());
  for (String stage : expectedValue.getTask().getTaskDef().getStages()) {
    assertEquals(expectedValue.getTask().getStageStatus(stage),
           value.getTask().getStageStatus(stage));
    assertEqualsPipelineExecutorException(expectedValue.getTask().getStageError(stage),
                       value.getTask().getStageError(stage));
  }
  assertEquals(expectedValue.getTask().getOutput(),
         value.getTask().getOutput());
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void assertEqualsPipelineExecutorTrace(PipelineExecutorTraceImpl expectedValue,
                        PipelineExecutorTraceImpl value) {
  assertEquals(expectedValue.getTaskId(),
         value.getTaskId());
  assertEquals(expectedValue.getPipelineId(),
         value.getPipelineId());
  assertEquals(expectedValue.getTask().getTaskDef(),
         value.getTask().getTaskDef());
  assertEquals(expectedValue.getTask().getPipelineStatus(),
         value.getTask().getPipelineStatus());
  assertEquals(expectedValue.getTask().getPipelineError(),
         value.getTask().getPipelineError());
  for (String stage : expectedValue.getTask().getTaskDef().getStages()) {
    assertEquals(expectedValue.getTask().getStageStatus(stage),
           value.getTask().getStageStatus(stage));
    assertEquals(expectedValue.getTask().getStageError(stage),
           value.getTask().getStageError(stage));
  }
  assertEquals(expectedValue.getTask().getOutput(),
         value.getTask().getOutput());
}
origin: org.guvnor/guvnor-ala-services-rest

item.setPipelineStatus(pipelineExecutorTrace.getTask().getPipelineStatus().name());
if (pipelineExecutorTrace.getTask().getPipelineError() != null) {
  item.setPipelineError(pipelineExecutorTrace.getTask().getPipelineError().toString());
org.guvnor.ala.pipeline.executionPipelineExecutorTaskgetPipelineStatus

Popular methods of PipelineExecutorTask

  • getOutput
  • getTaskDef
  • getId
    The UUID for task.
  • getPipelineError
  • getStageError
  • getStageStatus

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • orElseThrow (Optional)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ImageIO (javax.imageio)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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