rules icon indicating copy to clipboard operation
rules copied to clipboard

No Response after 10th rule

Open nitincn opened this issue 7 years ago • 1 comments

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

nitincn avatar Jan 23 '18 11:01 nitincn

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?

maxant avatar Jan 24 '18 19:01 maxant