rule-engine

I need to add .drl files at runtime (From an S3 bucket) and supply it to drools rule engine

ぃ、小莉子 提交于 2020-01-16 18:25:19
问题 Unable to add rules at runtime through ResourceFactory.newURLResource() Also , KnowledgeBase is deprecated or cannot be resolved I have tried all the snippets from the documentation public class RuleRunner { public RuleRunner() { } public void runRules(String[] rules, Object[] facts) throws Exception { KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); for ( int i = 0; i < rules.length; i++ ) { String

timer ( cron:* * 10-18 * * ? ) rule consequences output duplicated

£可爱£侵袭症+ 提交于 2020-01-16 08:03:48
问题 I want to limit the rule run in a specfic time span ,the rule i wrote is as below rule "Event3" timer ( cron:* * 10-18 * * ? ) no-loop when $m : EventTest( originNumber == "123", originNumber : originNumber ) from entry-point "ATM Stream" or $m : EventTest( originNumber == "456",originNumber : originNumber ) from entry-point "ATM Stream" then System.out.println( $m.getOriginNumber() ); end when i insert a new fact into engine,every inserted fact before will duplicated triger the rule,how can

Does JBoss Drools really execute all rules in parallel?

℡╲_俬逩灬. 提交于 2020-01-13 03:13:05
问题 I've read a lot of documentation of JBoss Drools but cannot find a definitive answer as to if all rules are executed concurrently (certainly they are fired concurrently). More specifically, for a single input and a rule set of say 1000 rules, do the "when" conditions and the "then" conditions in each rule, execute sequentially one by one, or in parallel at the same time. On the one hand the rete algorithm implies parallelism, certainly when the select nodes are collapsed. However after the

CLIPS Error:Template xxx does not exist for assert

半腔热情 提交于 2020-01-06 05:46:09
问题 CLIPS version: 6.31 language: c++ clips C API Why am I getting this error? How should I fix this error? [FACTRHS1] Template be-contact-model.riskLevel does not exist for assert. Function load-facts encountered an error The process is as follows: Firstly, I create a CLIPS environment from the full clips rule code using the ClipsEnvLoadFromString function, I will get a normal result in this CLIPS environment using the EnvLoadFactsFromString function.Next I want to copy more than one CLIPS

Multiple boolean conditions in a rule in drools?

 ̄綄美尐妖づ 提交于 2020-01-01 19:01:31
问题 I have created a rule whose "when" condition is as follows :- when $map: Map(this["key1"].equals("value1")) and Map(this["key2"].equals("value2")) then ... The above condition is working fine. Now how do I add multiple boolean conditions in a rule? For eg. The above rule could be summarized as : a and b so if I want to create a rule : (a and b) or c then what would be actual drl syntax for it. I am new to drools so kindly help me with the syntax of the rule (a and b) or c. I did create a

Rules Engine in C or Python [closed]

久未见 提交于 2019-12-31 16:38:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 months ago . I am looking for a rules engine in C or Python, but if you know a rules engine that is implemented in another language I would be glad to know about it. The engine will be used as way to automate a house, like turning the light off when somebody leaves a room etc. So no "office" rules there (aka do you rules in

Rules Engine in C or Python [closed]

谁说我不能喝 提交于 2019-12-31 16:36:52
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 months ago . I am looking for a rules engine in C or Python, but if you know a rules engine that is implemented in another language I would be glad to know about it. The engine will be used as way to automate a house, like turning the light off when somebody leaves a room etc. So no "office" rules there (aka do you rules in

Rule Engine in JavaScript [closed]

瘦欲@ 提交于 2019-12-30 03:44:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Is there any Rule engine in JavaScript? The question is in this context: Consider a web application having a form that users fill up. As a user fills up each field and proceeds to the next, business logic written in JavaScript controls the visibility(and other attributes) of form elements further down the page.

When should you NOT use a Rules Engine? [closed]

你说的曾经没有我的故事 提交于 2019-12-29 10:07:26
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I have a pretty decent list of the advantages of using a Rules Engine, as well as some reasons to use them, what I need is a list of the reasons why you should NOT use a Rules Engine The best I have so far is this: Rules engines are not really intended to handle workflow or

Drools - Grouping multiple dsl conditions in dslr's when part throws error

∥☆過路亽.° 提交于 2019-12-25 09:03:07
问题 Am creating a small rule engine and using drools for it. My design is like the developer (that's me :)) will develop dsl and a business user can create rules (dslr). dsl file [When]When [Pp]urchase amount is greater than "{Value}" = e : Event(EventAction.isPurchaseGreaterThan(e,{Value})) [When]If [Cc]ustomer tier equals to "{CustomerTier}"=e1 : Event(EventAction.isCustomerTierEqualTo(e1,"{CustomerTier}") [Then]Give "{Discount}" Percentage Discount = RewardAction.applyDiscount(e, {Discount});