drools-guvnor

Drool rules using cron expression?

纵饮孤独 提交于 2019-12-11 01:17:35
问题 I have one requirement that i want to fire rule only for weekdays.i have some rule like smoke, temperature, motion.can you suggest me how i can make rule as per my requirement.please provide me some example. Is there any better way to fire rules based on time other then cron? 回答1: You can fire rule on weekdays or weekends , same requirement i have faced , found some solution. you just fallow steps: DRL File: package com.javacodegeeks.drools; import java.text.DateFormat; import java.text

Drools REST CannotResolveClassException

我的未来我决定 提交于 2019-12-08 07:42:26
问题 Using Drools 5.5.0.Final with Guvnor 5.5.0.Final with the sample mortgages package. When submitting REST json request with the following Batch Execution Command: { "batch-execution": { "lookup":"ksession1", "commands":[ { "insert":{ "out-identifier":"outApplicant", "return-object":"true", "object": { "Applicant":{ "age":17 } } } }, { "fire-all-rules":"" } ] } } returns: 500 Internal Server Error com.thoughtworks.xstream.converters.ConversionException: Applicant : Applicant ---- Debugging

Retrieve drools working memory from Optaplanner solution

北城以北 提交于 2019-12-08 06:24:04
问题 When drl file used while solving constraints one could use insertLogical() which insert facts in drools working memory only and may not be retracted till completion of solution(LHS stay true forever for that insertLogical() ). When we get solution from Optaplanner's solver.solve() , we receive our own solution classes option like NurseRoster, CloudBalance. But how could I retrieve facts which stayed in Drools working memory till my solution stayed so I can see what caused solution? I'm

What is the new accepted way of programmatically creating new drools rules in Drools 6?

妖精的绣舞 提交于 2019-12-03 17:26:32
问题 In short I want to create, edit and delete rules from a rules repository at runtime. I'm having trouble figuring out how to do this in drools 6+. I know in a previous version of drools (<= 5.6), that there was an XML representation of a .drl file and an API for working with it: https://docs.jboss.org/drools/release/5.6.0.Final/drools-expert-docs/html/ch04.html#d0e8052. The drools documentation as of 5.6 indicates this deprecated and it appears to be completely removed at 6. I don't want to

Steps to deploy Guvnor in Glassfish

北战南征 提交于 2019-12-03 13:51:23
问题 When I had tried deploying Guvnor onto Glassfish, I hit the same problem as here. If anyone has performed a successful deployment, what are the steps to deploy a recent version of Guvnor (e.g. 5.4) to a recent version of Glassfish (e.g. 3.1)? 回答1: The steps for deploying Guvnor 5.4 are: Take the guvnor-5.4.0.Final-jboss-as-7.0.war binary war file Remove WEB-INF/lib/javassist-3.14.0-GA.jar from the binary war file Add the a glassfish-web.xml file to WEB-INF see here Replace WEB-INF/web.xml

Is there any API in drools to create the drl files dynamically by just passing values?

China☆狼群 提交于 2019-12-03 10:38:53
问题 I know how to create DRL files inside KIE workbench by using all the methods. But what my problem is without using the KIE workbench, can we create the .drl file by using our required values.If any possibility is there please suggest me. Same way suggest me any API is regarding to that. Thanks in advance. 回答1: You can use Drools Fluent API. Try below sample code : package com.sample; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import org.drools.lang

How and is it worth to integrate Java Webapp + drools + Guvnor?

和自甴很熟 提交于 2019-12-03 08:55:52
问题 I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize (physically and logically) the business rules from the application. Since these business rules would be very often by the business, I would want the business to make necessary changes to the rules via GUI. I have Googled on integrating java web app + Drools + Guvnor and I'm not getting anywhere. My Questions: Does Drools support a lightweight GUI for editing the rules? Is Drools Guvnor a

Steps to deploy Guvnor in Glassfish

人走茶凉 提交于 2019-12-03 03:47:09
When I had tried deploying Guvnor onto Glassfish, I hit the same problem as here . If anyone has performed a successful deployment, what are the steps to deploy a recent version of Guvnor (e.g. 5.4) to a recent version of Glassfish (e.g. 3.1)? The steps for deploying Guvnor 5.4 are: Take the guvnor-5.4.0.Final-jboss-as-7.0.war binary war file Remove WEB-INF/lib/javassist-3.14.0-GA.jar from the binary war file Add the a glassfish-web.xml file to WEB-INF see here Replace WEB-INF/web.xml with this Repackage the binary war file and deploy to glassfish I have a project on git hub that automates

Is there any API in drools to create the drl files dynamically by just passing values?

时间秒杀一切 提交于 2019-12-03 00:13:10
I know how to create DRL files inside KIE workbench by using all the methods. But what my problem is without using the KIE workbench, can we create the .drl file by using our required values.If any possibility is there please suggest me. Same way suggest me any API is regarding to that. Thanks in advance. Chris_F I interpret your question in two different ways. 1. Is it possible to write rules for Drools without using the KIE workbench? Yes, it should support importing rules so all you need to do is open up a text editor and start typing. The rules are written as text using a fairly simple

How and is it worth to integrate Java Webapp + drools + Guvnor?

末鹿安然 提交于 2019-12-02 23:05:45
I am planning on introducing Java rules and currently in the process of evaluating Drools to externalize (physically and logically) the business rules from the application. Since these business rules would be very often by the business, I would want the business to make necessary changes to the rules via GUI. I have Googled on integrating java web app + Drools + Guvnor and I'm not getting anywhere. My Questions: Does Drools support a lightweight GUI for editing the rules? Is Drools Guvnor a lightweight GUI, or is there are a way to step it down? How easy to integrate an application to Guvnor