Tabnine Logo
FlowStep.afterPropertiesSet
Code IndexAdd Tabnine to your IDE (free)

How to use
afterPropertiesSet
method
in
org.springframework.batch.core.job.flow.FlowStep

Best Java code snippets using org.springframework.batch.core.job.flow.FlowStep.afterPropertiesSet (Showing top 8 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;
}
org.springframework.batch.core.job.flowFlowStepafterPropertiesSet

Javadoc

Ensure that the flow is set.

Popular methods of FlowStep

  • <init>
    Constructor for a FlowStep that sets the flow and of the step explicitly.
  • setFlow
    Public setter for the flow.
  • getJobRepository
  • getName
  • setName
  • execute
  • setJobRepository

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • JTable (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top Vim plugins
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