Tabnine Logo
FlowStep.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.batch.core.job.flow.FlowStep
constructor

Best Java code snippets using org.springframework.batch.core.job.flow.FlowStep.<init> (Showing top 9 results out of 315)

origin: spring-projects/spring-batch

/**
 * Test method for {@link org.springframework.batch.core.job.flow.FlowStep#afterPropertiesSet()}.
 */
@Test(expected=IllegalStateException.class)
public void testAfterPropertiesSet() throws Exception{
  FlowStep step = new FlowStep();
  step.setJobRepository(jobRepository);
  step.afterPropertiesSet();
}
origin: spring-projects/spring-batch

/**
 * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a
 * transaction because the individual steps are supposed to manage their own transaction state.
 * 
 * @return a flow step
 */
public Step build() {
  FlowStep step = new FlowStep();
  step.setName(getName());
  step.setFlow(flow);
  super.enhance(step);
  try {
    step.afterPropertiesSet();
  }
  catch (Exception e) {
    throw new StepBuilderException(e);
  }
  return step;
}
origin: spring-projects/spring-batch

/**
 * Test method for {@link org.springframework.batch.core.job.flow.FlowStep#doExecute(org.springframework.batch.core.StepExecution)}.
 */
@Test
public void testDoExecute() throws Exception {
  FlowStep step = new FlowStep();
  step.setJobRepository(jobRepository);
  SimpleFlow flow = new SimpleFlow("job");
  List<StateTransition> transitions = new ArrayList<>();
  transitions.add(StateTransition.createStateTransition(new StepState(new StubStep("step1")), "step2"));
  StepState step2 = new StepState(new StubStep("step2"));
  transitions.add(StateTransition.createStateTransition(step2, ExitStatus.FAILED.getExitCode(), "end0"));
  transitions.add(StateTransition.createStateTransition(step2, ExitStatus.COMPLETED.getExitCode(), "end1"));
  transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.FAILED, "end0")));
  transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.COMPLETED, "end1")));
  flow.setStateTransitions(transitions);
  step.setFlow(flow);
  step.afterPropertiesSet();
  StepExecution stepExecution = jobExecution.createStepExecution("step");
  jobRepository.add(stepExecution);
  step.execute(stepExecution);
  stepExecution = getStepExecution(jobExecution, "step");
  assertEquals(ExitStatus.COMPLETED, stepExecution.getExitStatus());
  stepExecution = getStepExecution(jobExecution, "step2");
  assertEquals(ExitStatus.COMPLETED, stepExecution.getExitStatus());
  assertEquals(3, jobExecution.getStepExecutions().size());
}
origin: spring-projects/spring-batch

@Test
public void testDoExecuteAndFail() throws Exception {
  FlowStep step = new FlowStep();
  step.setJobRepository(jobRepository);
  SimpleFlow flow = new SimpleFlow("job");
  List<StateTransition> transitions = new ArrayList<>();
  transitions.add(StateTransition.createStateTransition(new StepState(new StubStep("step1")), "step2"));
  StepState step2 = new StepState(new StubStep("step2", true));
  transitions.add(StateTransition.createStateTransition(step2, ExitStatus.FAILED.getExitCode(), "end0"));
  transitions.add(StateTransition.createStateTransition(step2, ExitStatus.COMPLETED.getExitCode(), "end1"));
  transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.FAILED, "end0")));
  transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.COMPLETED, "end1")));
  flow.setStateTransitions(transitions);
  step.setFlow(flow);
  step.afterPropertiesSet();
  StepExecution stepExecution = jobExecution.createStepExecution("step");
  jobRepository.add(stepExecution);
  step.execute(stepExecution);
  stepExecution = getStepExecution(jobExecution, "step1");
  assertEquals(ExitStatus.COMPLETED, stepExecution.getExitStatus());
  stepExecution = getStepExecution(jobExecution, "step2");
  assertEquals(ExitStatus.FAILED, stepExecution.getExitStatus());
  stepExecution = getStepExecution(jobExecution, "step");
  assertEquals(ExitStatus.FAILED, stepExecution.getExitStatus());
  assertEquals(3, jobExecution.getStepExecutions().size());
}
origin: spring-projects/spring-batch

/**
 * Test method for {@link org.springframework.batch.core.job.flow.FlowStep#doExecute(org.springframework.batch.core.StepExecution)}.
 */
@Test
public void testExecuteWithParentContext() throws Exception {
  FlowStep step = new FlowStep();
  step.setJobRepository(jobRepository);
  SimpleFlow flow = new SimpleFlow("job");
  List<StateTransition> transitions = new ArrayList<>();
  transitions.add(StateTransition.createStateTransition(new StepState(new StubStep("step1")), "end0"));
  transitions.add(StateTransition.createEndStateTransition(new EndState(FlowExecutionStatus.COMPLETED, "end0")));
  flow.setStateTransitions(transitions);
  step.setFlow(flow);
  step.afterPropertiesSet();
  StepExecution stepExecution = jobExecution.createStepExecution("step");
  stepExecution.getExecutionContext().put("foo", "bar");
  jobRepository.add(stepExecution);
  step.execute(stepExecution);
  stepExecution = getStepExecution(jobExecution, "step");
  assertEquals(ExitStatus.COMPLETED, stepExecution.getExitStatus());
  stepExecution = getStepExecution(jobExecution, "step1");
  assertEquals(ExitStatus.COMPLETED, stepExecution.getExitStatus());
  assertEquals("bar", stepExecution.getExecutionContext().get("foo"));
}
origin: org.springframework.batch/spring-batch-core

/**
 * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a
 * transaction because the individual steps are supposed to manage their own transaction state.
 * 
 * @return a flow step
 */
public Step build() {
  FlowStep step = new FlowStep();
  step.setName(getName());
  step.setFlow(flow);
  super.enhance(step);
  try {
    step.afterPropertiesSet();
  }
  catch (Exception e) {
    throw new StepBuilderException(e);
  }
  return step;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a
 * transaction because the individual steps are supposed to manage their own transaction state.
 * 
 * @return a flow step
 */
public Step build() {
  FlowStep step = new FlowStep();
  step.setName(getName());
  step.setFlow(flow);
  super.enhance(step);
  try {
    step.afterPropertiesSet();
  }
  catch (Exception e) {
    throw new StepBuilderException(e);
  }
  return step;
}
origin: apache/servicemix-bundles

/**
 * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a
 * transaction because the individual steps are supposed to manage their own transaction state.
 * 
 * @return a flow step
 */
public Step build() {
  FlowStep step = new FlowStep();
  step.setName(getName());
  step.setFlow(flow);
  super.enhance(step);
  try {
    step.afterPropertiesSet();
  }
  catch (Exception e) {
    throw new StepBuilderException(e);
  }
  return step;
}
origin: org.springframework.batch/org.springframework.batch.core

FlowStep ts = new FlowStep();
configureFlowStep(ts);
return ts;
org.springframework.batch.core.job.flowFlowStep<init>

Javadoc

Default constructor convenient for configuration purposes.

Popular methods of FlowStep

  • setFlow
    Public setter for the flow.
  • afterPropertiesSet
    Ensure that the flow is set.
  • getJobRepository
  • getName
  • setName
  • execute
  • setJobRepository

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Permission (java.security)
    Legacy security code; do not use.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now