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

The process engine should only log exceptions that do not propagate to user code



      Current behavior:

      • Exceptions are logged in two places:
        1. Whenever a command fails with an exception in CommandContext#close (configurable with the changes implemented in CAM-10067)
        2. Whenever a job fails in ExecuteJobsRunnable (configurable via CAM-10067 as well)
      • In consequence, job failures are logged twice

      Expected behavior:

      • Case 1 - User code calls API: Engine does not log exception; the user's code should do that (or whoever calls that, in case the exception bubbles further up)
      • Case 2 - User code executes a job: same as case 1; no logging
      • Case 3 - Job executor executes job: Exception is logged once in ExecuteJobsRunnable
      • I can optionally enable logging of all command failures (in CommandContext#close) => this will lead to duplicated logging in case of job execution

      Side notes:

      • Default for optional failure logging: 7.11.x: enabled by default to not change logging behavior; 7.12.0: disabled by default with note in migration guide
      • The engine should always log exceptions that would otherwise get swallowed, e.g. when an exception occurs during transaction rollback, it may get swalled (confer CommandContext#close)
      • This will undo some changes made with CAM-10067, in particular, the flag for logging of command exeptions from application threads will be replaced by the flag for generally logging command failures; the flag for logging job failures on the last try will only apply to the logging in ExecuteJobsRunnable

        Issue Links


          miklas.boskamp Miklas Boskamp added a comment - - edited Tassilo Weidner , backported this to 7.11 engine https://github.com/camunda/camunda-bpm-platform-maintenance/commit/65b371e14cb5e78ca19068bb86ab66981ab3ebb5 documentation https://github.com/camunda/camunda-docs-manual/commit/fb138040c19d9026e8b3bd42709e8cb96ed4536e https://github.com/camunda/camunda-docs-manual/commit/24795b4e6e88a00dcf9bd1e3e111e6d994af7a9d


            • Assignee:
              thorben.lindhauer Thorben Lindhauer
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: