[rules-users] Regarding using lessthan(<) and lessthan or equal(<=) operator in rules file

Edson Tirelli tirelli at post.com
Tue May 8 08:52:38 EDT 2007


   Remember that < and > must be escaped when inside XML files. So:

<eval> obj.getValue() < 10 </eval>

   would be:

<eval> obj.getValue() &lt; 10 </eval>

   []s
   Edson

2007/5/8, Mahaan <mahanteshsg at gmail.com>:
>
> Hi All,
>
> I am using lessthan(<) and less than or equal (<=) operator in LHS part of
> a XML rule file which is like this.
>
> <eval> obj.getValue < 10 </eval>
>
> but when i am giving it to rule engine for execution, its throwing the
> following exception:
>
> (null: 1, 214): cvc-elt.1: Cannot find the declaration of element
> 'package'.
> (null: 1, 569): The content of elements must consist of well-formed
> character data or markup.
> RuleException(javax.rules.admin.RuleExecutionSetCreateException : cannot
> create rule execution set), root cause(
> org.drools.compiler.DroolsParserException)
>     at
> org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown
> Source)
>     at com.unisys.mint.admin.rules.MCPRuleEngine.applyRule (
> MCPRuleEngine.java:104)
>     at com.unisys.mint.sdk.services.managerules.MCPRuleManager.applyRule(
> MCPRuleManager.java:63)
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.applyRule
> (TestNewRuleClass.java :124)
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.main(
> TestNewRuleClass.java:40)
> Caused by: org.drools.compiler.DroolsParserException
>     at org.drools.compiler.PackageBuilder.addPackageFromXml (Unknown
> Source)
>     ... 5 more
> Caused by: org.drools.compiler.DroolsParserException
>     at org.drools.compiler.PackageBuilder.addPackageFromXml(Unknown
> Source)
>     at
> org.drools.jsr94.rules.admin.LocalRuleExecutionSetProviderImpl.createRuleExecutionSet(Unknown Source)
>     at com.unisys.mint.admin.rules.MCPRuleEngine.applyRule(
> MCPRuleEngine.java:104)
>     at com.unisys.mint.sdk.services.managerules.MCPRuleManager.applyRule(
> MCPRuleManager.java:63)
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.applyRule(
> TestNewRuleClass.java:124)
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.main(
> TestNewRuleClass.java:40)
> java.lang.NullPointerException
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.applyRule(
> TestNewRuleClass.java:125)
>     at com.unisys.mint.sdk.services.managerules.TestNewRuleClass.main(
> TestNewRuleClass.java:40)
> cannot create rule execution set
>
> please help me to solve this.
>
> Thanks in advance,
> Mahantesh.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070508/959b4a32/attachment.html 


More information about the rules-users mailing list