1 Reply Latest reply on Apr 7, 2015 1:39 AM by soumya.plavaga

    java.util.List type process variable's updated value are not displaying in jbpm 6.1.0.Final

    soumya.plavaga

      java.util.List type process variable's updated value are not displaying neither in my custom process variable listing api using auditService nor in jbpm-console workbench.

       

      My bpmn file is simple, I have a process variable say 'numList' of data type java.util.List. At the starting, I am initializing the 'numList' as following -

       

      List<Integer> numListLocal = new ArrayList<>();

      kcontext.setVariable("numList", numListLocal);

       

      Within next script task I am populating the 'numList' with some Integer value and reseting it into process context as following -

       

      numList.add(1);

      kcontext.setVariable("numList", numList);

       

      Within next script task, if I print the 'numList' it is printing correctly as [1].

       

      But if I see the process variable value in jbpm-cosnole workbench or through my custom api it is displaying as empty array list [].

       

      Following are the codes of my custom api for process variable listing -

       

      public Map<String, Object> getProcessVariableMap(long processInstanceId) {

       

              Map<String, Object> processVariableMap = new HashMap<>();

              AuditService auditService = restRemoteClient.getAuditService();

              List<? extends VariableInstanceLog> variableInstances = auditService.findVariableInstances(processInstanceId);

              for (VariableInstanceLog variableInstanceLog : variableInstances) {

                  processVariableMap.put(variableInstanceLog.getVariableId(), variableInstanceLog.getValue());

              }

              return processVariableMap;

          }

       

      I have seen jbpm's 'VariableInstanceLog' table having empty arraylist value for the process variable 'numList'. Hence my api is displaying empty value in UI.

       

      I am attaching my bpmn file. Can you please advise if anything I am doing wrong or there is any known issue for my above use case ?