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

Deserialized JSON Variable provides serialized JacksonJsonNode value

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Won't Fix
    • L3 - Default
    • None
    • 7.11.4
    • engine
    • None

    Description

      Given a Process Instance with a JSON-type variable:

      POST /process-instance/key/invoice/start
      
      {
        "variables": {
          "aVariable": {
            "value": "{\"someObject\": [{\"firstItem\": \"aaa\",\"secondItem\": \"aaa\"}],\"otherItem\": \"\"}",
            "type": "json"
          }
        }
      }
      

      When the historic variable instance is requested:

      GET /history/variable-instance/{id}
      

      Then the serialized content of a JacksonJsonNode instance is returned:

      {
        "type": "Json",
        "value": {
          "array": false,
          "null": false,
          "value": false,
          "object": true,
          "boolean": false,
          "string": false,
          "nodeType": "OBJECT",
          "number": false,
          "dataFormatName": "application/json"
        },
        "valueInfo": {},
        "id": "2a01f326-1aa8-11ea-94a6-0c54150ec03b",
        "name": "aVariable",
        "processInstanceId": "2a012fd4-1aa8-11ea-94a6-0c54150ec03b",
        "executionId": "2a012fd4-1aa8-11ea-94a6-0c54150ec03b",
        "caseInstanceId": null,
        "caseExecutionId": null,
        "taskId": null,
        "activityInstanceId": "2a012fd4-1aa8-11ea-94a6-0c54150ec03b",
        "errorMessage": null,
        "tenantId": null
      }
      

      Expected behavior is the original JSON variable value:

      {
        "someObject": [
          {
            "firstItem": "aaa",
            "secondItem": "aaa"
          }
        ],
        "otherItem": ""
      }
      

      Note:
      Disabling deserialization returns the correct value:

      GET /history/variable-instance/{id}?deserializeValue=false
      

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              nikola.koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce