rules
rules copied to clipboard
No Response after 10th rule
Hi,
I'm running rules engine by java code as executable jar file. I'm running these rules engine by another java program to check against records in CSV file. After 10th row, I'm not getting response from this line - "Engine engine = new Engine(_rules, true);". Also no error thrown.
I can run the program successfully by Linux command directly. Also by eclipse in debug mode.
Pasted code below -
//Main another program ProcessBuilder pb = new ProcessBuilder("java", "-jar", "myrules.jar", "jsonInput"); Process p = pb.start();
//Code in the JAR program private int ruleEngine(List<Rule> _rules, String input) { int isPass = 0; try { Engine engine = new Engine(_rules, true); isPass = engine.getMatchingRules(input).size(); } catch (Exception ex) { isPass = 0; System.out.println(ex.getMessage()); } return isPass; }
Please help me to fix the issue.
Thanks
Nitin C N
Can you write a test for this issue? Is it only a problem when starting the process from your main application or is it independent of the process?