[rules-users] calling a function before and after every rule