Search in sources :

Example 1 with BasePipeline

use of org.guvnor.ala.pipeline.impl.BasePipeline in project kie-wb-common by kiegroup.

the class PipelineExecutorTraceImplMarshallerTest method getValue.

@Override
public PipelineExecutorTraceImpl getValue() {
    // only the stage names are used by the taskDef, so the pipeline can be mocked.
    List<Stage> stages = mockStages(STAGE_COUNT);
    Pipeline pipeline = new BasePipeline(PIPELINE_NAME, stages) {
    };
    Input input = mockInput(PIPELINE_INPUT_SIZE);
    PipelineExecutorTaskDefImpl taskDef = new PipelineExecutorTaskDefImpl(pipeline, input);
    PipelineExecutorTaskImpl taskImpl = new PipelineExecutorTaskImpl(taskDef, PIPELINE_EXECUTION_ID);
    taskImpl.setPipelineStatus(PipelineExecutorTask.Status.SCHEDULED);
    taskImpl.setPipelineError(mockError(PIPELINE_ERROR, PIPELINE_ERROR_DETAIL));
    taskImpl.getTaskDef().getStages().forEach(stage -> taskImpl.setStageError(stage, mockStageError(stage)));
    taskImpl.setOutput(new MockPipelineOutput(PIPELINE_OUTPUT));
    return new PipelineExecutorTraceImpl(taskImpl);
}
Also used : PipelineExecutorTaskDefImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskDefImpl) Input(org.guvnor.ala.pipeline.Input) PipelineExecutorTaskImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskImpl) PipelineExecutorTraceImpl(org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl) Stage(org.guvnor.ala.pipeline.Stage) BasePipeline(org.guvnor.ala.pipeline.impl.BasePipeline) BasePipeline(org.guvnor.ala.pipeline.impl.BasePipeline) Pipeline(org.guvnor.ala.pipeline.Pipeline)

Aggregations

Input (org.guvnor.ala.pipeline.Input)1 Pipeline (org.guvnor.ala.pipeline.Pipeline)1 Stage (org.guvnor.ala.pipeline.Stage)1 PipelineExecutorTaskDefImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskDefImpl)1 PipelineExecutorTaskImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTaskImpl)1 PipelineExecutorTraceImpl (org.guvnor.ala.pipeline.execution.impl.PipelineExecutorTraceImpl)1 BasePipeline (org.guvnor.ala.pipeline.impl.BasePipeline)1