[jboss-dev-forums] [jBPM Development] - Re: taskClient.complete EXCEPTION
gigazhang
do-not-reply at jboss.com
Tue Jun 19 21:32:00 EDT 2012
gigazhang [https://community.jboss.org/people/gigazhang] created the discussion
"Re: taskClient.complete EXCEPTION"
To view the discussion, visit: https://community.jboss.org/message/742901#742901
--------------------------------------------------------------
My code :
public void completeProgressTask(long taskId, Map<String, Object> data, String userId) throws InterruptedException {
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
responseHandler.waitTillDone(5000);
ContentData contentData = null;
if (data != null) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out;
try {
out = new ObjectOutputStream(bos);
out.writeObject(data);
out.close();
contentData = new ContentData();
contentData.setContent(bos.toByteArray());
contentData.setAccessType(AccessType.Inline);
bos.close();
bos = null;
} catch (IOException e) {
e.printStackTrace();
}
}
taskClient.complete(taskId, userId, contentData, operationHandler);
operationHandler.waitTillDone(5000);
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/742901#742901]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120619/335d9d97/attachment.html
More information about the jboss-dev-forums
mailing list