Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5580

Looping for scheduled events

XMLWordPrintable

      Steps to Reproduce

      Create and schedule an event that throws an Exception.

      Current Result

      ZK starts a looping.

      Expected Result

      The exception should just be thrown once.

      Debug Information

      When an exception occurs, there is a failure in event execution and proper removal from the queue. Thus, the line responsible for removing the event from the list of events (_schedInfos) that need processing is not executed.

      Subsequent events in the queue are processed, restarting the index count used to retrieve events that require treatment (_scheduleInfoReadCount). This results in the repetition of the original event, which fails again and remains in the cache. The cycle persists until the iDempiere service crashes or until the cache (_schedInfos) is cleared after 10 minutes.

      DesktopImpl.ScheduleListener.onEvent code

      Line 1894 should have a fallback in case of exceptions to remove it from the list of events to be executed, avoiding loops.

      Workaround

      A workaround to avoid the looping to happens is to apply the needed treatments at the scheduled event to avoid the exception to be thrown.
      This prevents the loop to be started at the specific case, if any new exception is discovered, it should be also treated.

            Unassigned Unassigned
            MarcosFavaretto MarcosFavaretto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: