I want to express in SWRL the follwing rule :
IF wasCommunicatedBy(a2,a1) THEN there exist e such that wasGeneratedBy(e,a1) and used(a2,e)
which means communication between activities a1 and a2 implies the existence of an entity e generated by one activity and used by the other. I tried the following rule :
Entity(?e) ^ wasCommunicatedBy(?a2, ?a3) -> wasGeneratedBy(?e, ?a3) ^ used(?a2, ?e)
I'm not sure about it because the fact that I'm putting Entity(?e) at the beginning implies it is applicable for all entities in the ontology, which cancel "there exist" .
Any help?