Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-97

Completing task with empty map overrides the current output variables

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.GA
    • 6.x.x
    • jBPM Core
    • ER2
    • 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
    • 2017 Week 32-33

    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.

      Attachments

        Issue Links

          Activity

            People

              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:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: