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

XMLWordPrintable

      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

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: