5 Replies Latest reply on Jan 7, 2015 2:48 AM by Vijai Kumar

    How to get Input Parameter Mapping variable via TaskService in jBPM 6

    Kylin Soong Novice

      In jBPM 5 if we have defined Input Parameter Mapping in Process desgin, we can get the mapped parameter like below code:

      protected Map<String, Object> getContentData(LocalTaskService localTaskService, TaskSummary taskSummary) {
              Task task = localTaskService.getTask(taskSummary.getId());
              Content content = localTaskService.getContent(task.getTaskData().getDocumentContentId());
              ByteArrayInputStream bis = new ByteArrayInputStream(content.getContent());
              ObjectInputStream in;
              Map<String, Object> result = null;
              try {
                  in = new ObjectInputStream(bis);
                  Object obj = (Object) in.readObject();
                  System.out.println("reading... " + obj);
                  result = (Map<String, Object>) obj;
              } catch (IOException e) {
                  e.printStackTrace();
              } catch (ClassNotFoundException e) {
                  e.printStackTrace();
              }
              return result;
              }
      

       

      but in jBPM 6 I can not get mapped parameter like this way. Can anyone give me some advice?