Cannot implicitly update empty list variable with Json variables

XMLWordPrintable

      Current behavior:
      Initialize a JSON-serialized variable to a list.
      In a Java delegate (or anywhere later on), add a java object to that list. Do NOT update the variable explicitly via execution.setVariable (but use the implicit update feature).

      => the generic type of the list is not updated in the database. Upon later deserialization, the list elements are not deserialized to the class of the object originally inserted (instead Jackson deserializes a generic map)

      Solution Hint:
      DeserializedObject#flush implements the implicit update. It only updates the serialized byte value of these variables, not the actual object value; should probably call serializer.writeValue(..) instead of simply updating the byte array.

      Test case: https://github.com/camunda/camunda-bpm-platform/commit/07b4d209e96e08baf1d90af56dc56488fc46a307#diff-0

            Assignee:
            Roman Smirnov
            Reporter:
            Thorben Lindhauer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: