You class looks totally wrong!
What are you using statics? These should all just be instant variables (as you are trying to get a – an instance of AmountProj).
If you want to have nullable values then you can’t use primitives, you need to use the Object forms (java.lang.Double, java.lang.Integer).
The syntax of your rules are wrong as well. Your should merge the a: AmountPair across all your condition columns so that you are using the same a.
Your condition expressions are also wrong – you should be using mvel not java style code and you should be using the column value.
This means that your expression should look like “basic == $param” (this would test that the basic salary matches whatever is in the corresponding column.
If you just want the rule to run always as long as basic isn’t null (assuming you’ve done the fixes above) then the simplest way is to have teh expression
“basic != $param” and then place null in the column, although I think you need to explain a bit more of what you are trying to achieve as I’m not sure why you are trying to do this in a spreadsheet?
Thomas
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
On Behalf Of Kripa Nathwani
Sent: 20 August 2010 08:36
To: Rules Users List
Subject: Re: [rules-users] error while inserting values in excel
Hi,
The foll is the java file which I tried to run as a stand alone application:
package com.sample;
public
class AmountPojo {
public
static
int
basic;
public
static
double
pf;
public
static
double
hra;
public
static
int getBasic() {
return
basic;
}
public
static
void setBasic(int
basic) {
AmountPojo.basic
= basic;
}
public
static
double getPf() {
return
pf;
}
public
static
void setPf(double
pf) {
AmountPojo.pf
= pf;
}
public
static
double getHra() {
return
hra;
}
public
static
void setHra(double
hra) {
AmountPojo.hra
= hra;
}
}
Let me know if you still require any further information.
Regards,
Kripa
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
On Behalf Of tom ska
Sent: Friday, August 20, 2010 12:42 PM
To: Rules Users List
Subject: Re: [rules-users] error while inserting values in excel
Ok, please write me AmountPojo class code, and - if You can - those rules in DRL, I will try to write You rules in DT.
regards,
tom
2010/8/20 Kripa Nathwani <Kripa.Nathwani@lntinfotech.com>
Hi,
Below is the decision table on which I am working. It is calculating PF and HRA by taking basic value and checking that basic is not equal to null.
The problem is when I start inserting values in the column it is giving me following error messages:
no viable alternative at input ')' in rule "Pricing bracket_12" in pattern AmountPojo
mismatched input '!=' expecting ')' in rule "Pricing bracket_12" in pattern AmountPojo
Unknown error while parsing. This is a bug. Please contact the Development team
I know it is related to syntax but I am not able to solve it.
Best Regards,
Kripa
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate
the information, notify the sender and delete it from your system.
______________________________________________________________________
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
______________________________________________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate
the information, notify the sender and delete it from your system.
______________________________________________________________________