[jboss-user] [jBPM] - Re: update date of human task, after a user claim a task.

Maciej Swiderski do-not-reply at jboss.com
Mon May 21 12:42:53 EDT 2012


Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: update date of human task, after a user claim a task."

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

--------------------------------------------------------------
You could try to make use of events that can be registered on the task server, one of them is claim event that is fired immediately after claim operation so once received you can consider this time as when user took the task. Here is a bit of code that should do just that:


EventKey key = new TaskEventKey(TaskClaimedEvent.class, taskId );       
 
 
BlockingEventResponseHandler handler = new BlockingEventResponseHandler(); 
client.registerForEvent( key, false, handler );
 
// after event has been generated
Payload payload = handler.getPayload();
TaskUserEvent event = ( TaskUserEvent ) payload.get();


This works exactly the same as completing user task where HT handlers register for TaskCompleteEvent. So you need to keep the handler alive to receive that events.

HTH
--------------------------------------------------------------

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

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/20120521/b1335c61/attachment.html 


More information about the jboss-user mailing list