[jboss-user] [jBPM] - Jbpm5.4 how to get task list from task server
xin sun
do-not-reply at jboss.com
Thu Dec 27 05:25:27 EST 2012
xin sun [https://community.jboss.org/people/xs06974] created the discussion
"Jbpm5.4 how to get task list from task server"
To view the discussion, visit: https://community.jboss.org/message/785056#785056
--------------------------------------------------------------
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("127.0.0.1", 5153);
System.out.println("Good");
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.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/785056#785056]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121227/20d67193/attachment.html
More information about the jboss-user
mailing list