Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-26

Batchlet/Chunk exception handling does not conform to JSR352 specification

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.0.0.Final
    • 1.0.0.CR2
    • jberet-core
    • None

      When running a step (batchlet or chunk) if an exception is raised, transitions are not resolved.

      Below is an example of step:

      <step id="updateOrderFileOK">
              <batchlet ref="updateSimCardsOrderEntryBatchlet">
                  <properties>
                      <property name="status" value="OK"/>
                  </properties>
              </batchlet>
              <next on="COMPLETED" to="moveToArchive"/>
              <next on="*" to="moveToError"/>
          </step>
      

      If an exception is raised in this step the 2nd "next" transition is not resolved and the batch stops.
      This seems to be due to the fact that the runner resolve transitions only if the batchstatus is COMPLETED.

      According to the spec, defaut exception handling behavior can be overriden by specifying transitions element.

      Below is a short part of the spec relative to batchlet:

      8.2.2.1 Batchlet Exception Handling 
       
      By default, when any batch artifact that is part of a batchlet type step throws an exception to the Batch 
      Runtime, the job execution ends with a batch status of FAILED. The default behavior can be overridden 
      for the entire step by configuring a transitions element that matches the step's exit status. 
      

              cfang@redhat.com Cheng Fang
              j.fougere Julien Fougere (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: