i wrote the rule as specified by you, now executed the rule successfully
but i think it is tedious and complex way to write a simple rule.
thanks all
Beto Siless wrote:
>
>
> I think that you have to write the left hand side in normal disjunctive
> form:
>
> rule "bank_sovereign_corporate_standadizedWeight_1"
>
> when
> result:String();
> Seeker(type=="bsc",val == "issueRatings1") or Seeker(type=="bsc",val
> == "issueRatings2")
> then
> result = "Standardized weight "+Rules.facilityWeight +" % ";
> retract(obj_seeker);
> modify(result);
> end
>
>
> Or you can express the same in two rules:
>
> rule rule_1
> when
> $obj_seeker:Seeker(type=="bsc",val == "issueRatings1")
> then
> ...
>
> rule rule_2
> when
> $obj_seeker:Seeker(type=="bsc",val == "issueRatings2")
> then
> ...
>
>
> Beto
>
>
> Nirmal.R wrote:
>> Hi all,
>>
>> I'm trying to create the following rule but over and over i'm getting the
>> same error. Can somebody tell me where i'm going wrong
>>
>>
>> rule "bank_sovereign_corporate_standadizedWeight_1"
>>
>> when
>> result:String();
>> $obj_seeker:Seeker(type=="bsc",(val == "issueRatings1" or val ==
>> "issueRatings2"));
>> then
>> result = "Standardized weight "+Rules.facilityWeight +" % ";
>> retract(obj_seeker);
>> modify(result);
>> end
>>
>>
>> org.drools.rule.InvalidRulePackage: unknown:56:33 Unexpected token '('
>> unknown:56:64 mismatched token: [EMAIL PROTECTED],1134:1135='==',<43>,56:64];
>> expecting
>> type '('
>>
>> at org.drools.rule.Package.checkValidity(Unknown Source)
>> at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
>> at com.dnb.rules.Rules.getRuleBase(Rules.java:66)
>> at com.dnb.rules.RulesExec.execute(RulesExec.java:40)
>> at
>> org.apache.jsp.Standardized_005fWeight_jsp._jspService(Standardized_005fWeight_jsp.java:102)
>> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
>> at
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>> at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> at
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>> at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>> at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>> at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> at
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>> at
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>> at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>> at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>> at
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>> at java.lang.Thread.run(Thread.java:595)
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
View this message in context:
http://www.nabble.com/Using-AND---OR-tf2884905.html#a8074514
Sent from the drools - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email