drools

Drools Change Set

僤鯓⒐⒋嵵緔 提交于 2019-12-30 10:00:10
问题 I have change set file <change-set xmlns='http://drools.org/drools-5.0/change-set' xmlns:xs='http://www.w3.org/2001/XMLSchema-instance' xs:schemaLocation='http://drools.org/drools-5.0/change-set http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'> <add> <resource source='http://172.16.13.33:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/Eligibility/Eligibility' type='PKG' /> <resource source='http://172.16.13.33:8080/drools-guvnor

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.

Drools .drl files giving runtime error on ZOS

懵懂的女人 提交于 2019-12-25 16:48:23
问题 I have created a runnable jar containing drools engine functionality (.drl files are also inside jar) while running on windows the output is fine but on ZOS I get the below error with respect to .drl files. java.lang.RuntimeException: Error while creating KieBaseÝMessage Ýid=1, kieBase= rules, level=ERROR, path=rules/Sample.drl, line=1, column=0 text=ÝERR 101¨ Line 1:41 no viable alternative at input ''¨, Message Ýid=2, k ieBase=rules, level=ERROR, path=rules/Sample.drl, line=1, column=0 text

JPA: configure persistence provider

天涯浪子 提交于 2019-12-25 11:57:03
问题 I got a simple java project created with maven (quickstart archetype) I am trying to configure JPA persistence for drools sessions (the code comes from drools documentation) I added drools-persistence-jpa, Bitronix Transaction Manager and com.h2database dependencies to my pom.xml I created a META-INF folder as Source-Folder in my Eclipse Project in "src/META-INF" I added the persistence.xml and jndi.properties file there. In my TestCase I have following code: [...] EntityManagerFactory emf =

OptaPlanner CVRPTW - solution with capacity issue

拥有回忆 提交于 2019-12-25 09:36:19
问题 I have the following CVRPTW problem and I'm trying to find a good solution with OptaPlanner. Time is in hh:mm:ss format. My DRL file is like this. Moreover I defined also a hard contraint relative to the arrival before ready time. My solver configuration is like this, with the difference of the termination tag: <termination> <terminationCompositionStyle>OR</terminationCompositionStyle> <maximumSecondsSpend>10</maximumSecondsSpend> <scoreAttained>0hard/-750000soft</scoreAttained> </termination

OptaPlanner Nurse Rostering accumulate sum Null Pointer Exception

南楼画角 提交于 2019-12-25 09:10:06
问题 I try to modify the OptaPlanner nurse Roster example. So far, I want to write a rule in the drl file which reacts when an employee works more than 13 hours per day. I expanded the class shiftType to get hours per Shift. At first look, the rule seems to work but when there is no feasible solution after a while I get a NullPointerException. Here is some relevant code: rule "dailyRestPeriod" when ShiftAssignment($employee : employee, $shiftType : shiftType, $shiftDate : shiftDate, $employee!

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});

Loading real world XML problems in OptaPlanner 6.1.0

感情迁移 提交于 2019-12-25 07:15:53
问题 I've been studying the OptaPlanner framwork for a bit and have found the CloudBalancingHelloWorld example fits a problem I'm tasked with fairly well - only it loads a fake generated problem set and I'd like to create my own XML file and load that instead ... but the docs seem a bit sparse on this subject, and I don't see any examples. The existing code in CloudBalancingHellowWorld.java is: // Load a problem with 400 computers and 1200 processes // This gets replaced with a class that loads a

drools 6.0.1 workbench cannot deploy to tomcat7.0

久未见 提交于 2019-12-25 06:59:11
问题 I download kie-drools-wb-distribution-6.0.1.Final, and unzip it, copy kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war into tomcat7.0. After restarting tomcat, there is only one error logged in catalina.out and cause drools workbench cannot start correctly. Error listenerStart Context [/kie-wb] startup failed due to previous errors Note : I change the long war file name into simple one so that I can easily access web app. I have read the readme under kie-web, it mentioned that I need

Drools 5.1 memory issues

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 06:47:44
问题 Can drool 5.1 cause memory leak issues? We are using complex validation rules where we are calling java codes. Each request to backend load 2-3 drool files and new KnowledgeBase is created for each request. Can anyone throw more light on this? private void initRulesEngine() { kbase = KnowledgeBaseFactory.newKnowledgeBase(); if (kbuilder != null) { kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); } } public void executeRules(BaseUOW requestedUOW) { initRulesEngine(); ksession =