jBPM4 comes with a new database layout and new API and is not compatible with jBPM3, you can run them parallel on the same database if you need to, the component.xml-tags/annotations/interceptors in Seam 2 are for jBPM3 only
Thanks for the reply. so i need to manually deploy the the jbpm4 jars. I am not sure how can we load the jbpm.cfg.xml.Do i need to load from my code manually by loading the ProcessEngine? so we cannot use any of the annotations which are provided by seam ?
If there any component provided by jbpm4 to make entry compoenent.xml?
Can you please provide me with the steps to configure jbpm4 in my seam application?
- yes I had to manually deploy the jBPM4 jars in my project
- the jbpm.cfg.xml file is picked up by the process engine, mine is in the root of the classpath
- the annotation in Seam2 ( @BeginTask, @CreateProcess, ... ) are for jBPM3, seems noone had the time to write new ones for jBPM4 yet, but thats not a big deal in my opinion since jBPM4 comes with a simple API and its easy to do these things
bpmnamespace for components.xml (like bpm:process-definitions) in seam2 is for jBPM3, not a big deal either since you can configure any java class as Seam component in components.xml or with annotations
I have a hybrid Seam-Spring setup for my project, there is a great article from Dan Allen how to do this, you should also check out the free bonus chapters of his book Seam in Action (actually the whole book is great and helped me a lot about understanding Seam). One thing I didn't get to work was using JTA with jBPM4, I am still not sure if this is possible at the moment, so I use HibernateSession only and no EntityManager at all. The jBPM4 setup in Spring is pretty simple:
<bean id="processEngine" name="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" class="org.jbpm.pvm.internal.processengine.ProcessEngineImpl" scope="seam.APPLICATION" />
<bean id="springHelper" name="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper"> <property name="jbpmCfg" value="jbpm4.cfg.xml" /> </bean>
it should be easy to do the same in components.xml without having to use Spring, the process engine is injected in my Seam components with