I'm working with drools fusion and I want to test the perfomance of this cep system based on the number of rules implemented. I now have a simple rule file with the .drl extension. I would like to dynamically generate about a 1000 rules. So how can this be done automatically without having them to create one for one in the .drl file?
1 Answers
1
votes
Have you ever heard about template engines? After all, DRL files are just plain text files. Here are some of them you can use:
- String Template: http://www.stringtemplate.org/
- Velocity: http://velocity.apache.org/
- FreeMarker: http://freemarker.org/
- Even Drools comes with some support for templates: http://docs.jboss.org/drools/release/6.3.0.Final/drools-docs/html_single/#d0e5930
If you don't like fancy stuff, you can always go back to the old good StringBuffer
class.
Hope it helps.