[jboss-user] [jBPM] - Getting task summaries

Gareth Edwards do-not-reply at jboss.com
Thu Dec 20 10:20:51 EST 2012


Gareth Edwards [https://community.jboss.org/people/garethed] created the discussion

"Getting task summaries"

To view the discussion, visit: https://community.jboss.org/message/784314#784314

--------------------------------------------------------------
Hello,

I'm writing a Rest API to manage user tasks.
The code below is some test code to return a list of task summaries based on a user.
This works the first time and the correct tasks are returned.
If I then claim a task for exapmple, It will still show up in the list if the code below is called.
If I restart JBoss inbetween then the list is correct.

jBoss is running on a server on the LAN and Tomcat is running the REST API locally.

It's like the data returned is being cached.

Any help would be appriciated.

Thanks.

public TaskSummaryJson getPotentialTasks(String user, String locale){

                    TaskClient client = new TaskClient(new HornetQTaskClientConnector("client 1", new HornetQTaskClientHandler(SystemEventListenerFactory.getSystemEventListener()))); 
        client.connect("10.0.0.101", 5153);


        BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = new BlockingTaskSummaryResponseHandler();

        client.getTasksAssignedAsPotentialOwner(user, locale, taskSummaryResponseHandler);


        List<TaskSummary> tasks = taskSummaryResponseHandler.getResults();

        TaskSummaryJson summary  = new TaskSummaryJson();
        summary.setListObjects(tasks);
        summary.setSuccess(true);
        summary.setMessage("ok");


try {
                              client.disconnect();
                    } catch (Exception e) {
  // TODO Auto-generated catch block
                              e.printStackTrace();
                    } 
return summary;
          }
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/784314#784314]

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/20121220/233e738c/attachment.html 


More information about the jboss-user mailing list