8 Replies Latest reply on Feb 17, 2011 1:20 AM by michelemauro

    jbpm 5.0 web application sample.?

    tarunsapra

      Hello,

       

      I needed a sample jsp/servlet jbpm sample web application I am not able to find it on the internet.

       

      Can somebody provide the solution.

       

      Thanks

      Tarun Sapra

        • 1. Re: jbpm 5.0 web application sample.?
          salaboy21

          Hi there.. I will be working on some tutorials during the following weeks. Probably you will be interested on those..

          Right now I have this application that is using jBPM5, Drools Expert and Drools Fusion.. If you know how to code jsp and servlets it will be easy to adapt the application to run in a servlet container. Now the application is based on swing beacause we use Slick 2d that is a graphic library.

          https://github.com/Salaboy/drools-demo-application

          and some posts explaining how it works:

          http://salaboy.wordpress.com/2011/01/01/emergency-service-drools-application/

          http://salaboy.wordpress.com/2010/12/23/javaone-2010-brazil-speaker-notes-slides/

          http://salaboy.wordpress.com/2010/12/23/drools-at-javaone-brazil-2010/

           

          PS: just as a suggestion, try to ask for specific things. A complete example about a complete application it's hard to get..

          Greetings!

          • 2. Re: jbpm 5.0 web application sample.?
            tarunsapra

            Hi Mauricio,

            Thanks for the reply, but actually the reason I asked this question is , I have traditional web application using struts, spring and hibernate, I need to invoke a JBPM process from one of the struts action bean, thus I am not able to find a proper example on the internet wherein I can invoke a Jpmb process in a web-application and the steps in the process are able to invoke certain JSP pages based on the flow of the process.

             

            Thanks

            Tarun Sapra

            • 3. Re: jbpm 5.0 web application sample.?
              odelyaholiday

              I will also appreciate a working example from jsf/struts - how to invoke the process/use an existing action etc

              • 4. Re: jbpm 5.0 web application sample.?
                salaboy21

                Hi there.. you will invoke the process in the same way.. if there is a web application, a stand alone application or another type of client application.

                If you know how to code web applications with struts you can take a look at the application that I mention and then just call the process in the same way.

                Greetings

                • 5. Re: jbpm 5.0 web application sample.?
                  tarunsapra

                  Hi Mauricio,

                  The only reason actually I asked for a complete application is because Jbpm is a little more complex to get started with as compared to traditional frameworks like spring, hibernate etc. Most new versions for projects have demo web applications so that the user is helped to get started with and also it's very important to have a simplistic beginner's guide to build a healthy community of developers around the product but my experience with JBPM hasn't been good at all as the documentation and examples are highly inadequate and thus discouraging developers to explore JBPM and integrate it into their software solutions.

                  Regards

                  Tarun Sapra

                  • 6. Re: jbpm 5.0 web application sample.?
                    odelyaholiday

                    Thanks Mauricio, which method in your emergency service calls the process? so every time that I want to call the process I have to invoke this method?

                     

                    Also - I didn't see all the code (GUI in the app. as well, I am afraid that the repository is down)

                    • 7. Re: jbpm 5.0 web application sample.?
                      salaboy21

                      Hi there.. the method that calls the process depends on the specific application. In the Emergency Service application I've create a Helper class (specific for this domain) that is in charge of interacting with the Drools session that host the business process.

                      If you take a look at the class called EmergencyService: https://github.com/Salaboy/emergency-service-drools-app/blob/master/emergency-service-app/src/main/java/com/wordpress/salaboy/EmergencyService.java you will find that is the one that signalEvents, insert new emergencies, etc. For this application I've modeled the startProcess Inside a business rule that for each emergency that it's inserted in the KnowledgeSession a new business process is started. This way of modeling the situation gives me the flexibility to start multiple things when an emergency happen (for example I can start multiple processes to do parallel things when an emergency happen).

                      I didn't understand the note about the repository is down, do you mean that github is down? I was working on the app and in other projects today and seems to work correctly. Can you share the URL of the repository that it's not working?

                      Greetings.

                      • 8. Re: jbpm 5.0 web application sample.?
                        michelemauro

                        The main difference between a web application and your code, Mauricio, is that a webapp usually works every request in isolation.

                        The problem then is, how to persist the ksession where your process live?

                        how to restore it when a user asks to work over that process instance again?

                         

                        And, just for fun, how to come up with a working Spring configuration for all this?

                         

                        Thanks,

                         

                        Michele