Results 1 to 2 of 2

Thread: Step names must be unique over all jobs?

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Default 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. #2
    Join Date
    Oct 2004
    Location
    Dallas TX USA
    Posts
    16

    Default 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!



    Quote 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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •