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

Cockpit does not show variables when no activity instance id is set

    XMLWordPrintable

    Details

      Description

      When via POST /variable-instance the returned variables does not provide an activityInstanceId, for example like this:

      [{
         "type": "Long",
         "value": 123456,
         "valueInfo": {      
         },
         "id": "def",
         "name": "aVariable",
         "processInstanceId": "abc",
         "executionId": "xyz",
         "caseInstanceId": null,
         "caseExecutionId": null,
         "taskId": null,
         "activityInstanceId": null,
         "errorMessage": null
       }]
      

      then the following exception is thrown:

      angular.js:9778 TypeError: Cannot read property 'id' of undefined
      at http://localhost:8080/camunda/api/cockpit/plugin/base/static/app/plugin.js:2:693
      at Array.map (native)
      at http://localhost:8080/camunda/api/cockpit/plugin/base/static/app/plugin.js:2:424
      at http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:8462
      at c (http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:22813)
      at c (http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:22813)
      at http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:23490
      at c.$eval (http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:28557)
      at c.$digest (http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:27087)
      at c.$apply (http://localhost:8080/camunda/app/cockpit/scripts/deps.js:5:28876)
      

      Expected behavior:
      The variables are shown in tab even if no activityInstanceId is provided

      Hints:
      The var instance is undefined in such a case, see
      https://github.com/camunda/camunda-bpm-webapp/blob/master/ui/cockpit/plugins/base/app/views/processInstance/variableInstancesTab.js#L243-L253

        Attachments

          Activity

            People

            Assignee:
            michael.schoettes Michael Schoettes
            Reporter:
            roman.smirnov Smirnov Roman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: