1 Reply Latest reply on Apr 14, 2014 7:22 AM by mdegan

    Start jbpm process instance with a map of data

    sigirisetti

      Folks,

       

      I'm new to jBPM. I want to start a jBPM process (STP) without any user tasks by passing a Map of data to process instance.

       

      All process tasks are re-runnable so I don't want to enable persistence as well.

       

      Is this kind of process possible in with jBPM?

       

      Please point me to any blog or url with such setup or examples

       

      Much appreciate you help

       

      Cheers

        • 1. Re: Start jbpm process instance with a map of data
          mdegan

          Hi Surya,

           

          The startProcess method takes parameter of the process Id and a map of parameter values. Here is a sample:

            public ProcessInstance startProcess(String processId, Map<String, Object> parameters){
                              ProcessInstance p = kSession.startProcess(processId,parameters);
                              return p;
                    }
          

          To use the data in your process, you need to map the global variables of your process to the keys passed in the map. That will make the data available to your process.

          A good read is: http://docs.jboss.org/jbpm/v5.4/userguide/ch.human-tasks.html

           

          Regards,

          Manny