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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.4.6
    • 6.4.4
    • jBPM Core
    • CR1
    • 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

      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.

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-agiertli Anton Giertli
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: