Re: [rules-users] APIs to create rules

2012-01-17 Thread Mark Proctor
Just generate a string with a template. You can use drools-templates which is based on MVEL templating. There is also the descr builder api too that you can use, see release notes in documentation. Mark On 16/01/2012 09:43, bobbi_80 wrote: public static class CpuTracker{ private

Re: [rules-users] APIs to create rules

2012-01-17 Thread bobbi_80
Thanks a ton MarK. For benefit of others who may read this post here is the code snippet. PackageDescr pkg = DescrFactory.newPackage() .name(org.drools.example) .newRule().name(Xyz) .attribute(ruleflow-grou,bla)

[rules-users] APIs to create rules

2012-01-16 Thread bobbi_80
public static class CpuTracker{ private String machinename; private String averageCPU; } Consider the following rule : rule first_rule @ID(“1”) when averageCPU 80 then syso(do something); end I have the