Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4858

[GSS](6.4.z) Completing task with empty map overrides the current output variables

    Details

    • Fix Build:
      CR1
    • Steps to Reproduce:
      Hide
      KieServicesClient client = configure(SERVER_URL, USERNAME, PASSWORD);
      
      ProcessServicesClient pClient = client.getServicesClient(ProcessServicesClient.class);
      UserTaskServicesClient tClient = client.getServicesClient(UserTaskServicesClient.class);
      
      long pid = pClient.startProcess(CONTAINER, PROCESS_ID);
      List<TaskSummary> tasks = tClient.findTasksByStatusByProcessInstanceId(pid, null, 0, 10);
      long tid = tasks.get(0).getId();
      tClient.startTask(CONTAINER, tasks.get(0).getId(), "anton2");
      Map<String, Object> output = new HashMap<String, Object>();
      output.put("t_var", "sampleTest");
      tClient.saveTaskContent(CONTAINER, tid, output); ; // now the variable t_var is correctly saved
      output.clear();
      tClient.completeTask(CONTAINER, tid, "anton2", output); // when task is completed with empty params, the t_var variable will NOT be mapped to the process variable, instead it will be cleared
      
      Show
      KieServicesClient client = configure(SERVER_URL, USERNAME, PASSWORD); ProcessServicesClient pClient = client.getServicesClient(ProcessServicesClient.class); UserTaskServicesClient tClient = client.getServicesClient(UserTaskServicesClient.class); long pid = pClient.startProcess(CONTAINER, PROCESS_ID); List<TaskSummary> tasks = tClient.findTasksByStatusByProcessInstanceId(pid, null , 0, 10); long tid = tasks.get(0).getId(); tClient.startTask(CONTAINER, tasks.get(0).getId(), "anton2" ); Map< String , Object > output = new HashMap< String , Object >(); output.put( "t_var" , "sampleTest" ); tClient.saveTaskContent(CONTAINER, tid, output); ; // now the variable t_var is correctly saved output.clear(); tClient.completeTask(CONTAINER, tid, "anton2" , output); // when task is completed with empty params, the t_var variable will NOT be mapped to the process variable, instead it will be cleared

      Description

      If you save some task output data, for example via 'saveTaskContent' method, these data will be lost if you then complete task with empty/null params.

      In previous BPM Suite versions (i.e. 6.3) these data has not been lost but preserved.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swiderski.maciej Maciej Swiderski
                  Reporter:
                  anton.giertli Anton Giertli
                  Tester:
                  Marian Macik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: