2 Replies Latest reply on Oct 7, 2011 2:30 PM by Mauricio Salatino

    Need help with JBPM Process coding

    Raul DM Newbie



      I am new to JBPM. I have couple of questions:


      1. Do I need to learn Drool first to proceed with JBPM ? Is Drool really required or I can do everything with JBPM 5 itself?


      2. How can I create rules in JBPM and execute them ?


      3. How can I create web application using JBPM library?


      4. Do I need to write Java code as we usually do in classes inside packages or we have to write the codes in the Process itself I mean in the bpmn file..!!



      For Example: My requirement is as follows:


      I need to create a set of Products for my construction company ABC. ABC deals with construction of real estates and based on the requirement of the client it charges the customer.

      Scenario 1:

      Product : resident house.

      rule 1: if (area > 1000 sq feet) then (construction charge = 100$ per square feet) else (construction charge = 90$ per sq feet)

      rule 2: if (property is for residential use) then (Service Tax = 5%) else (Service Tax = 8%)


      I am confused after goign through some of the documentation on JBPM,


      Kindly guide me so that I can proceed with the rule engine.




        • 1. Re: Need help with JBPM Process coding
          Raul DM Newbie

          53 views but no reply..

          Have I asked very weired things.. ?

          • 2. Re: Need help with JBPM Process coding
            Mauricio Salatino Master

            Hi Raul,

            sorry for not answering you quickly.Your questions are a little bit generic, but are ok.

            1) no, you don't need to learn drools to use jBPM, you need to clearly define what you need to do and make your that your requirements are clear. If you are thinking to use rules inside of your processes then you need to learn Drools.


            2) You need to learn drools and jbpm if you want to do that. Using Ruleflow Groups is one option of many. It really depends what are you trying to solve. Did you check the documentation in drools.org and jbpm.org?


            3) You can create your web application and then use the jBPM apis to interact with the engine. You will also need to use the human task component apis to retrieve the human tasks. jBPM is like every other framework that you want to use, so you will need to know how to use it first and then how to embed it inside your application. It is a common requirement.


            4) writing java code inside XML files is usually a bad practice, I recommend you to not do that. Inside jBPM5 you have the concept of WorkItem that will allow you to hook classes to the process flow very easy and don't write code inside the XML file.


            Based on your described scenario I didn't understand the business process that you need to model, it looks like a couple of rules inside some decision nodes, but I can't figured out what happens in the middle. I strongly recommend you to define a clear business process and then we can help you to write rules to check different conditions if you really need that. If you have purely decisions based on some values, sometime expressions are enough.



            1 of 1 people found this helpful