JBoss Community

Re: How to get tasks based on a Process ID in jBPM5.3

created by roxy1987 in jBPM - View the full discussion

You can connect using a TaskClient and get the tasks using the method suggested above :

 

 

//Connect with the Human Task handler using the task client
//Create a list of status of the tasks you are interested in.
statusList.add(Status.Completed);
statusList.add(Status.Reserved);
statusList.add(Status.Ready);
 
 
 
client.getTasksByStatusByProcessId(processInstanceId,statusList, "en-UK", responseHandler);
List<TaskSummary> taskSummaryList = responseHandler.getResults();
for(TaskSummary taskSummary : taskSummaryList)
{
 //retrieve the details
 taskSummary.getId();
 taskSummary.getName();
 taskSummary.getCreatedOn();
 taskSummary.getActualOwner();
 taskSummary.getStatus();
}

Reply to this message by going to Community

Start a new discussion in jBPM at Community