[jboss-user] [jBPM] - Re: Process output : Is there a way to get output from a process
nt2005
do-not-reply at jboss.com
Sat Mar 31 05:52:55 EDT 2012
nt2005 [https://community.jboss.org/people/nt2005] created the discussion
"Re: Process output : Is there a way to get output from a process"
To view the discussion, visit: https://community.jboss.org/message/727565#727565
--------------------------------------------------------------
Hello Lakshmi,
I do somthing like that and for me it works good:
Start the process with a own handler:
+GuiProcessHandler handler = new GuiProcessHandler();+
+Map<String, Object> params = new HashMap<String, Object>();+
+params.put("handler", handler);+
+// start a new process instance+
+ksession.startProcess(processName, params);+
+...handler.getOutputs();+
A workitem for imageoutput:
+public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { +
+ BufferedImage image ...+
+ GuiProcessHandler handler = (GuiProcessHandler) workItem.getParameter("handler");+
+ handler.addImage(image);+
+}+
Please note BufferedImage is not serializable, so you must convert it to a byte array.
Good luck!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/727565#727565]
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/20120331/1c047912/attachment.html
More information about the jboss-user
mailing list