How to convert Rule to Action