Using Patterns to Design Rules in Workflows