[jboss-jira] [JBoss JIRA] (DROOLS-1763) Dependent rule not firing
David Wade (JIRA)
issues at jboss.org
Tue Nov 28 00:18:00 EST 2017
[ https://issues.jboss.org/browse/DROOLS-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494456#comment-13494456 ]
David Wade edited comment on DROOLS-1763 at 11/28/17 12:17 AM:
---------------------------------------------------------------
Ahh,
{code}
KnowledgeBuilderConfiguration kbc= KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
kbc.setOption(PropertySpecificOption.ALLOWED);
KnowledgeBuilder knowledgeBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kbc);
knowledgeBuilder.add(ResourceFactory.newByteArrayResource(taxRule.getRuleXml().getBytes()), ResourceType.DRL);
Collection<KiePackage> knowledgePackages = knowledgeBuilder.getKnowledgePackages();
KieBaseConfiguration kieBaseConfiguration = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kieBaseConfiguration.setOption(ConstraintJittingThresholdOption.get(40));
knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(kieBaseConfiguration);
knowledgeBase.addPackages(knowledgePackages)
{code}
was (Author: david.wade):
Ahh,
{{
KieServices ks = KieServices.Factory.get();
Properties properties = new Properties();
properties.setProperty("drools.propertySpecific", "ALLOWED");
properties.setProperty("drools.jittingThreshold", "40");
ks.newKieBaseConfiguration(properties);
}}
But I can't see where I can pass that configuration back in.
> Dependent rule not firing
> -------------------------
>
> Key: DROOLS-1763
> URL: https://issues.jboss.org/browse/DROOLS-1763
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.0.0.Beta7, 7.3.0.Final
> Environment: Linux all versions.
> JDK 1.8.0 Update 144
> Reporter: David Wade
> Assignee: Mario Fusco
> Attachments: 7.0.0.Beta6.txt, 7.3.0.Final.txt
>
>
> We have been using Drools since 2.x.
> Currently we use 7.0.0.Beta6 which works.
> We can't upgrade because since 7.0.0.Beta7 rules dependent on the consequence of another rule are not firing for some reason. This happens for us on 7.0.0.Beta7 through to 7.3.0.Final.
> Consider the following two rules. When run on 7.0.0.Beta6 both rules fire. From Beta7 through to 7.3.0.Final, only the SQ rule fire, despite the RC rule passing its conditions
> {code}
> rule "H2"
> salience -300
> when
> segment:SegmentWithTax(
> containsTax("SQ")
> , notContainsTax("H2", "RC")
> )
> then
> segment.addPercentageTaxEntry(taxCodeMap,"SQ","RC_13_PERCENT");
> end
> rule "SQ"
> when
> segment:SegmentWithTax(
> !containsTax("SQ")
> )
> then
> modify(segment) {
> addTaxEntry(taxCodeMap,"SQ_TRANSFER_TRANSIT_LESS_THAN_FOUR_HOURS")
> }
> end
> {code}
> Will attach Drools trace logging output * 2. One for [^7.0.0.Beta6.txt] , one for [^7.3.0.Final.txt] .
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list