1

I am new to Drools Guvnor and have set up a basic rool framework using the same. I just want to know if current Drool file is correct or not.

As of now, I have no way except running it end to end. Is there any to check compilation issues immediately?

EDIT:

When we have syntax errors, for example, 'string.Contains' instead of 'string.contains' validate/verify pass successfully and so does 'Build Package' option. Let me know If I am missing anything.

Apart from this, I don't have much idea about QA section (in fact, we haven't put any test there).

Thanks,

instanceOfObject
  • 2,936
  • 5
  • 49
  • 85

1 Answers1

1

In Guvnor you can

1) Validate individual rules by Source -> Validate menu, (can be seen when rule is open)

2) Define and run a test scenario using QA section. Guvnor manual has a nice section describing its use.

3) Use Validate Configuration and Build Package buttons on Edit tab of your package. This will compile all rules in your package.

I suggest you use use validate menu on every edit to a rule, and write test scenarios that cover 100% of your rules.

ali köksal
  • 1,217
  • 1
  • 12
  • 19
  • when we have syntax errors, say, 'string.Contains' instead of 'string.contains' validate passes successfully and so does third option. Let me know If I am missing anything. Apart from this, I don't have much idea about QA section (in fact, we haven't put any test there). I will try that (any good tutorial/examples will be helpful). Thanks! – instanceOfObject Oct 23 '12 at 14:29
  • You can see the chapter in Drools manual about test scenarios. http://docs.jboss.org/drools/release/5.4.0.Final/drools-guvnor-docs/html/ch04.html#d0e1919 can you provide a sample rule with syntax errors, that drools fails to deect at validate? – ali köksal Oct 23 '12 at 16:39
  • if(string.Contains('hello')){} although 'C' should be 'c' in 'contains', Drool's Validate/Verify don't detect it. – instanceOfObject Oct 24 '12 at 07:52
  • I have tried the "contains" example and Guvnor 5.4 gave the correct error messages. Can you please post the rule in question? – ali köksal Oct 25 '12 at 18:49
  • I am using Drools 5.3. Can it be the reason? – instanceOfObject Oct 25 '12 at 19:55