I am trying to understand the Human Task Service through an example. I found useful information regarding
the communication between the Task Client and the Task Service in the User Guide.
TaskClient client = new TaskClient(new MinaTaskClientConnector("client 1",
// adding a task
BlockingAddTaskResponseHandler addTaskResponseHandler = new BlockingAddTaskResponseHandler();
Task task = ...;
client.addTask( task, null, addTaskResponseHandler );
long taskId = addTaskResponseHandler.getTaskId();
// getting tasks for user "bobba"
BlockingTaskSummaryResponseHandler taskSummaryResponseHandler =
client.getTasksAssignedAsPotentialOwner("bobba", "en-UK", taskSummaryResponseHandler);
List<TaskSummary> tasks = taskSummaryResponseHandler.getResults();
// starting a task
BlockingTaskOperationResponseHandler responseHandler =
client.start( taskId, "bobba", responseHandler );
// completing a task
responseHandler = new BlockingTaskOperationResponseHandler();
client.complete( taskId, "bobba".getId(), null, responseHandler );
But in the evaluation sample code there is only a specific type of HumanTaskHandler (HornetQ) registered listening on
a particular port and then the process is started. I mean we have not instantiated any Task Client and we are not doing
any manual processing of the human tasks. It is not clear what happens behind the scenes.
If we have to use the task client and handle all the actions mentioned above how do we communicate with the
JBPM Engine. After the process is started by the engine and when a human task is encountered how does it come to
execute our code.
If there is an example to illustrate the sequence it will help.
Thanks for your help.