Providing a XLS exhibiting he problem would be beneficial. A unit test in
drools-decisiontables even more so.
From what I gather you're saying if the XLS contains no
definitions, I.e.
only keywords, Drools is generating a single empty rule.
Sent on the move
On 30 Oct 2013 22:14, "srtatz" <srtatz(a)live.com> wrote:
I have an xls file with the appropriate header lines to make the xls
a
Drools
Decision Table that I provide to my users. I validate the content/data
they
enter, but do allow it to be "blank", that is, no user data, just the
Drools
Decision Table key words, conditions, actions, etc.
When using the stateful knowledge session built using the Drools Decision
Table, I insert an object implementing AgendaEventListener and override the
afterActivationEvent method to record on the object which row was hit. I
found that it is saying it hit the first row in the Drools Decision Table
after the header information. But that corresponds to a blank line, since
the table is blank. It seems to have generated a blank drl rule behind the
scenes with no conditions (so it always succeeds) and no actions. Since I
have logic based on whether or not a rule was successfully selected, this
selection of a non-existent rule breaks my code.
The user won't really be using a blank spreadsheet, but I need to cover the
situation. The validation is pretty set in stone right now so I don't want
to force the user to have some data.
Can anyone suggest an easy way to stop it from matching the blank line?
Thanks,
Steve
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Decision-Table-with-no-rules-mat...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users