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

Complete task/submit form Rest API doesn't serialize variables correctly

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.11.0, 7.11.0-alpha5
    • 7.11.0
    • engine
    • None

      Currently, on task completion or form submission, the variables are returned as follows:

      {
          "aVariable": "aStringValue",
          "anotherVariable": 42
      }
      

      In other rest endpoints we are returning the complete information (type,valueInfo,...) of the VariableMap:

      {
            "aVariable" : {"value" : "aStringValue", "type": "String",
                          "valueInfo" : { "transient" : true } },
            "anotherVariable" : {"value" : 42, "type": "Integer"}
      }
      

      It is a quick fix, add VariableValueDto.fromTypedValue [1] to [2] and [3].
      [1]: https://github.com/camunda/camunda-bpm-platform/blob/3a765b00cd2e37de2186423b0f6f68036cfcba13/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/dto/runtime/ProcessInstanceWithVariablesDto.java#L52-L58
      [2]: https://github.com/camunda/camunda-bpm-platform/blob/3a765b00cd2e37de2186423b0f6f68036cfcba13/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/sub/task/impl/TaskResourceImpl.java#L102-L103
      [3]: https://github.com/camunda/camunda-bpm-platform/blob/3a765b00cd2e37de2186423b0f6f68036cfcba13/engine-rest/engine-rest/src/main/java/org/camunda/bpm/engine/rest/sub/task/impl/TaskResourceImpl.java#L135-L136

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              yana.vasileva Yana Vasileva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: