parses rules and replaces placeholders with actual data values