Package org.springframework.batch.core.job.flow

Examples of org.springframework.batch.core.job.flow.FlowExecutor


        Mockito.when(jobExecution.getJobInstance()).thenReturn(jobInstance);
        return jobExecution;
    }

    protected FlowExecutor createFlowExecutor(final StepExecution stepExecution) {
        return new FlowExecutor() {
            public String executeStep(Step step)
                    throws JobInterruptedException, JobRestartException, StartLimitExceededException {
                step.execute(getStepExecution());
                return "done";
            }
View Full Code Here


        super();
    }

    @Test
    public void testStart() throws FlowExecutionException {
        FlowExecutor flowExecutor = createFlowExecutor("testStartJob", "testStartStep");
        Flow flow = new Flow() {
            public String getName() {
                return "testStart";
            }
View Full Code Here

        assertOperationPath(op, flowExecutor);
    }

    @Test
    public void testResume() throws FlowExecutionException {
        FlowExecutor flowExecutor = createFlowExecutor("testResumeJob", "testResumeStep");
        Flow flow = new Flow() {
            public String getName() {
                return "testResume";
            }
View Full Code Here

    @Test
    public void testExecuteStep()
            throws JobInterruptedException, JobRestartException, StartLimitExceededException {
        Step step = createTestStep("testExecuteStep");
        String stepName = step.getName();
        FlowExecutor executor = createFlowExecutor("testExecuteJob", stepName);

        executor.executeStep(step);

        Operation op = assertOperationDetails(getFirstEntered(), "executeStep", step.getName());
        assertOperationPath(op, null, stepName);
    }
View Full Code Here

    }

    @Test
    public void testAbandonStepExecution() {
        StepExecution stepExec = createStepExecution("testAbandonJobExecution", "testAbandonStepExecution");
        FlowExecutor executor = createFlowExecutor(stepExec);
        executor.abandonStepExecution();

        Operation op = assertOperationDetails(getFirstEntered(), "abandonStepExecution", stepExec.getStepName());
        assertOperationPath(op, stepExec);
    }
View Full Code Here

        assertOperationPath(op, stepExec);
    }

    @Test
    public void testAbandonNoCurrentStepExecution() {
        FlowExecutor executor = createFlowExecutor(null);
        executor.abandonStepExecution();
        assertOperationDetails(getFirstEntered(), "abandonStepExecution", SpringBatchDefinitions.UNKNOWN_VALUE);
    }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.job.flow.FlowExecutor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.