You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then we are repeating steps from step 2 to 4 again and again.
This log always return no facts.
We have declared fact in drl file this is the fact declaration:
declare GtiAssetMessageData
id: String
prefix : String
suffix : String
domesticAssetTy : String
common : String
countryOfTax : Integer
countryOfTaxSub : Boolean
active : Integer
z2 : Integer
z2Sub : Boolean
lu : Integer
luSub : Boolean
issdCapInd : String
interestFreqDayNoTranslated : int
usualPayDates : String
shortDesc : String
longDesc : String
cntryQuote : String
assetIdTy : String
assetId : String
relatedInd : String
relatedAssets : String
earliestNotificationDt : Integer
end
We have rule which creates inserts this fact in drools working memory
// rule values at B39, header at B22
rule "Initialize > Default"
no-loop true
when
state : State(current == "Initialize3")
RuleSet(simulatedSequentialSalience == -14)
then
GtiAssetMessageData gamd = new GtiAssetMessageData();
gamd.setId(decisionTableHelper.getRandomId());
gamd.setCommon("");
gamd.setActive(0);
gamd.setCountryOfTax(0);
gamd.setZ2(0);
gamd.setLu(0);
gamd.setIssdCapInd(" ");
gamd.setUsualPayDates("");
gamd.setShortDesc("");
gamd.setLongDesc("");
gamd.setCountryOfTaxSub(false);
gamd.setLuSub(false);
gamd.setZ2Sub(false);
gamd.setRelatedInd("");
gamd.setRelatedAssets("");
insert(gamd);
decisionTableHelper.log("\nInitialize > Default fired - inserted GtiAssetMessageData with id:"+gamd.getId());
state.setCurrent ("save AssetId");
update (state);
end
This fact always remains in working even though we delete all the facts from working memory.
We are facing this issue in drools version 7.60.0.Final, 7.61.0.Final, 7.62.0.Final with java 17 and java 21. But these drools version work fine with java 11
I have attached all the drools version compatibility testing result in below attached excel
Hi, The latest version is 10.0.0 which requires JDK 17+. Please confirm if your rules work with 10.0.0. If you face the issue with 10.0.0, please share a reproducer (= a simple maven project to reproduce the issue). Thanks!
Hi,
Step -1 We are creating kieSession using below code:
final Resource resource = ResourceFactory.newFileResource(drlFile);
final KnowledgeBuilderConfiguration kConfig = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
kConfig.setOption(PropertySpecificOption.DISABLED);
final KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kConfig);
kBuilder.add(resource, ResourceType.DRL);
kbase=kBuilder.newKieBase();
KieSession ksession=kbase.newKieSession();
Step -2 We fire all the rules using fireAllRules Method like so:
int thisIterNumRulesFired = ksession.fireAllRules();
Step -3 Then after firing all the rule we are retract all the facts from working memory like so:
Collection<FactHandle> factHandles = ksession.getFactHandles();
List<FactHandle> handlesToRetract = new ArrayList<>(factHandles);
for (FactHandle handle : handlesToRetract) {
ksession.retract(handle);
}
Step -4 After this, We are logging how many object remain in drools working memory:
log.info("After deleted: " + ksession.getObjects().stream().toList());
Then we are repeating steps from step 2 to 4 again and again.
This log always return no facts.
We have declared fact in drl file this is the fact declaration:
declare GtiAssetMessageData
id: String
prefix : String
suffix : String
domesticAssetTy : String
common : String
countryOfTax : Integer
countryOfTaxSub : Boolean
active : Integer
z2 : Integer
z2Sub : Boolean
lu : Integer
luSub : Boolean
issdCapInd : String
interestFreqDayNoTranslated : int
usualPayDates : String
shortDesc : String
longDesc : String
cntryQuote : String
assetIdTy : String
assetId : String
relatedInd : String
relatedAssets : String
earliestNotificationDt : Integer
end
We have rule which creates inserts this fact in drools working memory
// rule values at B39, header at B22
rule "Initialize > Default"
no-loop true
when
state : State(current == "Initialize3")
RuleSet(simulatedSequentialSalience == -14)
then
GtiAssetMessageData gamd = new GtiAssetMessageData();
gamd.setId(decisionTableHelper.getRandomId());
gamd.setCommon("");
gamd.setActive(0);
gamd.setCountryOfTax(0);
gamd.setZ2(0);
gamd.setLu(0);
gamd.setIssdCapInd(" ");
gamd.setUsualPayDates("");
gamd.setShortDesc("");
gamd.setLongDesc("");
gamd.setCountryOfTaxSub(false);
gamd.setLuSub(false);
gamd.setZ2Sub(false);
gamd.setRelatedInd("");
gamd.setRelatedAssets("");
insert(gamd);
decisionTableHelper.log("\nInitialize > Default fired - inserted GtiAssetMessageData with id:"+gamd.getId());
state.setCurrent ("save AssetId");
update (state);
end
This fact always remains in working even though we delete all the facts from working memory.
We are facing this issue in drools version 7.60.0.Final, 7.61.0.Final, 7.62.0.Final with java 17 and java 21. But these drools version work fine with java 11
I have attached all the drools version compatibility testing result in below attached excel
drools_java_version_compatibility.xlsx
The text was updated successfully, but these errors were encountered: