Alex Wulms [
https://community.jboss.org/people/awulms_work] created the discussion
"How to list human tasks with HQ API?"
To view the discussion, visit:
https://community.jboss.org/message/751019#751019
--------------------------------------------------------------
Hi,
I have created a human task using the "human task view" plugin in eclipse. The
task is made for the user "krisv". It shows-up both in the "human task
view" in eclipse and in the jbpm console when I login with krisv user (based on the
demo/evaluation set-up of jBPM 5.3). The task is in status reserved.
I have now made a small java program that connects to the human task service on localhost
on port 5445. The program is supposed to get all reserved tasks for krisv user but it
returns 0 results.
Here is the code that I use:
public static void main(String args[])
{
String user="krisv";
String language="en-UK";
List<Status> status = Arrays.asList(new Status[] { Status.Reserved });
System.out.println("*** Connecting to human task client with HornetQ
protocol");
SyncTaskServiceWrapper tk = new SyncTaskServiceWrapper(new AsyncHornetQTaskClient());
tk.connect("127.0.0.1", 5445);
System.out.println("*** Getting " + status + " tasks for " + user +
" with language " + language);
List<TaskSummary> tasks = tk.getTasksAssignedAsPotentialOwnerByStatus(user,
status, language);
tasks.addAll(tk.getTasksOwned(user, status, language));
System.out.println("*** Got " + tasks.size() + " tasks");
}
It shows at the end "got 0 tasks"
Any idea what I'm doing wrong?
Any help is appreciated.
Thanks and kind regards,
Alex
PS: Can you kindly add jBPM 5.3 to the list of "Categories" in this forum?
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/751019#751019]
Start a new discussion in jBPM at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]