rule-engine

forall always evaluates to be true [Drools]

会有一股神秘感。 提交于 2019-12-12 04:09:22
问题 I have a class Application, within which there is a list of instances of CallPhones. class Application() { List<CallPhones> callPhonesList; ... } class CallPhones() { Integer callTimes; ... } I want to fire the rule when callTimes of all instances larger than 10. Here is the rule: rule "Application eligible" when app : Application() forall(CallPhones(callTimes > 10)) then // application is eligible end Strangely, the rule always fires , even when there's an instance with callTimes being 5. I

Drool with Wildfly is not responding under Load

℡╲_俬逩灬. 提交于 2019-12-11 19:07:41
问题 I have set up Drool rule Engine 7.15 with Wildfly 15.0(jboss) server version. Normally it works fine. But when the Load is more to the rule Engine i.e more request concurrently come. It stops responding until the rule is deployed again. This could be the issue with the container of wildfly. Can any one help inthis regard. -ram 回答1: Dear Anton Giertli, I am using 'wildfly-17.0.0.Final' server and deployed 'kie-server-7.17.0.0.war' along with this my application code as 'kie-builder.war' also

Stop Rules on update facts drools

我怕爱的太早我们不能终老 提交于 2019-12-11 16:16:48
问题 I have a scenario in Drools. I have some set of rules. For Example : In Rule 1: I am setting ProductName in the fact pojo that comes from session after some condition. In Rule 2: I am calculating grade value i.e. X1,X2,X3,X4. So for each grade I have single rule to calculate. The Fact pojo that is coming from User may ask to calculate any grade value. However, say user asked for X4, then all the grade value from X1 to X3 should also be calculated. What I did is that whenever any rule is

Drools : Firing Rules using a Session vs WorkingMemory

夙愿已清 提交于 2019-12-11 08:39:05
问题 What is the difference in between these two in Drools ?? Means taht we can fire the rules based on the Creating the WorkingMemory from the loaded Rules RulesBase and firing rules as shown below : WorkingMemory workingmemory = rulebase.newWorkingMemory(); workingmemory.fireAllRules(); vs Using a Session (Stateful . Stateless ) to fire the rules as shown KnowledgeBase knowledgebase = createKnowledgeBase(); StatefulKnowledgeSession session = knowledgebase.newStatefulKnowledgeSession(); session

CLIPS: modify-instance does not trigger pattern matching

我是研究僧i 提交于 2019-12-11 06:16:57
问题 Having a file test.clp: (defclass TestClass (is-a USER) (role concrete) (pattern-match reactive) (slot value) (slot threshold)) (definstances TestObjects (Test of TestClass (value 0) (threshold 3))) (defrule above-threshold ?test <- (object (is-a TestClass)) (test (> (send ?test get-value) (send ?test get-threshold))) => (printout t "*** Above threshold!! ***" crlf) (refresh below-threshold)) (defrule below-threshold ?test <- (object (is-a TestClass)) (test (> (send ?test get-value) (send

Anyone with specific pointers or experience with a 'Generic Rules Engine'?

巧了我就是萌 提交于 2019-12-09 20:08:38
问题 I am looking to integrate with a 'Generic Rules Engine' based on the request of a customer. I think the objective is to allow business stakeholders to add 'Rules', and have those be incorporated into an overall metric calculated on a dataset. So far, the Rules i have heard seem like straightforward snippets of logic in the code. I suppose the drawback is that even though simple, this would still need to be coded... (as opposed to some kind of runtime or data driven rule specification

Scoring / rating engines - advice and examples?

自闭症网瘾萝莉.ら 提交于 2019-12-09 09:45:07
问题 I need to create a flexible (and preferably dynamic) scoring engine, much like a credit scoring or premium calculating system. Does anyone with practical experience of creating a scoring engine have any advice, examples or suggested patterns? I already know about: Rete Algorithm FICO The open source rules engines listed here Thanks! Edit: To provide a little more detail.. Ok, so I have had a look around and I think a rules engine is what I am after, it's more flexible and rules can be used to

Drools: how to retrieve the fact in response from Kie Execution Server?

送分小仙女□ 提交于 2019-12-08 10:20:34
问题 I am using Kie Execution Server 6.2 final and I have a simple rule file deployed on the server and I am accessing it through rest api. When I try to execute the rules, everything goes well, but I do not get newly inserted fact in the response. Here is my drl file rule "Odd Rule" dialect "mvel" when testRecord : TestRecord((integerValue & 1) == 1 && integerValue != 0 , testId: testRecordId , intValue :integerValue ) then System.out.println( "Odd Rule- Test ID "+ testId ); TestResult

How can I export & import a local project in Decision Manager?

时光怂恿深爱的人放手 提交于 2019-12-08 07:07:15
问题 I'm using Red Hat Decision Manager, I had my projects done and I wanted to deploy it to another pc. All I can get is a jar file but when I import it Decision Manager responded Not project found. Hoping for any help please. Thanks! 回答1: An additional way to export a project from Red Hat Decision Manager: Login to Decision Central Enter to the project that you want to export. Click on any of the assets available in the library (this will take you to the project explorer view) From the project

Check all elements of a list (Drools Expert)

萝らか妹 提交于 2019-12-08 06:46:07
问题 I'm trying to write rules in Drools Expert. In the when part of the rule, I check some properties of an Application object. This object contains a List and I would like to check if a bunch of rules apply to all objects of SomeOtherType in this list. The rule should fire only when the constraints are valid for ALL objects in that list. rule "Application eligible" when app : Application( some constrains & write some constraints for all objects in app.getList() (a method that returns a List