Add insert support to database and use in rules