[rules-dev] A small by-product of DRL parsing?

Wolfgang Laun wolfgang.laun at gmail.com
Wed Sep 8 13:54:39 EDT 2010


I may have missed this, too, but I'd like to have a map of package+rulename
to .DRL/.DSLR-pathname+linenumber.

The DRL parser shouldn't have any trouble delivering this info, right Edson?

I have produced this information with a kludgy hack, and it's great for
producing documentation answering question such as:

"Whera are all my rules?"
package appl.domain
  "find disjoint pairs" at /appl/domain/elements.dslr:13
  "find intersecting pairs" at /appl/domain/elements.dslr:31
  "find an element with thirteen numbers" at /appl/domain/elements.dslr:61
  "find an element with twelve numbers" at /appl/domain/elements.dslr:47
  "find subset pairs" at /appl/domain/elements.drl:21

"Where is some fact class used?"
class appl.domain.Element used in:
  "find an element with twelve numbers" in appl.domain at
/appl/domain/elements.dslr:47
  "find subset pairs" in appl.domain at /appl/domain/elements.drl:21
  "find disjoint pairs" in appl.domain at /appl/domain/elements.dslr:13
  "find an element with thirteen numbers" in appl.domain at
/appl/domain/elements.dslr:61
  "find intersecting pairs" in appl.domain at /appl/domain/elements.dslr:31

"Where is the rule causing a RuntimeException?"
Exception in thread "main" rss.drools.monitor.ActivationLoopError: looping
over rules "find an element with twelve numbers" at
/appl/domain/elements.dslr:47,  "find an element with thirteen numbers" at
/appl/domain/elements.dslr:61 (all in appl.domain)

The class should be Serializable, and separately retrievable from the
KnowledgeBuilder.

Any chance?
-W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20100908/41ad050d/attachment-0001.html 


More information about the rules-dev mailing list