Re: [rules-users] Maven2 could not transfer artifect antlr-runtime
Hi, i fixed this issue there was some problem in my local repositories. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Maven2-could-not-transfer-artifect-antlr-runtime-tp4021912p4021944.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Maven2 could not transfer artifect antlr-runtime
but this is the only jar which is creating problem rest all jar are successfully getting transferred. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Maven2-could-not-transfer-artifect-antlr-runtime-tp4021912p4021916.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Maven2 could not transfer artifect antlr-runtime
Hi, i am trying to build my drools 5.4 project using my hudson environment( using maven2 plugin), but i am getting the below exception. Exception === Could not transfer artifact org.antlr:antlr-runtime:pom:3.3 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect My dependency jar in pom is which is correct when i check with central repository. Kindly Help org.antlr antlr-runtime 3.3 - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Maven2-could-not-transfer-artifect-antlr-runtime-tp4021912.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Dates in an XLS decision table
have you imported the package properly - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Dates-in-an-XLS-decision-table-tp4021546p4021636.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor rule validation using Java Code?
you can write something like on knowledgebuidler private void validateKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) throws KnowledgeBuilderValidationException { if (knowledgeBuilder.hasErrors()) { for (KnowledgeBuilderError error : knowledgeBuilder.getErrors()) { LOGGER.log(ZulaLevel.SEVERE, LogMessageIds.MSGID007, error .getMessage()); } throw new KnowledgeBuilderValidationException(); } } - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-rule-validation-using-Java-Code-tp4021291p4021331.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] decission table with xlsx extension is not getting compiled
Hi, i am using xlsx file extension worksheet( office 2007) for my decision table and i m getting the below exception. *org.drools.template.parser.DecisionTableParseException: An error occurred opening the workbook. It is possible that the encoding of the document did not match the encoding of the reader. * do i have to use only xls file in drools 5 ? - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/decission-table-with-xlsx-extension-is-not-getting-compiled-tp4020744.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] knowledgeBase.addKnowledgePackages api is getting hung
my spreadsheet contains 3780 records. which create the same no of rules during runtime. the control just get hung in the line "knowledgeBase.addKnowledgePackages(knowledgeBuilder .getKnowledgePackages());" CODE SNIPPET -- public KnowledgeBase buildKnowledgeBaseFromSpreadsheet(String spreadSheet, String ruleTemplate, int rowNo, int colNo) { KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(); String drl = externalSpreadsheetCompiler.compile(spreadSheetStream, ruleTemplateStream, 0, 0); knowledgeBuilder.add(new ByteArrayResource(drl.getBytes()), ResourceType.DRL); validateKnowledgeBuilder(knowledgeBuilder); // code which get hung *knowledgeBase.addKnowledgePackages(knowledgeBuilder .getKnowledgePackages());* return knowledgeBase; } public void validateKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) { if (knowledgeBuilder.hasErrors()) { System.out.println("Error compiling resources:"); for (KnowledgeBuilderError error : knowledgeBuilder.getErrors()) { System.err.println(error.toString()); } throw new IllegalStateException("Error compiling resources"); } } - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/knowledgeBase-addKnowledgePackages-api-is-getting-hung-tp4020724.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Creating HashMap object in rules
Hi Laune, you approch is working thx. but i am not able to understand the diffrence. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Creating-HashMap-object-in-rules-tp4020690p4020719.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Creating HashMap object in rules
Hi Esteban, Values of @{Result1}, @{Result2} & @{Result3} are unique values in my excel and they are not null, but when i try to get the hashmap(i.e. $rule) from array list(i.e $testObj.getResult() return an array list) in my java code it just return null as if the Map $rule = new HashMap() is completely ignored when it comes out of drools working memory. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Creating-HashMap-object-in-rules-tp4020690p4020704.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Creating HashMap object in rules
Hi, i m trying to do something like this. RHS OF MY RULE Map $result = new HashMap(); Map $rule = new HashMap(); $result.put("Result1", "@{Result1}"); $result.put("Result2", "@{Result2}"); $result.put("Result3", "@{Result3}"); $testObj.getResult().add($rule.put(drools.getRule().getName(), $result)); update($testObj.getResult()); i am not able to get this 2 object i.e "result and rule" from my java code after the execution of the rule. even though i have the reference of testobj in my java code. did i miss anything? - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Creating-HashMap-object-in-rules-tp4020690p4020700.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Creating HashMap object in rules
Hi, i am trying to create an hash map object inside one of my rules $rule : new HashMap(); $rule.add("Result1", "@{Result1}"); but it don't work. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Creating-HashMap-object-in-rules-tp4020690.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Droold 5.4.0
below are the list of jar which you may needed to make a small application i.e something more then just hello world. core-3.4.2.v_883_R34x.jar drools-compiler-5.4.0.Final.jar drools-core-5.4.0.Final.jar drools-decisiontables-5.4.0.Final.jar drools-jsr94-5.4.0.Final.jar drools-templates-5.4.0.Final.jar ecj-3.5.1.jar jxl-2.6.10.jar knowledge-api-5.4.0.Final.jar knowledge-internal-api-5.4.0.Final.jar mvel2-2.1.0.drools16.jar antlr-runtime-3.3.jar commons-io-2.2.jar ( only required if you want to read external resources) xpp3_min-1.1.4c.jar xstream-1.4.1.jar - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Droold-5-4-0-tp4020471p4020480.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] what is best way to deal with db access in rules?
its better if you can avoid subsequent db calls from drool. if feesible Cache the data to a collection container before you start execute the rules. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/what-is-best-way-to-deal-with-db-access-in-rules-tp4020309p4020312.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] empty cell in excel makes the LHS missing in the rule
Hi, i am using drools 5.4.0 and currently facing a typical problem. when ever any cell for LHS in the spreadsheet is blank. when the rules is compiled using the spreadsheet, the LHS for the empty cell get completely missed. drools don't even consider it as a empty string. The only workaround i found is to fill all empty cell with N/A and then merging the cells, which looks like a patch work. Any other way thru with i can tell drools to treat empty cells as empty string? - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/empty-cell-in-excel-makes-the-LHS-missing-in-the-rule-tp4020164.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] is drools 5.4.0 a GA version?
what is the current GA version of drools available - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/is-drools-5-4-0-a-GA-version-tp4020139.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] dialect "mvel" not working in drools template
Hi, I am trying to use dialect "mvel" in my template and trying to use fields defined in my domain object. but not of them are getting access. when i removed dialect "mvel" then i can accss the fields using the getter's method. ex: package com.drools.rules; dialect "mvel" . . . when $admissionObj.Age() > @{Age0} && $admissionObj.Age() < @{Age1} // this line throws exception // the same code works fine if i use getAge() instead of Age() after removing the dialect "mvel" - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/dialect-mvel-not-working-in-drools-template-tp4020138.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Checking Template Columns matching with Excel columns
Hi, I am using drools template and spredsheet in my application. my generic rules are maintain in template and rules data are maintained in spreadsheet. Currently i am declaring the columns name in my template file for using the field of excel. ex: Inside template (drt) template header rulesName Application Admission Permission . . . . inside excel rule(col 1), application(col2),admission(col3), permission(col4), . . . . . i want to make sure the excel col name has to match with exact name inside template. currently drools checks the order of the col declared in template with excel columns but not the actual name with the excel columns. Any possibility by which i can force drools to match the exact col name with the col name defined inside template file? Thanks... - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Checking-Template-Columns-matching-with-Excel-columns-tp4020090.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to integrate Drools application with Servlet
you can also create seperate source folder within project and dump all your drl files - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/How-to-integrate-Drools-application-with-Servlet-tp4019986p4020001.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to integrate Drools application with Servlet
also if possible move all the drl files to external folder and try to read rather then including it as part of the project. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/How-to-integrate-Drools-application-with-Servlet-tp4019986p402.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.4 final and jbpm: problem in acces process variable
your are still holding the reference to parameterMap in your java code. you can still access the values - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-final-and-jbpm-problem-in-acces-process-variable-tp4019987p4019992.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Getting Names of all the rules from the excel
thanks laune its working. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Getting-Names-of-all-the-rules-from-the-excel-tp4019958p4019965.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Getting Names of all the rules from the excel
Hi, i am using drools rule template. all my rules data are in a separate excel file. the first row of the excel is taken as rule name in my template file. My current requirement needs me to get the name of all the rules from the excel file. i am using drools.getRule().getName() but its of no use as this only work if the specific rule has to be executed. is there any other api in drools which gives me all the rules name from the excel?? else i have to write an Adapter to do the same from the excel. Thanks... Himansu - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Getting-Names-of-all-the-rules-from-the-excel-tp4019958.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeRuntimeLogger to slf4j
hi ge0ffrey, any luck in 5.4 as our enterprise application is made on top of 5.4. any workaround, any dirty way of doing this thx - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/KnowledgeRuntimeLogger-to-slf4j-tp4019773p4019775.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] KnowledgeRuntimeLogger to slf4j
Hi, how can i write the KnowledgeRuntimeLogger log details (in xml fromat) to my slf4j log file. i want to maintain the history of logs using slf4j which is not possible in KnowledgeRuntimeLogger as it get overwritten each time the log is written. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/KnowledgeRuntimeLogger-to-slf4j-tp4019773.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Dynamic rule creation
why r u using == for comparing strings literals - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Dynamic-rule-creation-tp4019723p4019739.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] unable to resolve method using strict-mode
thx davide try the same and it works. getApplicationItem() / getAdmissionItem() / getAttachment() are static functions maintain in my utility package. - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/unable-to-resolve-method-using-strict-mode-tp4019699p4019737.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Use of function in a spreadsheet decision table cell
Hi Mansi, You can write the function on the top of the decision table something like RuleSet Import Notes Variables --- Functions --- your function - Thanks... Himansu -- View this message in context: http://drools.46999.n3.nabble.com/Use-of-function-in-a-spreadsheet-decision-table-cell-tp4019706p4019716.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools Memory Log getting over written
Hi, i am trying to append my memory log generated by drools rule engine. but each time i run the code the log just get overwritten. is there any way to avoid overwritten of my log. this is the code i am using for my log generation. type 1 - WorkingMemory workingMemory = ruleBase.newStatefulSession(); WorkingMemoryFileLogger wmLogger = new WorkingMemoryFileLogger( workingMemory); wmLogger.setFileName("log/xyz"); . . . wmLogger.writeToDisk(); type 2 - KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory .newFileLogger(ksession, log/xyz.log); ksession.addEventListener(CustomAgendaEventListener.getInstance()); ksession.addEventListener(CustomWorkingMemoryEventListener .getInstance()); . . . . logger.close(); -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Memory-Log-getting-over-written-tp4019703.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users