drools

Creating a drools route in Camel

↘锁芯ラ 提交于 2019-12-12 04:57:47
问题 I'm getting the following error while deploying a Camel route using the drools-camel component. This is how my route looks like. <route id="drools-route"> <from uri="direct:drools-ep" /> <policy ref="droolsPolicy"> <unmarshal ref="xstream" /> <to uri="drools:node1/ksession1" /> <marshal ref="xstream" /> </policy> </route> <bean id="droolsPolicy" class="org.drools.camel.component.DroolsPolicy" /> 268 [ http-bio-8080-exec-5] SpringCamelContext INFO Apache Camel 2.10-SNAPSHOT (CamelContext:

How do I load a xml in Optaplanner

白昼怎懂夜的黑 提交于 2019-12-12 04:36:20
问题 I have created a MySQL database with entries similar to nurse roster, Now i need to send this data to optaplanner deployed on my server. To which file do i need to send it in the optaplanner folder deployed on server to get the results displayed on my webpage. I'm using Xstream to generate XML file. Can any one please give me brief on how to make this functionality work and get me the desired results. 回答1: The whole dataset serialization from and to XML is part of optaplanner-examples:

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

Drools and Camel : Failed to load type converters Cannot find any type converter classes [org.drools.camel.component]

落花浮王杯 提交于 2019-12-12 04:07:08
问题 Can someone help me with the following exception. I'm using Apache Camel (2.10-SNAPSHOT) and Spring (3.0.7.RELEASE) with Tomcat (7.0.26). My Drools dependency in my pom.xml is <dependency> <groupId>org.drools</groupId> <artifactId>drools-camel</artifactId> <version>5.3.0.Final</version> <exclusions> <exclusion> <groupId>org.springframework</groupId> <artifactId>spring</artifactId> </exclusion> </exclusions> </dependency> Exception on Tomcat log is - org.apache.camel.RuntimeCamelException: org

How to call a Java function in drools?

╄→гoц情女王★ 提交于 2019-12-12 03:55:28
问题 I want to call a Java function from a Utils class which calls a JPA Repository method for retrieving a custom object. I want to call this function from a Drools decision table. Now, this simple function is giving Null Pointer Exception and I have already lost several hours on this. I have a Functions field declared under "Import" section of the decision table, and there I have declared a simple function which calls this particular Java function with the repository method. Can you provide me

java.lang.NullPointerException when creating a StatefulKnowledgeSession with JPAKnowledgeService

无人久伴 提交于 2019-12-12 03:35:16
问题 I am trying to get JPAKnowledgeService work with my Spring Boot application. For this I have followed the instructions from here. My persistence.xml : <?xml version="1.0" encoding="UTF-8" ?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="org.jbpm.persistence.jpa"

How to write a rule for alphanumeric ranges in Drools using excel file

强颜欢笑 提交于 2019-12-12 03:07:47
问题 I'm new to Drools, so pardon me if the question seems stupid. I have written rules for values which have ranges in numeric format. Can someone please let me know how can we write rules for alphanumeric ranges. Below is the rule I've written for numeric ranges. claim.Medicalcare.get("CLM07-00").Value >= $1, claim.Medicalcare.get("CLM07-01").Value <= $2 The above rule is for values ranging 1-9. I need to write a rule which has values G0129-G2341,M9867,99234-99350. I'm writting these rules in

Create alias for conditions in Drools Decision table

十年热恋 提交于 2019-12-12 02:13:12
问题 Attached is my decision table, where in I'm using sv2.SV202_CompMedProcedId.get("SV202-02") several times in my condition. Is there any way that we can create an alias for sv2.SV202_CompMedProcedId.get("SV202-02") (for example, S) and use that alias in my condition instead of using the entire line every time? CONDITION sv2.SV202_CompMedProcedId.get(""SV202-02"").Value >= '70010' && sv2.SV202_CompMedProcedId.get(""SV202-02"").Value <= '76499' || sv2.SV202_CompMedProcedId.get(""SV202-02"")

jBPM6: using rules contained in a separate jar artifact

旧城冷巷雨未停 提交于 2019-12-12 01:52:30
问题 I'm trying to implement a jBPM6 project containing both processes and rules. One thing I would like to achieve (if it is possible) is to develop a separate artifact containing only the rules definitions, and then referencing this jar into the processes' project via maven, being able to execute the rules from my processes. I implemented this solution, but when I execute one of the process that uses the rules none of the rules is fired. To verify that there were no implementation problems I put

Setting KieContainer kie.maven.settings.custom

感情迁移 提交于 2019-12-12 01:47:29
问题 I am using drools with scala in apache spark. In order for KIE to know to look at my private nexus repository for the compiled rules, I am attempting to set the system property: "kie.maven.settings.custom" to a custom settings.xml file which is included in the working directory of the jar file. I am attempting to set this system property at run time, but am having mixed results. Here is my code to set "kie.maven.settings.custom" val userDir = System.getProperty("user.dir") val customPath =