java - The <split/> element may not appear on a <job/> with abstract="true" spring batch -


I have different jobs, which need to share split from parent job (many steps running in parallel) Below is the configuration

& Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; Flow & gt; & Lt; Step id = "step0_2" & gt; & Lt; Tasklet Transaction Manager = "Transaction Manager" & gt; & Lt; Wheel Reader = "step0_2ItemReader" author = "step0_2ItemWriter" commit-interval = "1000" /> & Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; Flow & gt; & Lt; Step id = "step0_3" & gt; & Lt; Tasklet Transaction Manager = "Transaction Manager" & gt; & Lt; Wheel Reader = "step0_2ItemReader" author = "step0_2ItemWriter" commit-interval = "1000" /> & Lt; / Tasklet & gt; & Lt; / Step & gt; & Lt; / Flow & gt; & Lt; / Split & gt; & Lt; / Work & gt; & Lt; Job ID = "Job 1" parent = "parent job" & gt; & Lt; Step id = "step1_1" next = "split 1" & gt; & Lt; Task ref = = "basket 1_1 basket" /> & Lt; / Step & gt; & Lt; / Work & gt; & Lt; Job ID = "Job 2" Parent = "Parental Job" & gt; & Lt; Step id = "step2_1" next = "split 1" & gt; & Lt; Task ref = "step2_1Tasklet" /> & Lt; / Step & gt; & Lt; / Work & gt;

I am getting this error

The element can not appear with an abstract = "true" spring batch

How do I share common Can we divide between different jobs by parents, or how can we use standalone divisions like step element?

A & lt; Split / & gt; The element is like a step in the spring batch, although this is not a step, it is a job position of a batch. States are not inheritable in spring batch because there is no way to know what the order will be. If there was a division in the job and there were three stages of Job B and inherited in one work, then where the division breaks? Initially? In the end?

The best way to handle the common flow in this way is to make the flow out and to refer it from within your job. For example (this example flows with the phase, but there may also be a split in it):

  & lt; Job ID = "Job" & gt; & Lt; Flow id = "job1.flow1" parent = "flow1" next = "step 3" /> & Lt; Step ID = "Step 3" Parent = "s3" /> & Lt; / Work & gt; & Lt; Flow id = "flow 1" & gt; & Lt; Split id = "split1" & gt; & Lt; Flow & gt; & Lt; Step ID = "Step 1" Parent = "s1" Next = "Step 2" /> & Lt; Step id = "step2" parent = "s2" /> & Lt; / Flow & gt; & Lt; Flow & gt; & Lt; Step ID = "Step 3" Parent = "s3" /> & Lt; / Flow & gt; & Lt; / Split & gt; & Lt; / Flow & gt;  

You can read more about external flow in the document here:


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -