José Luis Granda [
http://community.jboss.org/people/jlgranda81] created the discussion
"Re: How get completed/release time for a task?"
To view the discussion, visit:
http://community.jboss.org/message/611985#611985
--------------------------------------------------------------
Thanks Nick for the idea, I will try it.
About retrieve content data, you can use JBPM BlockingGetContentResponseHandler pass
contentId, that is useful for retrieve any content in the task. Then you can cast the
byte array to object and cast to map for explore variables by one by.
protected Content getTaskContent(Long contentId) {
BlockingGetContentResponseHandler responseHandler = new
BlockingGetContentResponseHandler();
client.getContent(contentId, responseHandler);
return responseHandler.getContent();
}
protected Object getTaskContentAsObject(Long contentId) {
Object objectReturn = null;
byte[] buf = getTaskContent(contentId).getContent();
// Do something with the data read here
ByteArrayInputStream bais = new ByteArrayInputStream(buf);
try {
ObjectInputStream is = new ObjectInputStream(bais);
boolean okRead = false;
// Map map = new LinkedHashMap<String, Object>();
while (!okRead && (objectReturn = is.readObject()) != null) {
okRead = true;
System.out.println("getTaskContentAsObject object: "
+ objectReturn);
}
} catch (Exception e) {
System.err
.print("There was an error reading content task input...");
e.printStackTrace();
}
return objectReturn;
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/611985#611985]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]