[rules-users] JBoss Rule Trace feature with 5.0

Wolfgang Laun wolfgang.laun at gmail.com
Tue Nov 16 02:19:50 EST 2010


On 15 November 2010 19:30, kkinjal <kinjal.khandhar at gmail.com> wrote:

>
> Hi All,
>
> I am able to print the logs that says which rule was fired and what is the
> id for it.Thanks Wolfgang!
>
> Is there any way I can print the conditions(when clause) that got executed
> and which condition failed to execute and the order of those conditions
> execution?
>

This has been frequently asked for, and the answer is "no". Conditions are
munched by the compiler/Rete builder, and there's no simple way of tracking
what goes on during this process. The network is too complex for easy
inspection
by a debugger.

Moreover, CEs may depend on bindings from preceding CEs, so the idea of
having additional rules for all individual conditions isn't sufficient. What
might do the trick is to write for a "production" rule
   rule r A(...) B(...) C(...)... then...end
additional rules
   rule r-1 A(...)  then...end
   rule r-2 A(...) B(...)  then...end
   rule r-3 A(...) B(...) C(...) then...end
   ...
and observe the agenda entries for these; if, say, r-1 and r-2 are around
but
r-3 isn't, then C(...) is currently failing. Subsequent conditions D(...)
arent't
relevant at this moment.

I think that these rules could be derived from the initial rule r (relying
on very
internal API calls). Any takers? ;-)

OTOH, if your CEs are simple and straightforward, a few queries might be
sufficient to provide enough data for telling you what iCE s not true.

-W


> The application which I am building has multiple conditions and I would
> like
> to see which condition failed and which got successfully executed.
>
> Please let me know.Appreciate any suggestion.
>
> Thanks,
> Kinjal
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/JBoss-Rule-Trace-feature-with-5-0-tp1525661p1906333.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101116/2e5bd474/attachment.html 


More information about the rules-users mailing list