Why not add EmployeeTypeSalary objects to Working Memory, then you only
need one static rule:-
when
EmployeeTypeSalary( $et : emplyeeType, $s : salary )
$e : Employee( employeeType == $et )
then
modify($e) {
setSalary( $s );
}
end
EmployeeTypeSalary represents individual rows in your database.
With kind regards,
Mike
On 23 August 2012 12:57, debchamps <majumdar.debarghya(a)gmail.com> wrote:
Hi
I have the following requirement
The rule is like if(employeeType == $1) set salary = $1
emloyeeType salary
--------------- ---------------
MANAGER 100
SR Manager 200
Director 300
Now new employeeType gets added every day. So the requirement is to
update
the knowledgebase without again activating the service.
So how to achieve that with Drools. I am using Drools with a Decision table
for a different requirement in the same project. So if it can be achieved
with decision table it would be great(So new rows will get added to the
decision table dynamically but no column in this case).
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-with-rules-from-database-tp40193...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users