Codota Logo
PipelineExecutorTaskDef.getPipeline
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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