JBoss Community

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

created by Rajan Bansal in jBPM - View the full discussion

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("127.0.0.1", 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);

 

 

Regards.

Rajan Bansal

Reply to this message by going to Community

Start a new discussion in jBPM at Community