Hi all,
Hi all, I'm new using Corticon and I am having problems using ICcStandAloneExtension. I have created some very very easy examples and I am not able to make some of them work. Below, you can find the Java Class. Each method has as a comment whether it works or not when I call it from a rule.
So, when I use for instance, test2:
public static Integer test2(Integer param1) {
return Integer.valueOf(param1 * 12);
}
in the rulesheet file would be:
currentLoan.duration =LoanOperators.test2(2)
where currentLoan.duration is an Integer, the input parameter is also an Integer and the method output is an Integer.
it shows an Error type: Invalid parameters.
But if I use for instance test7:
currentLoan.duration=LoanOperators.test7(1,5) where currentLoan.duration is an Integer, the output method is an Integer and the input parameter is a BigDecimal, it works perfectly.
About my environment:
- Windows 7, locale configuration: spanish (castilian)
- Progress Corticon 5.3
package loan.operators;
import java.math.BigDecimal;
import com.corticon.services.extensions.ICcStandAloneExtension;
public class LoanOperators implements ICcStandAloneExtension {
// Does not work
public static Integer computeYearlyRepayment(BigDecimal yearlyInterestRate, Integer amount, Integer duration) {
return Integer.valueOf(1);
}
// Does not work
public static Integer test0(BigDecimal yearlyInterestRate, Integer amount) {
return 1;
}
// Does not work
public static Integer test1(Integer param1, Integer param2) {
return Integer.valueOf(12);
}
// Does not work
public static Integer test2(Integer param1) {
return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test3(int param1) {
return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test4(int param1, int param2, int param3) {
return Integer.valueOf(param1 * 12);
}
// Does not work
public static Integer test5(double param1, int param2, int param3) {
return Integer.valueOf(param2 * 12);
}
// Does not work
public static Integer test6(BigDecimal param1, int param2, int param3) {
return Integer.valueOf(param2 * 12);
}
// Works
public static Integer test7(BigDecimal param1) {
return Integer.valueOf(1);
}
// Works
public static BigDecimal test8(BigDecimal param1) {
return BigDecimal.ONE;
}
}
Thanks to everyone in advance.
Best Regards
Hi all,
Hi all, I'm new using Corticon and I am having problems using ICcStandAloneExtension. I have created some very very easy examples and I am not able to make some of them work. Below, you can find the Java Class. Each method has as a comment whether it works or not when I call it from a rule.
So, when I use for instance, test2:
public static Integer test2(Integer param1) {
return Integer.valueOf(param1 * 12);
}
in the rulesheet file would be:
currentLoan.duration =LoanOperators.test2(2)
where currentLoan.duration is an Integer, the input parameter is also an Integer and the method output is an Integer.
it shows an Error type: Invalid parameters.
But if I use for instance test7:
currentLoan.duration=LoanOperators.test7(1,5) where currentLoan.duration is an Integer, the output method is an Integer and the input parameter is a BigDecimal, it works perfectly.
About my environment:
- Windows 7, locale configuration: spanish (castilian)
- Progress Corticon 5.3
package loan.operators;
import java.math.BigDecimal;
import com.corticon.services.extensions.ICcStandAloneExtension;
public class LoanOperators implements ICcStandAloneExtension {// Does not work
public static Integer computeYearlyRepayment(BigDecimal yearlyInterestRate, Integer amount, Integer duration) {return Integer.valueOf(1);
}
// Does not work
public static Integer test0(BigDecimal yearlyInterestRate, Integer amount) {return 1;
}
// Does not work
public static Integer test1(Integer param1, Integer param2) {return Integer.valueOf(12);
}
// Does not work
public static Integer test2(Integer param1) {return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test3(int param1) {return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test4(int param1, int param2, int param3) {return Integer.valueOf(param1 * 12);
}
// Does not work
public static Integer test5(double param1, int param2, int param3) {return Integer.valueOf(param2 * 12);
}
// Does not work
public static Integer test6(BigDecimal param1, int param2, int param3) {return Integer.valueOf(param2 * 12);
}
// Works
public static Integer test7(BigDecimal param1) {return Integer.valueOf(1);
}
// Works
public static BigDecimal test8(BigDecimal param1) {return BigDecimal.ONE;
}
}
Thanks to everyone in advance.
Best Regards
Flag this post as spam/abuse.
Hi all,
Hi all, I'm new using Corticon and I am having problems using ICcStandAloneExtension. I have created some very very easy examples and I am not able to make some of them work. Below, you can find the Java Class. Each method has as a comment whether it works or not when I call it from a rule.
So, when I use for instance, test2:
public static Integer test2(Integer param1) {
return Integer.valueOf(param1 * 12);
}
in the rulesheet file would be:
currentLoan.duration =LoanOperators.test2(2)
where currentLoan.duration is an Integer, the input parameter is also an Integer and the method output is an Integer.
it shows an Error type: Invalid parameters.
But if I use for instance test7:
currentLoan.duration=LoanOperators.test7(1,5) where currentLoan.duration is an Integer, the output method is an Integer and the input parameter is a BigDecimal, it works perfectly.
About my environment:
- Windows 7, locale configuration: spanish (castilian)
- Progress Corticon 5.3
package loan.operators;
import java.math.BigDecimal;
import com.corticon.services.extensions.ICcStandAloneExtension;
public class LoanOperators implements ICcStandAloneExtension {// Does not work
public static Integer computeYearlyRepayment(BigDecimal yearlyInterestRate, Integer amount, Integer duration) {return Integer.valueOf(1);
}
// Does not work
public static Integer test0(BigDecimal yearlyInterestRate, Integer amount) {return 1;
}
// Does not work
public static Integer test1(Integer param1, Integer param2) {return Integer.valueOf(12);
}
// Does not work
public static Integer test2(Integer param1) {return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test3(int param1) {return Integer.valueOf(param1 * 12);
}
// Works
public static Integer test4(int param1, int param2, int param3) {return Integer.valueOf(param1 * 12);
}
// Does not work
public static Integer test5(double param1, int param2, int param3) {return Integer.valueOf(param2 * 12);
}
// Does not work
public static Integer test6(BigDecimal param1, int param2, int param3) {return Integer.valueOf(param2 * 12);
}
// Works
public static Integer test7(BigDecimal param1) {return Integer.valueOf(1);
}
// Works
public static BigDecimal test8(BigDecimal param1) {return BigDecimal.ONE;
}
}
Thanks to everyone in advance.
Best Regards
Flag this post as spam/abuse.
It worked!!!! Thanks :)