[
https://issues.jboss.org/browse/JBRULES-2432?page=com.atlassian.jira.plug...
]
Michael Anstis commented on JBRULES-2432:
-----------------------------------------
Comment from Wolfgang Laune:-
To solve the spreadsheet dilemma you could think up several hacks, similar to the one that
was reported as implemented for
https://issues.jboss.org/browse/JBRULES-2409 only
yesterday, e.g., another spreadsheet setting: EmptyString <text>, defining
<text> as a stand-in for the nothingness of the empty string.
TemplateDataListener.newCell filters out correctly blank values; this
leads to incorrect template processing
------------------------------------------------------------------------------------------------------------
Key: JBRULES-2432
URL:
https://issues.jboss.org/browse/JBRULES-2432
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Environment: Any
Reporter: Denis Robert
Assignee: Michael Anstis
Fix For: 5.3.0.Final
When using a DataProviderCompiler(), a blank column returned by the DataProvider causes
an entire line to not be outputted in the result. I tracked this to a line in
TemplateDataListener.newCell which explicitly filters out blank cells, even though such
cells should be allowed.
The template I'm using is:
<snip>
template header
ruleID
object
field
regexp
replacement
package standardization
import [removed].*
template std_rule
rule "@{ruleID}"
dialect "mvel"
when
$o: @{object}()
then
$o.@{field} = $o.?@{field}.replaceFirst("(a){regexp}",
"@{replacement}");
end
end template
<snip>
Whenever "replacement" is blank, the consequent does not get generated.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira