define

myentity sub entity,
  owns name;
    
name sub attribute,
    value string;
    
rule r1:
when {
    $s isa myentity;
    not { $s isa myentity, has name "real name";};
} then {
    $s has name "fake name";
};

rule r2:
when {
    $s isa myentity;
    not { $s isa myentity, has name "fake name";};
} then {
    $s has name "superreal name";
};