[jboss-user] [jBPM] - Re: In memory TaskClient without Mina or JMS
Kris Verlaenen
do-not-reply at jboss.com
Mon Feb 21 21:55:12 EST 2011
Kris Verlaenen [http://community.jboss.org/people/KrisVerlaenen] created the discussion
"Re: In memory TaskClient without Mina or JMS"
To view the discussion, visit: http://community.jboss.org/message/588872#588872
--------------------------------------------------------------
I see where you're going with this. I assume you want to avoid using a loose coupling between the process engine and the human task service, but rather embed the service so you can call it directly? I don't see any problem with this basically, what about just registering your own LocalWSHumanTaskHandler that doesn't use a local client but simply starts a server instance locally and instead of calling methods on the client calling the corresponding message on the server directly.
You could create a task session in your handler and cache this:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.task");
TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
TaskServiceSession taskSession = taskService.createSession();
And then modify WSHumanTaskHandler to call the taskSession instead of the taskClient whenever appropriate.
I can see how this would be useful for other people as well, so if this actually works, let me know and I'll add it to the codebase ;) Or if my explanation doesn't make sense, let me know and I'll try to help.
Kris
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/588872#588872]
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/20110221/f9ff50cf/attachment-0001.html
More information about the jboss-user
mailing list