I am using Protege5.0, and i want to implement SWRL rule ie
User(?u), isInActivity(?u, ?cm), ContextMeeting(?cm) -> FamilyContact(?f), hasStatus(?f, "Reject")
which means "if user is in meeting then familycontact has status "reject".
This syntax should work and protege doesn't show any error. However, its not working. And when i write
User(?u), isInActivity(?u, ?cm), ContextMeeting(?cm), FamilyContact(?f) -> hasStatus(?f, "Reject")
This syntax works perfectly but its useless when i write complex rules in such format. Can anyone explain me the difference between the two formats and also give me a perfect solution?
More explanation:
i have a main class People & subclasses of People are Contact & User. The subclasses of Contact are FamilyContact, EmployeeContact etc. **The User and Contact are related by an object property isContactOf(People,Contact).In my ontology there should be only one individual of class User. Now, i want to implement SWRL rules, ie If **user is in meeting then FamilyContact hasStatus "Reject".** This reject simply means that Family members can not call the user. Other rule is If user is in meeting then EmployeeContact hasStatus "Pass". hasStatus(Contact,String) is a functional property.
the second rule syntax works perfectly, however when I want to implement a rule for those instances which are both EmployeeContact and FamilyContact then i get problem. eg if i write a rule i.e
User(?u), isInActivity(?u, ?cm), ContextMeeting(?cm), FamilyContact(?f), EmployeeContact(?e), DifferentFrom(?f,?e)-> hasStatus(?f, "Reject").
It works somehow but i get a problem. It makes the other instances of EmployeeContact also the Instances of FamilyContact and vice versa.