10 Replies Latest reply on Jan 29, 2007 10:22 AM by Edward Staub

    jbpm engine as a jar

    sam bam Newbie

      Dear all,

      I am very young child to JBPM
      I want to run JBPM into our application for that iam planing to jar the complete engine and run the engine(jar) through a class so for running jbpm engine (only the engine ) is it possible like that .. if it .. what are all the things i need to make as a jar ...
      please any one can help me in this issue ... i will be very much thank ful to u all ... and i had gone through the document of jbpm but iam not clear that if i download the core engine and jar it how to start it ....

      please do the need full help...


        • 1. Re:  jbpm engine as a jar
          David Owens Newbie

          Hi Chutki,

          I am not 100% sure how to do it either, but from what I understand, all you need to do is include the jbpm jar in your project. The easiest way to get this jar is to download the starter kit, then look in jbpm-server\jbpm\deploy\jbpm.sar. The jar is called jbpm-.jar.

          Like I said, I'm not sure that is all you need, but it should get you going.

          Best of luck.


          • 2. Re:  jbpm engine as a jar
            David Owens Newbie


            "ngtdave" wrote:
            The jar is called jbpm-<version>.jar.

            Ooops, make that

            • 3. Re:  jbpm engine as a jar
              sam bam Newbie

              Thanks Dave ,

              i had done that but iam not getting how to start that engine , i mean jbpm running , doesn't we have any other way other than running jbpm-server/start.bat,


              • 4. Re:  jbpm engine as a jar
                Cutberto Ocampo Newbie

                I'm not sure on what do you mean by "how to start the engine", but you need to create the DB first (look for instructions for your particular DB vendor in the jBPM manual, chapters 5-8); obviously, you don't need to read the whole chapters, but the parts you're interested in. Also, you can look in the forum, as this "how to deploy jBPM in another app server" kind of question has been asked (and answered) several times before.

                I'm using jBPM, and to use it I only need to deploy the jbpm-xxx.jar with my application (or to the lib directory of the app server), then invoke the methods to load the process definition (or recover the process instance if you have the proper id) and that's it, you'll have the engine running. You'll find useful the section 7.1 of the jBPM manual.


                • 5. Re:  jbpm engine as a jar
                  Steve Monk Newbie

                  I am relatively new (been reading like mad for the past two weeks - don't know if my brain can take any more), and am also a little confused by this post.
                  Let me start by explaining where I am at:
                  I have successfully downloaded and installed the starter kit.
                  I have successfully made the jBPM app talk to MSSQL - the GPD and webapp and jBPM server all now deploy, instanciate and signal processes on/from this DB using the relevant persistance.

                  The application that we are trying to integrate the jBPM product into has its own proprietary application server (java based) and I am now trying to instanciate and signal processes from my own applications server - i.e. I need my app server to act as the "client" to the jBPM server and processes running within that server....

                  I have moved all the relevant jars based upon the user guide and have amended our servers startup routine to amend the classpath to incorporate all the needed jBPM jars etc (as well as the config xml etc).
                  I can now create classes in our application (used by our app server) that utilize the classes and methods defined in the jBPM package. and I can successfully compile those classes etc.
                  The problem comes when I try to run the programs - how does my application server "communicate" with the running jBPM server (which is launched using the start.bat file in the /server folder in the start kit)? To retrieve the relevant process, instanciate a process and signal a "running" process?
                  i have read just about everything I can on the wiki, forum, user guides, documentation etc - but cannot seem to get this clear in my head. Are there any pointers to information about how to do this - or am I going about this the wrong way?
                  The reason I ask that is that the last post seems to say that I do not have to "run" the jBPM server independently if I have included the relevant jar file(s) etc in my app server. Am I reading that correctly? If so I am not sure I completely understand how the jBPM "engine" (i.e. the server?) manages each "running" process etc if the engine itself is not "running" and waiting for instanciation and signal requests.

                  As I say I have read the user guide and virtually everything else out there to try and understand this - but most of the information I read goes a little beyond my technical knowledge - so if it is definedin the user guide - then I am not understanding it - any enlightenment would be greatly appreciated (or a pointer to something that could explain this)?
                  Many thanks,

                  • 6. Re:  jbpm engine as a jar
                    Ronald van Kuijk Master

                    you do not need to deploy jbpm at all to a separate engine just use the jar as you normally would. Look at all the testcases of jBPM. The do not run in a server at all.

                    If you do want to call it remotely, wait for 3.2. That has an ejb and jms wrapper.

                    • 7. Re:  jbpm engine as a jar
                      Steve Monk Newbie

                      Ok - cool. That gives me more information. you mentionj to examine all the testcases - could you point me in the direction of where those are reviewable. I have gone thru the manual and have looked at the examples defined in chapter 3 - are these the ones? Or are there others?
                      If you could point me in the right direciton that would be great.
                      Kind Regards.

                      • 8. Re:  jbpm engine as a jar
                        Steve Monk Newbie

                        PS. I have already checked the Wiki (jBPM example applications - but there seems to be just the web app example), and I also looke dthru the contributions page - but could not determine anything there also.

                        • 9. Re:  jbpm engine as a jar
                          Ronald van Kuijk Master

                          testcase normally are for testing the code, so they are in the sourcecode which is in CVS.

                          The testcases are unittests which are just like standalone applications. Just using jbpm as a library.

                          • 10. Re:  jbpm engine as a jar
                            Edward Staub Expert

                            Mr. Smith (monkmanusa),

                            I suspect you're assuming a lot of architecture that simply isn't there. Mind you, I think this is a GOOD thing - it allows deployment in darn near any scenario you can imagine.

                            Like much of JBoss and more recently, JEE5, the engine is just POJOs.

                            I suggest that you get the tutorial examples running, without trying to migrate to your environment at all, just as they are "out of the box". See http://docs.jboss.org/jbpm/v3/userguide/tutorial.html. After that I think you'll have a clearer idea of the core architecture (or lack thereof). It's pretty quick - should only take you a couple of hours or so.

                            -Ed Staub