0 Replies Latest reply on Dec 27, 2012 5:25 AM by xin sun

    Jbpm5.4 how to get task list from task server

    xin sun Newbie

      HI guys, I am new to jbpm. I am using jbpm 5.4 following the jbpm-installer and I am thinking how to integrate the process system into my web application. One step is I wrote below code to query the task list for a user with userId.

      The taskservice I used is the default one installed and deployed by the installer: jbpm-human-task-war.war, and I did no change any configuration file after the installation. I can query the task list from the eclipse Human task view successfully.  But when I ran below code to query the task list for krisv(I am sure that I can get krisv's task from the Huamn task view), it always failed due to timeout, or just return 0:


      import java.util.List;


      import org.jbpm.task.AsyncTaskService;

      import org.jbpm.task.service.hornetq.AsyncHornetQTaskClient;

      import org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler;


      public class TestTaskClient {


          public static void main(String[] args) {

              AsyncTaskService  client = new AsyncHornetQTaskClient();

              client.connect("", 5153);


              BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();

              client.getTasksAssignedAsPotentialOwner("krisv", "en-UK", taskSummaryHandler);

             // I also tried client.getTasksAssignedAsPotentialOwner("krisv", null, taskSummaryHandler); but still failed;

              List tasks = taskSummaryHandler.getResults();





      Anyone tell me why? Thanks in advance.