1 Reply Latest reply on May 9, 2011 10:19 AM by Kurt Stam

    How to access the Guvnor Rules Output in application?

    Parag Patil Newbie



      I have created a web application that retrieves field values from online filled form and apply the rules defined in guvnor. Now, I am trying to get the rules output i.e. the value set in Then and I want to show the total weightage applied to the fields based on the rules. For e.g Consider a form with following fields:

      No of Burger eaten: 10

      Coke (unit- cup):3


      Now I have defined a rule in Guvnor as follows:


      when No of Burger eaten > 4

      Then Calories = 100


      As mentioned in the above rules if no of burger eaten is greater than 4 then the calories added is 100 and so on and same holds true for Coke i.e. if no of coke is greater than 2 then calories added is 200


      Now in both cases i.e. burger and coke, I need to retrieve the calorie value for both and display as follows:




      Total Calories

      55100+200=300 and so on,

      Please help me get the rule output in object so that I can store the output of the rule.