t;you shouldn't have conditions in
the RHS" pattern then I don't think that's sufficient.
--- On Thu, 12/3/09, Barry Kaplan wrote:
> From: Barry Kaplan
> Subject: Re: [rules-users] Trivial rule with condition in RHS won't compile,
> help please
> To: rules-users
wrote:
> From: CK
> Subject: Re: [rules-users] Trivial rule with condition in RHS won't compile,
> help please
> To: "Rules Users List"
> Date: Thursday, December 3, 2009, 1:49 PM
> I would assume that you're trying to
> test out rule writing and seeĀ
Greg Barton wrote:
>
> You can use them in the RHS, but just with java dialect.
>
This is inconsistent. If they can be used in java, then they should not be
disabled for mvel.
--
View this message in context:
http://n3.nabble.com/Trivial-rule-with-condition-in-RHS-won-t-compile-help-ple
The following rule:
rule "test" dialect "mvel"
when
eval(true)
then
if (true) {
System.out.println("***")
}
end
Fails with:
java.lang.RuntimeException: Unable to build expression for 'consequence':
was expecting type: java.lang.Object; but found type: void 'if (true) {
I would assume that you're trying to test out rule writing and see
what works and what doesn't. I don't believe you can use if
statements in the RHS.
Normally, anytime you want to use "if" statements inside the RHS, it's
a sure sign that you should move it to the LHS and create separate
Ok, I found http://n3.nabble.com/Strange-MVEL-error-td62055.html#a62055 which
indicates that expressions are disabled in mvel RHS. I understand good
intentions, but I **need** this expression for this particular situation.
Anybody know some what to turn this back on?
Also, when I try wrap the RHS