-
1. Re: DRool syntax
jaroslaw.kijanowski Nov 28, 2007 4:35 AM (in response to dsun)Do you have:
expander XPathLanguage.dsl
after your import statements?
Moreover xpathEmpty is not defined yet, please see the Content Based Routing Guide for more informations, define "xpathEmpty" and share with us :) -
2. Re: DRool syntax
dsun Nov 28, 2007 12:06 PM (in response to dsun)rule "Missing Executing Broker "
salience 10
when
xpathEmpty "/olcmf/olcmfMessage/messageData/dataRecord/tradeRecord/tradeParties/executingBroker"
then
Log : "~~~~1 Missing Executing Broker";
end
The above rule works perfect. I defined xpathEmpty in my own class.
But after I added m : Message() in when section, I get rule parse problem.
rule "Missing Executing Broker "
salience 10
when
m : Message()
xpathEmpty "/olcmf/olcmfMessage/messageData/dataRecord/tradeRecord/tradeParties/executingBroker"
then
Log : "~~~~1 Missing Executing Broker";
end -
3. Re: DRool syntax
jeffdelong Nov 28, 2007 12:20 PM (in response to dsun)While it would help to see the error, most likely it is a result of mixing DRL syntax with DSL syntax. I.e.,
m : Message()
is DRL syntax.
If you want to add a constraint that the message exists (not sure why you would want to do this since the CBR will always insert a message), you would need to add this to the XPathLanguageDSL.[when]There is a message=m : Message()