drools-kie-server

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

How to return a list from inside of accumulate in drl Drools?

大憨熊 提交于 2019-12-24 23:09:47
问题 Here is my rule rule "Multiple bookings via same mobile" when (stayDateGroupingIteration : StayDateGroupingDto($stayGroupedBookings : stayGroupedBookings)) and (QueryTypeDto( queryType == "multiple" )) $travellerCount :Number() from accumulate(BookingSummaryDtoList( $bookingSummaryDtoList : bookingSummaryDtoList) from $stayGroupedBookings, init( int count=0; List<String> globalList= new ArrayList(); Set<String> duplicateSet=new HashSet();), action( for(Object bookingSummary :

Drools - Resource does not have neither a source nor a target path

陌路散爱 提交于 2019-12-23 23:03:26
问题 I'm very new to Drools and adapted the Spring Boot configuration i found here to enable me to read a bunch of rules from a Database as String's instead of reading them from DRL Files in an application folder. When I startup my application using the code below i'm get the following exception using Spring Boot, Drools 6.5.Final, Java 1.8: Caused by: java.lang.RuntimeException: Resource does not have neither a source nor a target path. Impossible to add it to the bundle. Please set either the

Creating XML with JAXB KieServicesClient fails (KIE 6.5.0)

好久不见. 提交于 2019-12-13 03:39:57
问题 I have an Object like this: @XmlRootElement(name="com.Operation") @XmlAccessorType(XmlAccessType.FIELD) public class Operation implements java.io.Serializable { static final long serialVersionUID = 1L; @org.kie.api.definition.type.Label("systemCode") @XmlElement private int systemCode; [...] When I marshall this manually with following code it seems it works well: [...] JAXBContext jaxbContext = DroolsJaxbHelperProviderImpl.createDroolsJaxbContext(classNames, null); Marshaller marshaller =

ServiceResponse Result is always null (JAXB, KIE Workbench & KIE Server 6.5.0)

你。 提交于 2019-12-12 04:33:01
问题 I have a project setup in KIE Workbench, version 6.5.0 and a KIE execution server 6.5.0 running, all on the same local Wildfly 10. It is working fine. I have a simple rule that is being executed in a stateless KieSession, no process or whatsoever. I expect the rule to validate basic information and to add information about the fired validations to a global variable. In the example I am testing I just modify a global variable to see if it works, but for some reason I never get a result from

Create container command hangs, no error logged

混江龙づ霸主 提交于 2019-12-11 15:14:56
问题 I'm running Drools 7.7.0.final KIE server on tomcat. I am seeing this behavior when launching a container via RESTful call to the KIE server.... The container is never created, and the RESTful call hangs indefinitely. When I query the server I see that the container is stuck in 'status="Creating"'. This doesn't always happen. It seems to be dependent on the rules. For the most part, my LHS (when clause) are of the form.. myObject( (field1 != null) && field2 ) ... etc. ....where field2 is a

Drools Kie Scanner 7.5.0 not working

心不动则不痛 提交于 2019-12-11 14:33:46
问题 I am using Kie-CI api to scan the latest ruleset in local maven repository. Kie-CI is not working after upgrading to version 7.5.0. Below is the code I am using. Exception says artifact does not exists but actually artifact exists in repository. KJAR artifact is created using Kie-CI api. Any insights on this would be helpful. Code: @Async @Transactional public void scanLatestRuleset(String version){ log.info("Request received to activate new ruleset version: [ " + version + " ]"); KieServices