Of course you have to handle it in your application code. And that's your task to solve this problem Again, rules infer new facts based on the existing facts. Nothing more, nothing less. No deletion or replacement of facts.
> Lorenz, question arises then how to cope with it? > > On Fri, Jan 20, 2017 at 8:39 PM, Lorenz Buehmann < > [email protected]> wrote: > >> Rules do not replace values - that's the nature of Jena rules and also >> other rule languages like SWRL - called monotonicity. >> >> More is not to say. >> >> >> On 20.01.2017 17:29, tina sani wrote: >>> I am asking why the Jena rules some times lead to duplicate values. By >>> duplicate values, I mean it does not over write the old values when >> certain >>> new values comes in. >>> I have a rule which says if an employee salary exceeds 10k usd, the >> emplyee >>> should be assigned to a Manager class else to Programmer class. >>> >>> In the early stages of the system, my rules assign her to Programmer when >>> salary is less than 10k and works fine. >>> When later the same employee salary exceeds the threshold, it assign it >> to >>> Manager class, again fine. But the problem is that it did not replace the >>> old value and I can see both the values in my file: >>> *Jim Type Programmer* >>> *Jim Type Manager* >>> >>> *Now should it be avoided and if yes how? From week, I am working on it >> but >>> so far failed.* >>> >> -- Lorenz Bühmann AKSW group, University of Leipzig Group: http://aksw.org - semantic web research center
