Announcement Announcement Module
Collapse
No announcement yet.
Step names must be unique over all jobs? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Step names must be unique over all jobs?

    Hi,

    we have configured two jobs with the same tasklet in the first step:

    First Job:

    <batch:job id="job1" parent="baseJob">
    <batch:step id="stepRfhRemover">
    <batch:tasklet>
    <bean class="eu.unicredit.zmx.batch.tasklet.RfhRemoverTa sklet" scope="step">
    <property name="inFile" value="A"/>
    <property name="outFile" value="B"/>
    </bean>
    </batch:tasklet>
    </batch:step>
    </batch:job>

    Second Job:

    <batch:job id="job2" parent="baseJob">
    <batch:step id="stepRfhRemover">
    <batch:tasklet>
    <bean class="eu.unicredit.zmx.batch.tasklet.RfhRemoverTa sklet" scope="step">
    <property name="inFile" value="C"/>
    <property name="outFile" value="D"/>
    </bean>
    </batch:tasklet>
    </batch:step>
    </batch:job>

    If we execute job2 we see that the tasklet is injected with the values from job1 (A and B). We found out, that if we choose different names for the steps (for example id="job1.stepRfhRemover" and id="job2.stepRfhRemover"), everything works fine.

    In our opinion a step should be unique for a job even it has the same id. Is this a bug or feature?

    Bye
    Achim

  • #2
    Thank you!

    I have spent the last several days trying to figure this out - I was sure I was doing something wrong, finally I decided to come to this forum and see if anyone else had the same or similar problem.

    I have 15 different batch jobs configured and I notice that the other 14 all executed the input file from the 1st job loaded???

    many, many thanks!



    Originally posted by insideout View Post
    Hi,

    we have configured two jobs with the same tasklet in the first step:

    First Job:

    <batch:job id="job1" parent="baseJob">
    <batch:step id="stepRfhRemover">
    <batch:tasklet>
    <bean class="eu.unicredit.zmx.batch.tasklet.RfhRemoverTa sklet" scope="step">
    <property name="inFile" value="A"/>
    <property name="outFile" value="B"/>
    </bean>
    </batch:tasklet>
    </batch:step>
    </batch:job>

    Second Job:

    <batch:job id="job2" parent="baseJob">
    <batch:step id="stepRfhRemover">
    <batch:tasklet>
    <bean class="eu.unicredit.zmx.batch.tasklet.RfhRemoverTa sklet" scope="step">
    <property name="inFile" value="C"/>
    <property name="outFile" value="D"/>
    </bean>
    </batch:tasklet>
    </batch:step>
    </batch:job>

    If we execute job2 we see that the tasklet is injected with the values from job1 (A and B). We found out, that if we choose different names for the steps (for example id="job1.stepRfhRemover" and id="job2.stepRfhRemover"), everything works fine.

    In our opinion a step should be unique for a job even it has the same id. Is this a bug or feature?

    Bye
    Achim

    Comment

    Working...
    X