writing rules with flow dsl