Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3837

Incompatible change in 4.4.5 breaks existing activation work items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 4.4.6
    • 4.4.5
    • activation, core, workflow
    • None

      The code change introduced for MAGNOLIA-3693 makes it impossible to deserialize existing workitems which were created with 4.4.4 or earlier versions.

      As such, just looking at the workflow "inbox" generates tons of exceptions. What's worse, proceeding with such work items will result in items not being deleted when they should. No content should be lost, but the removal of a paragraph, for example, won't be done. TODO: update this issue as soon as we know more.

      To reproduce:

      • install a 4.4.4 instance (with workflow)
      • activate a page (don't "proceed" !)
      • upgrade to 4.4.5
      • open inbox (logs will show exception(s))
      • proceed activation

        * ????
        * profit !!

      Possible track for patching this up:
      Since we can't just revert the Rule class (because users might have started activations with the new class structure), we'd need to hook into the unserialization process. Something along those lines should work:

          private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
              final ObjectInputStream.GetField field = ois.readFields();
              final Object o = field.get("allowedTypes", null);
              // here, if o is a String[], push into a Set, otherwise do nothing ...
          }
      

      As a side note, I'd suggest we remove the serialVersionUID - had it not been there (or modified when code was changed, as it should have), the error log might have been a little cleared. I'd also suggest we don't "just" log the exception when unserializing the rule.

      Classes and methods to look at:

      • info.magnolia.cms.core.version.ContentVersion#init
      • info.magnolia.cms.core.version.BaseVersionManager#getUsedFilter
      • info.magnolia.module.exchangesimple.ReceiveFilter#handleChildren

        Acceptance criteria

              ochytil Ondrej Chytil
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD