I do see how the cleanest way to do is is to replace the jbpm jboss service with one that
publishes processEngine that is embedded in my spring context. This does tie me to JBoss
which is not so bad.
I also see a hack, which really doesn't seem so bad either. It basically involves
short-circuiting your workflow engine neutral abstractions. It might even be worth it to
incorporate these changes into the main code. Let me know what you think:
I will simply create a jar file of everything in this module
gwt-console/server/server-core to avoid mucking with the code. I'll make a subclass
for all the rest facades that simply add a setter for the ProcessEnginePlugin. This way I
can inject that directly from the spring context. It would be nice to add that to the
actual classes.
Then the only other thing that needs to be addressed are the classes in
integration/console/src/main/java/org/jbpm/integration/console: TaskManagementImpl,
ProcessEnginePluginImpl.java, etc.. The all extend from JBPMIntegration which gets the
process engine from jndi: ProcessEngine)ctx.lookup("java:/ProcessEngine");
All I need to do then is to subclass each of these and replace the constructor with one
that gets the process engine from the spring context. The nice thing is that these
classes are all packaged as part of jbpm-console-integration.jar.
Both the Facades and the JBPMIntegration integration classes will live on the spring
framework. I'm not sute about the plugin stuff, but this will get me a free rpc layer
for my app. I'll burn that bridge when I come to it.
Now as far as I can tell, to simplify this integration all thats' needed is:
All of the facades in server-core org.jboss.bpm.console.server need a public setter for
ProcessEnginePlugin.
A maven task goal needs to be added to the pom file that will create a jar file for
server-core.
Add a constructor to all the classes descending from JBPMIntegration that accepts a
process engine.
You know the code well, if you have time let me know if I've missed anything.
If you think it is a reasonable idea, I'd be happy to help make the changes.
Thanks and regards,
Robert
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247122#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...