[jboss-user] [jBPM] - Completing a human task with results
Gareth Edwards
do-not-reply at jboss.com
Wed Jan 23 04:28:13 EST 2013
Gareth Edwards [https://community.jboss.org/people/garethed] created the discussion
"Completing a human task with results"
To view the discussion, visit: https://community.jboss.org/message/793717#793717
--------------------------------------------------------------
Hi,
I can complete a human task using the TaskClient like so:
ContentData contentData = ContentMarshallerHelper.marshal(content, null);
BlockingTaskOperationResponseHandler taskResponseHandler = new BlockingTaskOperationResponseHandler();
client.complete(taskId, userId, contentData, taskResponseHandler);
taskResponseHandler.waitTillDone(2000);
But how can I complete a task a get a result?
The TaskClient API has two complete methods:
*http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClient.html#complete(long, java.lang.String, org.jbpm.task.service.ContentData, org.jbpm.task.service.TaskClientHandler.TaskOperationResponseHandler) complete*(long taskId, http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true String userId, http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/ContentData.html ContentData outputData, http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClientHandler.TaskOperationResponseHandler.html TaskClientHandler.TaskOperationResponseHandler responseHandler)
and
*http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClient.html#completeWithResults(long, java.lang.String, java.lang.Object, org.jbpm.task.service.TaskClientHandler.TaskOperationResponseHandler) completeWithResults*(long taskId, http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true String userId, http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true Object results, http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClientHandler.TaskOperationResponseHandler.html TaskClientHandler.TaskOperationResponseHandler responseHandler)
I am using the first method as I need to pass in data on completion.
The second method appears to return results on completion but doesn't allow for passing in of content data.
How can I complete a human task with content data and get back a result?
Thanks in advance,
Gareth.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793717#793717]
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/20130123/7e5ba8c2/attachment-0001.html
More information about the jboss-user
mailing list