Announcement Announcement Module
Collapse
No announcement yet.
Promote Step ExitStatus to Job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 10:09 AM.

  • #2
    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 ?

    Comment


    • #3
      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

      Comment

      Working...
      X