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

In cockpit, setting process instance variable to null does not work as expected for JSON, XML and Objects

    Details

    • Type: Bug Report
    • Status: Open
    • Priority: L3 - Default
    • Resolution: Unresolved
    • Affects Version/s: 7.9.0-alpha1, 7.9.0-alpha2, 7.9.0-alpha3
    • Fix Version/s: None
    • Component/s: cockpit
    • Labels:
      None

      Description

      Expected:

      • In Cockpit > Process Instance view > variables table > edit mode, clicking on `...` to set variable to null works as follow based on the variable type:
        • if type is json, then it sets the value to {} or [].
        • if type is xml, then it sets the value to <_/>
        • if type is object, then it should be set to null.

      Problem:

      • the variable value is always set to null regardless of the type.
      • setting null Object variables shows an exception when saving.

        Activity

        Hide
        roman.smirnov Smirnov Roman added a comment - - edited

        In case of setting an object to null fails, because the value info are not provided when performing the request. The request should look like this for example:

        POST /execution/{id}/localVariables

        Request Body:

        {
          "modifications":
          {
            "approverGroups":
              {
                "value":null,
                "type":"Object",
                "valueInfo": {"objectTypeName": "java.util.ArrayList", "serializationDataFormat": "application/x-java-serialized-object" }
              }
            }
        }
        

        In case of JSON and XML it should not be {} or < />, it should be "null". Btw. when the JSON or XML is set to null, it is not possible to edit it anymore. Furthermore, it should also be possible to add JSON or XML with "null".

        Show
        roman.smirnov Smirnov Roman added a comment - - edited In case of setting an object to null fails, because the value info are not provided when performing the request. The request should look like this for example: POST /execution/{id}/localVariables Request Body: { "modifications" : { "approverGroups" : { "value" : null , "type" : " Object " , "valueInfo" : { "objectTypeName" : "java.util.ArrayList" , "serializationDataFormat" : "application/x-java-serialized-object" } } } } In case of JSON and XML it should not be {} or < />, it should be "null". Btw. when the JSON or XML is set to null, it is not possible to edit it anymore. Furthermore, it should also be possible to add JSON or XML with "null".

          People

          • Assignee:
            Unassigned
            Reporter:
            seif.ghezala Seif Ghezala
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development