Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-2121

ResumeOrder into ConsumeNotices block should not crash the Controller

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.5.0, 2.6.0, 2.7.0
    • 2.5.9, 2.6.6, 2.7.0
    • None
    • None

    Description

      Current Situation

      • When a user stops the ConsumeNotices instruction and adds an order to the workflow, then the order will be suspended at the ConsumeNotices instruction. If the user resumes the order to continue from the next position inside the ConsumeNotices instruction then the order proceeds and completes the run but is displayed as running/in progress in the History view and the order switches to the waiting state. An error in the Controller's log file is raised:
        "2024-03-04T12:14:21,700 ERROR js7.data.controller.ControllerStateExecutor - Order:#2024-03-04#T55443783705-root: Event 'Order:#2024-03-04#T55443783705-root <-: OrderNoticesConsumed(false)' cannot be applied to 'ControllerState': UnknownKey: No such OrderId: Order:#2024-03-04#T55443783705-root"
      • At the point in time when the error occurs the Controller continues to process other orders. However, if the Controller is restarted then the above error is raised once again and the Controller crashes.
      • When the workflow is suspended and the user tries to cancel the waiting order then Controller crashes.

      How to reproduce

      1. Create a workflow using the ConsumeNotices instruction
      2. Stop the ConsumeNotices instruction.
      3. Add an ad hoc order to the workflow, causing the order to enter the suspended state.
      4. Resume the order and make it continue from a later position inside the ConsumeNotices instruction, for example from a job instruction.
      5. The order will complete execution of the job and will be displayed as running/in progress. After job completion the order is not moved to a position after the ConsumeNotices instruction block. The order is stuck in the waiting state. The following scenario happens:
        • If the user cancels the waiting order then the order is stuck in the waiting/cancelling state. In this situation the Controller is up and running and does not crash.
        • If the user suspends the workflow and then tries to cancel the waiting order, then the Controller will crash.

      Desired Behavior
      When stopping the ConsumeNotices instruction and resuming a suspended order to continue from a later position inside the ConsumeNotices instruction:

      • this should be denied by the GUI.
      • The waiting order when cancelled should not be stuck in the waiting/cancelling state
      • If the workflow is suspended and the user tries to the cancel the waiting order then the Controller should not crash.

      Delimitation

      • The issue occurs when a user stops the ConsumeNotices instruction and resumes a suspended order from the next instruction inside the ConsumeNotices instruction. Instead of doing that users can directly resume the order from the ConsumeNotices instruction. To this purpose required notices can be posted from the Resources->Notice Boards view.
      • The underlying problem is the fact that an order does not pass the ConsumeNotices instruction but is moved to some later position within the block instruction. This cannot work as notices cannot be ignored.
      • Users can apply the following proceeding:
        • Extend the ConsumeNotices instruction for an additional notice like this:
          • ('Notice1' && 'Notice2' ) || 'ManualNotice3'
          • In the example either Notice1 and Notice2 have to be present or ManualNotice3 is present. This allows to have Notice1 and Notice2 created by PostNotices instructions while ManualNotice3 is posted manually by the user from the Resources->Notice Boards view.
        • This mechanism allows an order to pass the ConsumeNotices instruction. Users can skip or stop any later instructions inside the ConsumeNotices instruction if for example certain jobs should not be executed.

      Attachments

        Activity

          People

            jz Joacim Zschimmer
            Ajay-Kumbhkar Ajay Kumbhkar
            Divyani Rathore Divyani Rathore
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: