1 Reply Latest reply on Oct 18, 2013 2:38 AM by Maciej Swiderski

    JBPM5 Service Task Process Variable

    Raghavendra M Newbie



      How to set Process variable from main program and/or from ServiceTask Handler process where processInstance is started?


      ksession.startProcess("SampleProcess",processVariables); where processVariables = Map<K,V>


      My bpm flow has 2 custom Service Tasks with respective handlers. I need to use above processVariables in one of the services like below


      public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {

      //how to access process variables(processVariables) that are set in main program?


      Object obj = workItem.getParameter("XYZ");//to retrieve the value which is set in the main program


      // can I change the value of processVariable here, so that I can use that value in next step?



      The obj value is null in this case. Please let me know if I am following the right way or else let me know the correct way