[jboss-user] [jBPM] - TaskClient (Parameter mapping - Result mapping)

Leandro René Giménez do-not-reply at jboss.com
Mon Apr 4 17:06:34 EDT 2011

Leandro René Giménez [http://community.jboss.org/people/lgimenez] created the discussion

"TaskClient (Parameter mapping - Result mapping)"

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

Hi! I'm new in jBPM5 and i have a problem with human tasks...
I need to know how to map between process variables and task parameters...

I get parameter mapping data with the next code: 

+BlockingGetContentResponseHandler getContentResponseHandler = new BlockingGetContentResponseHandler();+
+taskClient.getContent(contentId, getContentResponseHandler);+
+ByteArrayInputStream bis = new ByteArrayInputStream(getContentResponseHandler.getContent().getContent());+
+Object data = null;+
+try {+
+                              ObjectInputStream in = new ObjectInputStream(bis);+
+                              data = in.readObject();+
+                              System.out.println("====> User Task Data " + data);+
+                              in.close();+
+                    } catch (IOException e) {+
+                              System.out.println("Error: " + e.getMessage());+
+                              e.printStackTrace();+
+                              return;+
+                    } catch (ClassNotFoundException e) {+
+                              System.out.println("Error: " + e.getMessage());+
+                              e.printStackTrace();+
+                              return;+
+                    }+ 

In this code, data is always String type... Is it possible to transfer complex data types? How can I do it?
How to get parameter values from parameter mapping and set result mapping?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110404/68a04697/attachment.html 

More information about the jboss-user mailing list