Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9932

Spin Value XML and JSON lose transient flag when built from UntypedValue

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.13.0, 7.12.1, 7.13.0-alpha1
    • 7.11.0-alpha3
    • engine, spin
    • None

      If:

      • variable is created with execution.setVariable("test", Variables.untypedValue(Spin.JSON("{}"), true));

      Then:

      • execution.getVariableTyped("test").isTransient() is false

      Expected:

      • execution.getVariableTyped("test").isTransient() is true

      Impact:

      • The original variable test is not persisted, but if I copy the value I accessed via #getVariableTyped to another variable, this new variable will be persisted
      • Example case: I set a transient variable and then have a call activity mapping that hands all variables over to the called process; the variable will be persisted in the called process

      Root cause:

      • When we construct a typed value out of a variable, we do not take the transient flag into account

      Failing test cases
      https://github.com/camunda/camunda-bpm-platform/commit/cc58efcdeccaa5801c334288f11d11fd3c96e14f

        This is the controller panel for Smart Panels app

            [CAM-9932] Spin Value XML and JSON lose transient flag when built from UntypedValue

            Hi Ragnar,

            this is indeed unexpected behavior and we will now decide how we continue with it.

            Stay tuned!

            Cheers,
            Tassilo

            Tassilo Weidner added a comment - Hi Ragnar, this is indeed unexpected behavior and we will now decide how we continue with it. Stay tuned! Cheers, Tassilo

            Hi Ragnar,

            We will try to fix this with 7.11, but may postpone it if we don't have the time.

            Cheers,
            Thorben

            Thorben Lindhauer added a comment - Hi Ragnar, We will try to fix this with 7.11, but may postpone it if we don't have the time. Cheers, Thorben

            This happens not only with Spin values, but with all typed values that extend org.camunda.bpm.engine.variable.value.SerializableValue, so e.g. also object values.

            Thorben Lindhauer added a comment - This happens not only with Spin values, but with all typed values that extend org.camunda.bpm.engine.variable.value.SerializableValue , so e.g. also object values.

              Unassigned Unassigned
              ragnar.nevries Ragnar Nevries
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: