Controlling Spring-Batch Step Flow in a java-config manner -
According to Spring Batch Documentation (), it is very easy to control the phase flow in an XML config file:
example For this I can write the following work configuration:
& lt; Job ID = "myJob" & gt; & Lt; Step id = "step 1" & gt; & Lt; On failed = "CUSTOM_EXIT_STATUS" /> & Lt; Next = "*" from = "step2" /> & Lt; / Step & gt; & Lt; Step id = "step 2" & gt; & Lt; End = "1ST_EXIT_STATUS" /> & Lt; Next = "2ND_EXIT_STATUS" from "Step10" /> & Lt; Next = "*" from = "step20" /> & Lt; / Step & gt; & Lt; Step ID = "Step 10" Next = "Step 11" /> & Lt; Step ID = "Step 11" /> & Lt; Step id = "step20" next = "step21" /> & Lt; Step id = "step21" next = "step 22" /> & Lt; Step ID = "Step 22" /> & Lt; / Work & gt;
Is that an easy way to define a job configuration in a Java-config form? (JobBuilderFactory and so on ...)
Perhaps if your intentions are a flaw turning "programmatic" (I mean by using the SB Framework Interface) is a built-in implementation and it is sufficient for most use cases.
Unlike XML config, if you are familiar with them, then you can use annotations; Personally I like XML definition, but this is only a personal opinion.
Comments
Post a Comment