1 2 3 Previous Next 30 Replies Latest reply on Jun 25, 2007 5:06 AM by fady.matar

    jBPM integration question

      I'm trying to create an application that uses jBPM in Seam. I want the JBPM database to be deployed automatically.
      Looking at the dvd-store example and reading the jBPM and Seam documentation it is stated that all that is need to be created is the jbpm.cfg.xml and the hibernate.cfg.xml

      I created those two files and embedded them in my ear but I don't see JBPM being created neither in the log files nor in the database.

      What am I missing?

        • 1. Re: jBPM integration question

          Do you have the necessary lines in components.xml?

          • 2. Re: jBPM integration question

            Yes gavin the configuration is there in components.xml

            now the thing is that i don't have any processes deployed the configuration looks as follows:


            This is left intentionally blank, the purpose is to initialize jbpm only. I'm creating a workflow shell where multiple workflow instances are deployed. An effort with Tom Bayaens. Can you please assist in this?

            • 3. Re: jBPM integration question

              Wellthen, of course no process definitions will be created!

              What did you expect?

              You'll have to find some other means to deploy the processes, if you don't want to list them in components.xml.

              • 4. Re: jBPM integration question

                I have other alternatives but would I still benefit from using the full features related to JBPM?
                One quick approach is to deploy a dummy process. But wouldn't it be appropriate to deploy the jBPM just when it's configuration is present?

                • 5. Re: jBPM integration question

                  Hold on, what is it that you want to be created? The schema, or the data in the schema?

                  If all you want to do is create the schema, you only have to enable schema export in hibernate.cfg.xml. Just like in the examples.

                  • 6. Re: jBPM integration question

                    exactly i just want to enable the schema export, nothing else is required and this is already specified in the hibernate.cfg.xml

                     property name="hbm2ddl.auto">create</property>

                    • 7. Re: jBPM integration question

                      Gavin, the hibernate.xml is not being parsed from within the jar. I modified it to be non deployable and still no exceptions has been thrown at deployment time.
                      I verified the file exists in the archive

                      • 8. Re: jBPM integration question

                        Any update on this? the schema fails to be created.

                        • 9. Re: jBPM integration question

                          I'm confused about what you want. I think you might just want to start up JBPM when Seam starts, and then deploy your process definitions some other way? If so, look at the way org.jboss.seam.core.Jbpm.startup works, and extend the class, and overriding the startup method so it starts up without any process definitions being present.

                          • 10. Re: jBPM integration question

                            I got your point, will give it a try. Thanks for the suggestion

                            • 11. Re: jBPM integration question

                              Thanks for the suggestion. I'll give it a try

                              • 12. Re: jBPM integration question

                                Ok I got the concept but now how to make this class initialize itself on startup? Would I need to invoke it from a servlet?

                                • 13. Re: jBPM integration question

                                  Let's see the class you want to start up

                                  • 14. Re: jBPM integration question

                                    I guess I need to override the startup method. This is what I have done so far

                                    import static org.jboss.seam.InterceptionType.NEVER;
                                    import static org.jboss.seam.annotations.Install.BUILT_IN;
                                    import org.jboss.seam.ScopeType;
                                    import org.jboss.seam.annotations.Create;
                                    import org.jboss.seam.annotations.Install;
                                    import org.jboss.seam.annotations.Intercept;
                                    import org.jboss.seam.annotations.Logger;
                                    import org.jboss.seam.annotations.Name;
                                    import org.jboss.seam.annotations.Scope;
                                    import org.jboss.seam.annotations.Startup;
                                    import org.jboss.seam.jbpm.SeamVariableResolver;
                                    import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator;
                                    import org.jboss.seam.core.Jbpm;
                                    import org.jboss.seam.log.Log;
                                    @Startup(depends = { "org.jboss.seam.core.microcontainer",
                                     "org.jboss.seam.core.ejb" })
                                    @Install(value = false, precedence = BUILT_IN)
                                    public class JbpmInitializer extends Jbpm {
                                     Log log;
                                     public void startup() throws Exception {
                                     log.trace("Starting jBPM");
                                     JbpmExpressionEvaluator.setVariableResolver(new SeamVariableResolver());
                                     public void invokeJbpmContext() {
                                     //Invokation goes here

                                    1 2 3 Previous Next