Codota Logo
Flow.start
Code IndexAdd Codota to your IDE (free)

How to use
start
method
in
org.springframework.batch.core.job.flow.Flow

Best Java code snippets using org.springframework.batch.core.job.flow.Flow.start (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

  @Override
  public FlowExecution call() throws Exception {
    return flow.start(executor);
  }
});
origin: spring-projects/spring-batch

@Override
public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
  return flow.start(executor).getStatus();
}
origin: spring-projects/spring-batch

@Test
public void testBasicHandling() throws Exception {
  Collection<Flow> flows  = new ArrayList<>();
  Flow flow1 = mock(Flow.class);
  Flow flow2 = mock(Flow.class);
  flows.add(flow1);
  flows.add(flow2);
  SplitState state = new SplitState(flows, "foo");
  when(flow1.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
  when(flow2.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
  FlowExecutionStatus result = state.handle(executor);
  assertEquals(FlowExecutionStatus.COMPLETED, result);
}
origin: spring-projects/spring-batch

@Test
public void testConcurrentHandling() throws Exception {
  Flow flow1 = mock(Flow.class);
  Flow flow2 = mock(Flow.class);
  SplitState state = new SplitState(Arrays.asList(flow1, flow2), "foo");
  state.setTaskExecutor(new SimpleAsyncTaskExecutor());
  when(flow1.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
  when(flow2.start(executor)).thenReturn(new FlowExecution("step1", FlowExecutionStatus.COMPLETED));
  FlowExecutionStatus result = state.handle(executor);
  assertEquals(FlowExecutionStatus.COMPLETED, result);
}
origin: spring-projects/spring-batch

/**
 * @see AbstractJob#doExecute(JobExecution)
 */
@Override
protected void doExecute(final JobExecution execution) throws JobExecutionException {
  try {
    JobFlowExecutor executor = new JobFlowExecutor(getJobRepository(),
        new SimpleStepHandler(getJobRepository()), execution);
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: spring-projects/spring-batch

/**
 * @see AbstractJob#doExecute(JobExecution)
 */
@Override
protected void doExecute(final JobExecution execution) throws JobExecutionException {
  try {
    JobFlowExecutor executor = new JsrFlowExecutor(getJobRepository(),
        new JsrStepHandler(getJobRepository(), jobExplorer), execution);
    State startState = ((JsrFlow)flow).getStartState();
    validateFirstStep(startState);
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: spring-projects/spring-batch

/**
 * Delegate to the flow provided for the execution of the step.
 * 
 * @see AbstractStep#doExecute(StepExecution)
 */
@Override
protected void doExecute(StepExecution stepExecution) throws Exception {
  try {
    stepExecution.getExecutionContext().put(STEP_TYPE_KEY, this.getClass().getName());
    StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext());
    FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution());
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
    stepExecution.upgradeStatus(executor.getJobExecution().getStatus());
    stepExecution.setExitStatus(executor.getJobExecution().getExitStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: spring-projects/spring-batch

@Test
public void test() throws Exception {
  FlowBuilder<Flow> builder = new FlowBuilder<>("flow");
  JobRepository jobRepository = new MapJobRepositoryFactoryBean().getObject();
  JobExecution execution = jobRepository.createJobExecution("foo", new JobParameters());
  builder.start(new StepSupport("step") {
    @Override
    public void execute(StepExecution stepExecution) throws JobInterruptedException,
        UnexpectedJobExecutionException {
    }
  }).end().start(new JobFlowExecutor(jobRepository, new SimpleStepHandler(jobRepository), execution));
}
origin: org.springframework.batch/spring-batch-core

  @Override
  public FlowExecution call() throws Exception {
    return flow.start(executor);
  }
});
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

  @Override
  public FlowExecution call() throws Exception {
    return flow.start(executor);
  }
});
origin: apache/servicemix-bundles

  @Override
  public FlowExecution call() throws Exception {
    return flow.start(executor);
  }
});
origin: org.springframework.batch/org.springframework.batch.core

  public FlowExecution call() throws Exception {
    return flow.start(executor);
  }
});
origin: org.springframework.batch/spring-batch-core

@Override
public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
  return flow.start(executor).getStatus();
}
origin: apache/servicemix-bundles

@Override
public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
  return flow.start(executor).getStatus();
}
origin: org.springframework.batch/org.springframework.batch.core

@Override
public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
  return flow.start(executor).getStatus();
}

origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

@Override
public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
  return flow.start(executor).getStatus();
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * @see AbstractJob#doExecute(JobExecution)
 */
@Override
protected void doExecute(final JobExecution execution) throws JobExecutionException {
  try {
    JobFlowExecutor executor = new JobFlowExecutor(getJobRepository(),
        new SimpleStepHandler(getJobRepository()), execution);
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * @see AbstractJob#doExecute(JobExecution)
 */
@Override
protected void doExecute(final JobExecution execution) throws JobExecutionException {
  try {
    JobFlowExecutor executor = new JobFlowExecutor(getJobRepository(),
        new SimpleStepHandler(getJobRepository()), execution);
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: org.springframework.batch/spring-batch-core

/**
 * @see AbstractJob#doExecute(JobExecution)
 */
@Override
protected void doExecute(final JobExecution execution) throws JobExecutionException {
  try {
    JobFlowExecutor executor = new JsrFlowExecutor(getJobRepository(),
        new JsrStepHandler(getJobRepository(), jobExplorer), execution);
    State startState = ((JsrFlow)flow).getStartState();
    validateFirstStep(startState);
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * Delegate to the flow provided for the execution of the step.
 * 
 * @see AbstractStep#doExecute(StepExecution)
 */
@Override
protected void doExecute(StepExecution stepExecution) throws Exception {
  try {
    StepHandler stepHandler = new SimpleStepHandler(getJobRepository(), stepExecution.getExecutionContext());
    FlowExecutor executor = new JobFlowExecutor(getJobRepository(), stepHandler, stepExecution.getJobExecution());
    executor.updateJobExecutionStatus(flow.start(executor).getStatus());
    stepExecution.upgradeStatus(executor.getJobExecution().getStatus());
    stepExecution.setExitStatus(executor.getJobExecution().getExitStatus());
  }
  catch (FlowExecutionException e) {
    if (e.getCause() instanceof JobExecutionException) {
      throw (JobExecutionException) e.getCause();
    }
    throw new JobExecutionException("Flow execution ended unexpectedly", e);
  }
}
org.springframework.batch.core.job.flowFlowstart

Popular methods of Flow

  • getName
  • getStates
    Convenient accessor for clients needing to explore the states of this flow.

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • orElseThrow (Optional)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JComboBox (javax.swing)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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