12 Replies Latest reply on Jan 18, 2013 6:03 AM by yjboss

    jbpm5 deployment

    yjboss

      Hi,

      I have a web project thats deployed on jboss AS7. i want to call from this web project a process with jbpm5 . this process is in onather project in the same

      workspace.

      My question is how to deploy the second project on AS7 in ordrer to work witch the web project?

      must i use a jar ? what about the .pkg generated by guvnor , it can be deployed on AS7?

       

      Thank for yours helps.

      you

        • 1. Re: jbpm5 deployment
          doboss

          Hi you.

           

          Are you saying you want another web app which actually executes the process for you, or just that you want to be able to execute the process in a web app? If you deploy the Guvnor, you can grab your process package from either web app and execute it. I have posted an example of how to do that, but I'm not sure exactly what you are asking.

          • 2. Re: jbpm5 deployment
            roxy1987

            yLab,

             

            If you want to call your jBPM processes from another web application or perform any action(w/ or w/o jbpm) for that matter, you can have links in your primary application having references of the target web application urls.

            But reallly your question is not clear. 

            • 3. Re: jbpm5 deployment
              yjboss

              Hi,

              thanks for your reply;

              i developp my question: I have a J2EE Application (==> result .ear on JBOSS AS7) this application in IDE(for example jbStudio) i have 2 projects : one a web project with jsp pages and actions... and another projectis a JBPM project(that execute a process).

              in a particular use cas , i must call the process(that exists in the second project) from the first project.

              My question is how to package this 2 projects in ordre to deploy on AS7.

              the first porject is .war in .ear but i dont know how to deploy the second project. i must export it as .jar and includ it ine the first project (==> in .war) or there is another manear to do this?

               

              Thanks for your help

              • 4. Re: jbpm5 deployment
                doboss

                y lab,

                 

                There is nothing special about a web app which runs a JBPM process. You only need to include the jars you need and be able to load the process from a file/the classpath/Guvnor. If you are using persistence with JBPM, you will also need the datasource, database and drivers setup. Think of it as just another library you can use from any kind of application.

                 

                HTH

                • 5. Re: jbpm5 deployment
                  yjboss

                  doboss,

                  thank you for your help,

                  i want to clarify some detail of my case :

                  there is 2 differents project (to simplify 2 developpers work in differents, one develop bussnis project with jbpm5 anad another for a web project. the first developper dont touch on the web project) then

                  the web developer want to run a process thant deveopped by the ohter deveopper.

                  You suggest that the jbpm project was deployed to the guvnor and the web developper will load the process from a file/the classpath/Guvnor.

                  Is there is onather way to use this process without using Guvnor?

                  Another question please ,  the persistence is manadatory in jbpm5 ? because in jbpm3 if we deploy a process ==> persistence informations in database. is the same thing in jbpm5?

                   

                  Thank for your help


                  • 6. Re: jbpm5 deployment
                    roxy1987

                    y lab.

                     

                    If you dont want to use persistence and if you dont wanna use drools. Then you should go ahead with jbpm 4. But there is no community support left for jbpm 4. and If you face bugs then you wont be able to get them fixed.

                    • 7. Re: jbpm5 deployment
                      doboss

                      Is there is onather way to use this process without using Guvnor?

                      Yes, you absolutly do not need to use the Guvnor. You can just load the process from a file in a known location or from the class path. There are some examples around, if you can't find any, let me know and I will see what I can find.

                       

                       

                      Another question please ,  the persistence is manadatory in jbpm5 ? because in jbpm3 if we deploy a process ==> persistence informations in database. is the same thing in jbpm5?


                      No, JBPM5 does not require persistence. JBPM5 can run entirely in memory. However, if you are going to have asynchronos processes, you will need to have persistence because as soon as a process exits, it no longer exists in memory.

                      • 8. Re: jbpm5 deployment
                        yjboss

                        thank you very mutch for all replies;

                        i ask about perssistence because the process use Java classe and if we want to change the source code in theses classes we must re deploy the project, in jbpm3 we juste redeploy process and

                        deliver the script that contain the data without the source code. but in jbpm 5 i dont know exactely how he porcess and what he put exactly in database. is juste info about instance porcess or

                        also classe java in database like jbpm3.

                         

                        wa must use jbpm5 instead of jbmp3 because we use actually AS7.

                        my idea is not using guvnor, and to export the jbmp project as .jar and includ this jar in web project and call the process here. and if any cheges of classes of jbpm project in the future we must regenerate .jar . but i am not sur if it will work(its what i try to do)

                        what you think about this solution?

                        • 9. Re: jbpm5 deployment
                          doboss

                          JBPM5 uses "pojo model jars" and has a concept of a "package" which is the way you bundle up the processes and pojos together (I believe). You could probably build these packages outside of your system, and have your code load the package into your app from a file or other location.

                           

                          If you use persistence, you do not need to directly worry about what is in the database or how it gets there. JBPM5 will just  "do it's thing."

                          • 10. Re: jbpm5 deployment
                            yjboss

                            Hi,

                            in this case suppose that i build my project as .pkg that i place it in a folder of server or anoather place. and i want to consume this package by my web application.

                            How to do this in my web application in order to load this .pkg (from my folder and not from Guvnor) and run the process ?

                             

                            Thanks for your helps.

                            • 11. Re: jbpm5 deployment
                              doboss

                              It would be something like this:

                               

                              {code}
                              FileInputStream  fis = new FileInputStream(packageFile);
                              kbuilder.add(ResourceFactory.newInputStreamResource(fis), ResourceType.PKG);
                              {code}

                               

                              It took me a while to figure it out, but since JBPM5 kinda came out of drools, they use a lot of the same base stuff. So I figured this out initially by reading the drools forums I believe.

                              • 12. Re: jbpm5 deployment
                                yjboss

                                Thant kou very mutch doboss;

                                I tyy it a simple example wich loadinf .pkg and start the Process.