0 Replies Latest reply on Dec 30, 2009 8:42 AM by yuribett

    JBoss Guvnor - Sum Attributes

      Hi all,

      I'm using the JBoss Guvnor to create some rules.

      I need to sum a attributes in diferent objscts. For exemple: I have some objects "Company" in my memory work. Each object has an attribute named "employees", that represent the number of employees.

      Now, in my object Company, I also have as attribute named "total_employees", that represent the total of all Companies, like this:

      Company01.total_employees = Company01.employees + Company02.employees + Company03.employees ... etc;

      In another words... I need to know how to make this sum, or, how can I set a value in an attribute, that the value is a sum with other objects...

      Maybe I need crate a function that get the QheryResultRow or creat a object that keep the current sum... right?

      Yuri