[jboss-user] [jBPM] - Is there a way to make ksession aware service task running in web console?

Bruce Cui do-not-reply at jboss.com
Thu Jun 30 04:55:38 EDT 2011


Bruce Cui [http://community.jboss.org/people/brucecui] created the discussion

"Is there a way to make ksession aware service task running in web console?"

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

--------------------------------------------------------------
Hi,

I open this new thread to draw some attention. I'm looking for a solution to drive batch processes by jBPM5. Since I'm new to it, I have fought with various problems and finally made some progress by deeper study and help from the forum, especially from Kris.

Currenly I'm stuck at one key problem. I want to put a time consuming task in the main progress. But I found that once such a progress started from web console, it would not be able for other processes to make any movement. It seems that the console is running all processes in one main thread.

So I tried to pass the processInstance as a parameter from the process to the WorkItemHandler at runtime. And the WorkItemHandler will start a new thread of an object which contains the actual logic in its run() method. Once the thread is done, at the end of its run() method, it sends the signal back via the reference of the processInstance.

Local running was fine, but once I put it up to console war and tried to start the process from console, I got IOException due to WorkItem persistance problem.

Kris gave me another advice, that to pass the ksession to the WorkItemHandler when registering it. But a problem is, the pattern of how the console create the WorkItemHandlers are already there in the console code. I don't know how to make the console recognize and pass the kession automatically without changing any code.

Can anyone help to advise if there is an elegant way to make a service task both ksession aware, and also can work in console environment? If there is none, is it possible to change the code to make this happen, and how? Thanks in advance.
--------------------------------------------------------------

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

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/20110630/c8a1b73c/attachment.html 


More information about the jboss-user mailing list