3 Replies Latest reply on Jan 30, 2010 3:02 PM by Michael Wohlfart

    Seam 2.1 and Jbpm 4 Configuration issue

    pushpak1981 Novice


      I have downloaded Jbpm4 and trying to configure it with My Seam application ear.
      with Jbpm3 there was an entry into components.xml, I am not sure its the same with Jbpm4.

      Any help will be highly appreciated.


        • 1. Re: Seam 2.1 and Jbpm 4 Configuration issue
          Michael Wohlfart Expert

          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

          • 2. Re: Seam 2.1 and Jbpm 4 Configuration issue
            pushpak1981 Novice

            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?

            • 3. Re: Seam 2.1 and Jbpm 4 Configuration issue
              Michael Wohlfart Expert

              Hi Tony,

              • 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

              • the bpm namespace 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"
                      scope="seam.APPLICATION" />

                <bean id="springHelper"
                   <property name="jbpmCfg" value="jbpm4.cfg.xml" />

              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