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

Edson Tirelli tirelli at post.com
Wed Sep 8 14:11:42 EDT 2010


   Yes, that information is provided by the parser... I don't see any
problem in exposing that that the knowledge builder level...

   Edson

2010/9/8 Wolfgang Laun <wolfgang.laun at gmail.com>:
> 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
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com



More information about the rules-dev mailing list