public <T> void execute(final Input input, final Pipeline pipeline, final Consumer<T> callback, final PipelineEventListener... eventListeners) { final PipelineContext context = new PipelineContext(pipeline); context.start(input); context.pushCallback(callback); propagateEvent(new BeforePipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); continuePipeline(context, eventListeners); propagateEvent(new AfterPipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); }
public <T> void execute(final Input input, final Pipeline pipeline, final Consumer<T> callback, final PipelineEventListener... eventListeners) { final PipelineContext context = new PipelineContext(pipeline); context.start(input); context.pushCallback(callback); propagateEvent(new BeforePipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); continuePipeline(context, eventListeners); propagateEvent(new AfterPipelineExecutionEvent(context.getExecutionId(), pipeline), eventListeners); }
propagateEvent(new BeforeStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage), propagateEvent(new AfterStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage), final RuntimeException exception = new RuntimeException("An error occurred while executing the " + (stage == null ? "null" : stage.getName()) + " stage.", t); propagateEvent(new OnErrorStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage, exception), eventListeners); propagateEvent(new OnErrorPipelineExecutionEvent(context.getExecutionId(), context.getPipeline(), stage,
propagateEvent(new BeforeStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage), propagateEvent(new AfterStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage), final RuntimeException exception = new RuntimeException("An error occurred while executing the " + (stage == null ? "null" : stage.getName()) + " stage.", t); propagateEvent(new OnErrorStageExecutionEvent(context.getExecutionId(), context.getPipeline(), stage, exception), eventListeners); propagateEvent(new OnErrorPipelineExecutionEvent(context.getExecutionId(), context.getPipeline(), stage,