[jboss-user] [jBPM] - Task Service Issue

Bhaskaran Venkataraman do-not-reply at jboss.com
Fri Jun 1 07:18:22 EDT 2012


Bhaskaran Venkataraman [https://community.jboss.org/people/bhaskarven] created the discussion

"Task Service Issue"

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

--------------------------------------------------------------
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",

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

client.connect("127.0.0.1", 9123);


// 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 =

    new BlockingTaskSummaryResponseHandler();

client.getTasksAssignedAsPotentialOwner("bobba", "en-UK", taskSummaryResponseHandler);

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


// starting a task

BlockingTaskOperationResponseHandler responseHandler =

    new BlockingTaskOperationResponseHandler();

client.start( taskId, "bobba", responseHandler );

responseHandler.waitTillDone(1000); 


// completing a task

responseHandler = new BlockingTaskOperationResponseHandler();

client.complete( taskId, "bobba".getId(), null, responseHandler );

responseHandler.waitTillDone(1000);

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.
--------------------------------------------------------------

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

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/20120601/9a3a45aa/attachment.html 


More information about the jboss-user mailing list