[jboss-user] [jBPM] - JBPM5 Content data problem

S Root do-not-reply at jboss.com
Thu Sep 8 15:00:07 EDT 2011


S Root [http://community.jboss.org/people/sroot] created the discussion

"JBPM5 Content data problem"

To view the discussion, visit: http://community.jboss.org/message/625599#625599

--------------------------------------------------------------
Hi all!
I was wondering if someone might be able to assist with this.
I have a process with a custom task and User Task,
I have Map and couple of Strings def
ined as process variables.
When the process goes to human task, and I retrieve
the Content for the Task via the TaskClient using Mina, I am unable to restore the Map. I found the following in the HumanTaskExample and it is exactly what I was doing

Content content = getContentResponseHandler.getContent();
ByteArrayInputStream bis = new ByteArrayInputStream(content.getContent());
ObjectInputStream in;
in = newObjectInputStream(bis);
Object result = in.readObject();
in.close();
Map<?, ?> map = (Map<?, ?>) result;


The problem is that "result" at this point is seen as a java.lang.String. All of my data is there when I print it out but I am unable to cast it back to a map. My process variable Map is being set when I complete the previous workitem

Am I missing something here? Looking at the JBPM source and examples it seems like this should work.


I'd appreciate all input, thanks.

-Scott.
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[http://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/20110908/5408f93d/attachment.html 


More information about the jboss-user mailing list