This is very similar to a question I just answered in another topic - Rule Builder iOS app
Basically, you’ll use both the triggers and the conditions. The triggers make the rule fire, and when the rule fires, the conditions are checked. So your rule could look like this:
if any of these happen:
John leaves
Jane leaves
while ALL of these are true:
John is not present
Jane is not present
then do this:
// do something