Superficially, his is a bug in XmlDumper, but it cuts a little deeper -
first look I don't see that the internal representation of String values
such as "null" or "true" or "false" is possible for literal
constraints.
(I'll open a JIRA forthwith.)
You have these two options as a workaround:
(1) Create a
global String strnull
and initialize it with the String "null"
ksession.setGlobal( "strnull", "null" );
(2) Use
keyValue== ("null")
which Xml-dumps into a different (correct) representation.
-W
On 25 February 2011 02:32, Christina Lau <lau.christina(a)hit.com.hk> wrote:
Dear all,
My system is transforming internal data structure to drools rule language
XML file. For particular evaluation on a string field, how can I do so
happen the evaluating value is one of the keywords?
For example,
I need to check if
keyValue=="null"
In rule language in XML, through the XmlDumper,
<field-constraint field-name="keyValue">
<literal-restriction evaluator="=="
value="null" />
However, this is the same for evaluation of
keyValue==null //check if keyValue is null or not
Would someone know how to tell the engine the different scenario in rule
language XML file,
evaluate on the content, and
nullable of the field?
Thanks a lot for your help
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-in-XML...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users