Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-7576

A failed job is not unlocked when the FailedJobListener throws an exception

    Details

      Description

      Problem:
      When a job execution fails then the FailedJobListener is invoked which can decrement the retries and unlock the job. If the FailedJobListener throws an exception then the whole transaction rolls back and the job is still locked.
      This can happen when an incident creation fails because of an optimistic lock exception.

      AT:

      • when the FailedJobListener throws an optimistic lock exception then try to invoke the listener again
      • I can configure the amount of retries

        Issue Links

          Activity

          Hide
          thorben.lindhauer Thorben Lindhauer added a comment -

          Review:

          • FailedJobListenerWithRetriesTest: Could lock job via JobEntity's setters instead of executing AcquireJobsCmd => more stable with respect to refactorings
          • org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.getFailedJobListenerMaxRetries(): Does not use the value from process engine configuration if the job is executed via ManagementService#executeJob
          Show
          thorben.lindhauer Thorben Lindhauer added a comment - Review: FailedJobListenerWithRetriesTest : Could lock job via JobEntity's setters instead of executing AcquireJobsCmd => more stable with respect to refactorings org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.getFailedJobListenerMaxRetries() : Does not use the value from process engine configuration if the job is executed via ManagementService#executeJob
          Hide
          michael.schoettes Michael Schoettes added a comment -

          Could you please adjust the fix Versions

          Show
          michael.schoettes Michael Schoettes added a comment - Could you please adjust the fix Versions

            People

            • Assignee:
              svetlana.dorokhova Svetlana Dorokhova
              Reporter:
              philipp.ossler Philipp Ossler
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: