2 Replies Latest reply on Aug 10, 2011 12:10 PM by swiderski.maciej

    How to get the inserted TASK id

    kirubagaran

      Hi,

       

      Im starting the process using ksession.startProcess it is starting fine no issues at the time of starting it is inserting one task in task table(i have one human task in my process) How to get the inserted task id

       

      ksession.startProcess("com.sample.bpmn.multilooptest",params);

       

       

      After this line how can i get the response taskid

       

      directly if i use  addTask method im getting the response but the process is not starting

      public static addTask(){

       

      }

       

       

      Regards,

       

      Kiru

       

       

        • 1. Re: How to get the inserted TASK id
          jlgranda81

          Hi Kiruba

           

          When you start process, this execute the first node into process sequence. For retrieve task you need query for Assigned Tasks or Reserved Task or Ready Task

          • 2. Re: How to get the inserted TASK id
            swiderski.maciej

            In general, addTask method of class TaskClient accepts implementation of AddTaskResponseHandler which will get task id.

            But ... after quick look at WSHumanTaskHandler implementation it does not use response handler at all. So you could modify it if you like to do code changes in jBPM or use one of the query methods provided by TaskClient to get tasks available based on certain search criteria, as already mentioned by Jose.