3 Replies Latest reply on May 16, 2013 11:15 AM by Shobhit Tyagi

    Why complete the human task with contentdata, however the process variable is null

    Krisv W Newbie


      I'm using the local task service with jBPM5.3 version. Question is when I complete the task with contentdata using the following code, the process variable is null. However, It's Ok when use the mina task service.

      I'm confused about the mapping relationship between the process variables and contentdata.

      Could anyone help me, please?

      Any help is appreciated. Thank you!

      Best Regards


         TaskService client = LocalHumanTaskService.getTaskService(ksession);
          Map<String,Object> data = new HashMap<String,Object>();
          data.put("priority", request.getParameter("priority"));
          data.put("modelNumber", request.getParameter("modelNumber"));
          data.put("quantity", request.getParameter("quantity"));
          ContentData contentData = null;
          if (data != null) {
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
             ObjectOutputStream out;
             try {
                 out = new ObjectOutputStream(bos);
                 contentData = new ContentData();
              } catch (IOException e) {
           client.complete(taskId, userId, contentData);