congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PipelineExecutorTaskDef.getPipeline
Code IndexAdd Tabnine to your IDE (free)

How to use
getPipeline
method
in
org.guvnor.ala.pipeline.execution.PipelineExecutorTaskDef

Best Java code snippets using org.guvnor.ala.pipeline.execution.PipelineExecutorTaskDef.getPipeline (Showing top 14 results out of 315)

origin: org.kie.workbench/kie-wb-common-ala-spi

@JsonIgnore
@Override
public String getPipelineId() {
  return getTask().getTaskDef().getPipeline();
}
origin: org.guvnor/guvnor-ala-spi

@JsonIgnore
@Override
public String getPipelineId() {
  return getTask().getTaskDef().getPipeline();
}
origin: org.guvnor/guvnor-ala-spi

private void prepareExecution() {
  //mock the execution inputs
  pipeline = mock(Pipeline.class);
  stages = mockStages(PIPELINE_STAGES_SIZE);
  when(pipeline.getStages()).thenReturn(stages);
  when(pipeline.getName()).thenReturn(PIPELINE_ID);
  when(pipelineRegistry.getPipelineByName(PIPELINE_ID)).thenReturn(pipeline);
  taskDef = mock(PipelineExecutorTaskDef.class);
  input = mock(Input.class);
  when(taskDef.getInput()).thenReturn(input);
  when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

private void prepareExecution() {
  //mock the execution inputs
  pipeline = mock(Pipeline.class);
  stages = mockStages(PIPELINE_STAGES_SIZE);
  when(pipeline.getStages()).thenReturn(stages);
  when(pipeline.getName()).thenReturn(PIPELINE_ID);
  when(pipelineRegistry.getPipelineByName(PIPELINE_ID)).thenReturn(pipeline);
  taskDef = mock(PipelineExecutorTaskDef.class);
  input = mock(Input.class);
  when(taskDef.getInput()).thenReturn(input);
  when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
}
origin: org.guvnor/guvnor-ala-spi

@Before
public void setUp() {
  super.setUp();
  error = mock(Throwable.class);
  when(error.getMessage()).thenReturn(ERROR_MESSAGE);
  pipelineExecutorExceptionCaptor = ArgumentCaptor.forClass(PipelineExecutorException.class);
  pipeline = mock(Pipeline.class);
  stages = mockStages(PIPELINE_STAGES_SIZE);
  when(pipeline.getStages()).thenReturn(stages);
  when(pipeline.getName()).thenReturn(PIPELINE_ID);
  when(pipelineRegistry.getPipelineByName(PIPELINE_ID)).thenReturn(pipeline);
  //pick an arbitrary stage for events testing.
  stage = stages.get(0);
  taskDef = mock(PipelineExecutorTaskDef.class);
  input = mock(Input.class);
  when(taskDef.getInput()).thenReturn(input);
  when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
  task = spy(taskManagerHelper.createTask(taskDef,
                      TASK_ID));
  taskEntry = mock(PipelineExecutorTaskManagerImpl.TaskEntry.class);
  when(taskEntry.getTask()).thenReturn(task);
  //emulate there's a running task.
  taskManager.currentTasks.put(TASK_ID,
                 taskEntry);
  taskManager.init();
}
origin: org.kie.workbench/kie-wb-common-ala-spi

@Before
public void setUp() {
  super.setUp();
  error = mock(Throwable.class);
  when(error.getMessage()).thenReturn(ERROR_MESSAGE);
  pipelineExecutorErrorCaptor = ArgumentCaptor.forClass(PipelineExecutorError.class);
  pipeline = mock(Pipeline.class);
  stages = mockStages(PIPELINE_STAGES_SIZE);
  when(pipeline.getStages()).thenReturn(stages);
  when(pipeline.getName()).thenReturn(PIPELINE_ID);
  when(pipelineRegistry.getPipelineByName(PIPELINE_ID)).thenReturn(pipeline);
  //pick an arbitrary stage for events testing.
  stage = stages.get(0);
  taskDef = mock(PipelineExecutorTaskDef.class);
  input = mock(Input.class);
  when(taskDef.getInput()).thenReturn(input);
  when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
  task = spy(taskManagerHelper.createTask(taskDef,
                      TASK_ID));
  taskEntry = mock(PipelineExecutorTaskManagerImpl.TaskEntry.class);
  when(taskEntry.getTask()).thenReturn(task);
  //emulate there's a running task.
  taskManager.currentTasks.put(TASK_ID,
                 taskEntry);
  taskManager.init();
}
origin: org.guvnor/guvnor-ala-spi

Pipeline pipeline = mock(Pipeline.class);
when(pipeline.getStages()).thenReturn(mock(List.class));
when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
origin: org.kie.workbench/kie-wb-common-ala-spi

Pipeline pipeline = mock(Pipeline.class);
when(pipeline.getStages()).thenReturn(mock(List.class));
when(taskDef.getPipeline()).thenReturn(PIPELINE_ID);
origin: org.guvnor/guvnor-ala-spi

/**
 * Executes a task in asynchronous mode.
 * @param task the task for execute.
 * @return the taskId of the task.
 */
private synchronized void startAsyncTask(final PipelineExecutorTask task) {
  final Future<?> future = executor.submit(() -> {
    final Pipeline pipeline = pipelineRegistry.getPipelineByName(task.getTaskDef().getPipeline());
    try {
      pipelineExecutor.execute(task.getTaskDef().getInput(),
                   pipeline,
                   output -> processPipelineOutput(task,
                                   output),
                   localListener);
    } catch (Exception e) {
      logger.error("An error was produced during pipeline execution for PipelineExecutorTask: " + task.getId(),
             e);
    } finally {
      removeTaskEntry(task.getId());
      removeFutureTask(task.getId());
    }
  });
  storeFutureTask(task.getId(),
          future);
}
origin: org.kie.workbench/kie-wb-common-ala-spi

/**
 * Executes a task in asynchronous mode.
 * @param task the task for execute.
 * @return the taskId of the task.
 */
private synchronized void startAsyncTask(final PipelineExecutorTask task) {
  final Future<?> future = executor.submit(() -> {
    final Pipeline pipeline = pipelineRegistry.getPipelineByName(task.getTaskDef().getPipeline());
    try {
      pipelineExecutor.execute(task.getTaskDef().getInput(),
                   pipeline,
                   output -> processPipelineOutput(task,
                                   output),
                   localListener);
    } catch (Exception e) {
      logger.error("An error was produced during pipeline execution for PipelineExecutorTask: " + task.getId(),
             e);
    } finally {
      removeTaskEntry(task.getId());
      removeFutureTask(task.getId());
    }
  });
  storeFutureTask(task.getId(),
          future);
}
origin: org.guvnor/guvnor-ala-spi

  protected void assertHasSameInfo(PipelineExecutorTaskDef expectedTaskDef,
                   PipelineExecutorTaskDef taskDef) {
    assertEquals(expectedTaskDef.getInput(),
           taskDef.getInput());
    assertEquals(expectedTaskDef.getPipeline(),
           taskDef.getPipeline());
    assertEquals(expectedTaskDef.getProviderId(),
           taskDef.getProviderId());
    assertEquals(expectedTaskDef.getProviderType(),
           taskDef.getProviderType());
  }
}
origin: org.kie.workbench/kie-wb-common-ala-spi

  protected void assertHasSameInfo(PipelineExecutorTaskDef expectedTaskDef,
                   PipelineExecutorTaskDef taskDef) {
    assertEquals(expectedTaskDef.getInput(),
           taskDef.getInput());
    assertEquals(expectedTaskDef.getPipeline(),
           taskDef.getPipeline());
    assertEquals(expectedTaskDef.getProviderId(),
           taskDef.getProviderId());
    assertEquals(expectedTaskDef.getProviderType(),
           taskDef.getProviderType());
  }
}
origin: org.guvnor/guvnor-ala-spi

/**
 * Executes a task definition in synchronous mode.
 * @param taskDef task definition for executing.
 * @return the taskId assigned to the executed task.
 */
private String executeSync(final PipelineExecutorTaskDef taskDef) {
  final PipelineExecutorTaskImpl task = taskManagerHelper.createTask(taskDef);
  storeTaskEntry(TaskEntry.newSyncEntry(task));
  final Pipeline pipeline = pipelineRegistry.getPipelineByName(taskDef.getPipeline());
  pipelineExecutor.execute(taskDef.getInput(),
               pipeline,
               output -> processPipelineOutput(task,
                               output),
               localListener);
  removeTaskEntry(task.getId());
  updateExecutorRegistry(task);
  return task.getId();
}
origin: org.kie.workbench/kie-wb-common-ala-spi

/**
 * Executes a task definition in synchronous mode.
 * @param taskDef task definition for executing.
 * @return the taskId assigned to the executed task.
 */
private String executeSync(final PipelineExecutorTaskDef taskDef) {
  final PipelineExecutorTaskImpl task = taskManagerHelper.createTask(taskDef);
  storeTaskEntry(TaskEntry.newSyncEntry(task));
  final Pipeline pipeline = pipelineRegistry.getPipelineByName(taskDef.getPipeline());
  pipelineExecutor.execute(taskDef.getInput(),
               pipeline,
               output -> processPipelineOutput(task,
                               output),
               localListener);
  removeTaskEntry(task.getId());
  updateExecutorRegistry(task);
  return task.getId();
}
org.guvnor.ala.pipeline.executionPipelineExecutorTaskDefgetPipeline

Popular methods of PipelineExecutorTaskDef

  • getInput
  • getStages
  • getProviderId
  • getProviderType

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Notification (javax.management)
  • BoxLayout (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now