6 Replies Latest reply on Sep 23, 2011 11:01 AM by Rajan Bansal

    From where taskClient.getTasksAssignedAsPotentialOwner(user, "en-UK", taskSummaryHandler); picks up the tasks

    Rajan Bansal Newbie

      I am running the HumanTaskService in JBoss and its persistence is done in my Oracle db.

      but when I run process with "UserTasks" in it, and it successfully runs through end.


      My ques is when I call the "taskClient.getTasksAssignedAsPotentialOwner(user, "en-UK", taskSummaryHandler);"

      then from where it picks up the data,

      1. from session?

      2. or from db?


      If it picks it from session, then please tell me how i persisted the session of the whole "ProcessInstance" in my db and picks the pending task from there.


      Below is the code used to pick and complete the "UserTask".


                TaskClient taskClient = new TaskClient(new MinaTaskClientConnector("MinaConnector",

                 new MinaTaskClientHandler(SystemEventListenerFactory.getSystemEventListener())));

                 taskClient.connect("", 9123);


                BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();

                taskClient.getTasksAssignedAsPotentialOwner(user, "en-UK", taskSummaryHandler);


                TaskSummary task1 = taskSummaryHandler.getResults().get(0);

                BlockingTaskOperationResponseHandler taskOperationHandler = new BlockingTaskOperationResponseHandler();

                taskClient.start(task1.getId(), user, taskOperationHandler);

                taskClient.complete(task1.getId(), user, null,  taskOperationHandler);




      Rajan Bansal