Results 1 to 3 of 3

Thread: Promote Step ExitStatus to Job

  1. #1

    Default [SOLVED] Promote Step ExitStatus to Job

    Hello !

    What is the preferred Way to promote a custom ExitStatus in a Step to the Job ?

    Right now i use a JobExecutionListener to go through the StepExecutions and find custom ExitStati and create the new JobExecution.ExitStatus from it.

    MfG
    Michael
    Last edited by michael.lange; May 4th, 2009 at 09:09 AM.

  2. #2

    Default

    the setup i tried

    Code:
        <job id="fahrzeugImportJob">
            <step id="checkJobParameters">
                <tasklet ref="checkJobParametersTasklet" />
            </step>
            <step id="step1">
                <tasklet ref="ftpLoadAndExtractTasklet" />
            </step>
            <listeners>
                <listener ref="testListener" />
            </listeners>
        </job>
    • the first step-tasklet implements StepExecutionListener
    • the first step-tasklet returns a custom ExitStatus("FOO") in afterStep()


    if i do nothing in the testListener than the Job returns with

    • JobExecution.BatchStatus - COMPLETED
    • JobExecution.ExitStatus - COMPLETED


    if i promote the ExitStatus from Step to Jobexecution (in testListener), the Job returns with

    • JobExecution.BatchStatus - COMPLETED
    • JobExecution.ExitStatus - FOO


    is there a better way than the custom JobExecutionListener to promote Step-ExitStatus ?

  3. #3

    Default

    it does work with custom fail conditions, that's somehow ok, but i can't promote the ExitStatus.description this way

    anyways the problem is solved for me, i go with custom fail conditions

Posting Permissions

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