Drools Error Importing Function
Contents |
van GoogleInloggenVerborgen veldenZoeken naar groepen of berichten
[x] Format For Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not bash error importing function definition in your last search results. Bug851310 - Drools cannot resolve functions when argument is a fact type Summary: Drools cannot resolve functions when argument is a fact type Status: VERIFIED Aliases: None Product: JBoss Enterprise BRMS Platform 5 Classification: JBoss Component: BRM (Guvnor) (Show other bugs) Sub Component: --- Version: BRMS 5.3.1 Hardware: Unspecified Unspecified Priority unspecified Severity unspecified TargetMilestone: ER2 https://groups.google.com/d/topic/drools-usage/Vq6E0eAeABo TargetRelease: BRMS 5.3.1 GA Assigned To: Mario Fusco QA Contact: Tomas Schlosser Docs Contact: URL: Whiteboard: Keywords: Depends On: Blocks: Show dependency tree /graph Reported: 2012-08-23 14:27 EDT by Mario Fusco Modified: 2013-10-10 20:17 EDT (History) CC List: 6 users (show) atangrin brms-jira etirelli lpetrovi paradhya tschloss See Also: Fixed In Version: Doc Type: Bug Fix Doc Text: The business https://bugzilla.redhat.com/show_bug.cgi?id=851310 rules engine could not resolve functions when a declared type was used as an argument for a function and resulted in compilation failure. This has been resolved by loading the Java Class corresponding to the declared type when compiling the function. It is now possible to use a declared type as an argument for a function. Story Points: --- Clone Of: Environment: Last Closed: Type: Bug Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) Repository export (3.06 KB, application/zip) 2012-09-17 07:00 EDT, Tomas Schlosser no flags Details Error messages (124.13 KB, image/png) 2012-09-17 10:26 EDT, Tomas Schlosser no flags Details Add an attachment (proposed patch, testcase, etc.) External Trackers Tracker ID Priority Status Summary Last Updated JBoss Issue Tracker JBRULES-3562 Major Resolved Drools cannot resolve functions when argument is a fact type 2016-04-04 16:55 EDT Groups: None (edit) Description Mario Fusco 2012-08-23 14:27:02 EDT Comment 1 Tomas Schlosser 2012-09-17 05:27:20 EDT Tested on brms-standalone-5.3.0 and the problem described in JIRA still
in the Drools core - Drools 5.0 - any suggestions for resolution? Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi Jane, The varargs feature definitely works with 5.0.1. I haven't http://lists.jboss.org/pipermail/rules-dev/2009-November/001569.html tried 5.1.0M. You can download the working example from http://code.google.com/p/droolsbook/ Download the parent-1.0-examples.zip
1 2 3 4 5 2 Votes Details Last Updated: 10 January 2015 Hits: 5952 In this problem statement we are going to demonstrate "Calling external functions from Drools drl file". Depending upon the city and the kind of product (Combination of City and Product), rule should calculate the local tax related to that city. We have created a drools project for the above problem statement and have used 2 drl files. I have taken two cities in consideration(Chicago and Boston) and 4 types of products (GROCERIES, MEDICINES, WATCHES, LUXURY_GOODS) The taxes on Medicines in both the cities I have considered is taken zero considering our new government doesn’t take taxes on medicines. Before going into external method invocation, we will start with a simple example. For groceries, I have assumed tax as 2$ in Chicago and 1$ in Boston. I have used the same selling price to demonstrate different outputs. Here is the model to hold the each itemType: package com.sample; import java.math.BigDecimal; public class ItemCity { public enum City { Chicago, Boston } public enum Type { GROCERIES, MEDICINES, WATCHES, LUXURY_GOODS } private City purchaseCity; private BigDecimal sellPrice; private Type typeofItem; private BigDecimal localTax; public City getPurchaseCity() { return purchaseCity; } public void setPurchaseCity(City purchaseCity) { this.purchaseCity = purchaseCity; } public BigDecimal getSellPrice() { return sellPrice; } public void setSellPrice(BigDecimal sellPrice) { this.sellPrice = sellPrice; } public Type getTypeofItem() { return typeofItem; } public void setTypeofItem(Type typeofItem) { this.typeofItem = typeofItem; } public BigDecimal getLocalTax() { return localTax; } public void setLocalTax(BigDecimal localTax) { this.localTax = localTax; } } Now, we will create two drools files for each city. Our first drl file is Chicago.drl (Rule file to execute Rules for Chicago City) pac