[
https://issues.jboss.org/browse/DROOLS-477?page=com.atlassian.jira.plugin...
]
Zahid Ahmed Prs commented on DROOLS-477:
----------------------------------------
Hi Team,
I am working on Drolls 6.1.0.Final. And my LATEST assets are not getting loaded. We have
created a kJar 1.0 with 5 rules in KIE-Workbench 6.1.0.Final. We start our application
server with KContainer having ReleaseId(gtoup, Artifact , LATEST). Rules are firing. Now
add another rule in workbench increment the kJar version 1.1 and perform build and deploy.
After waiting for 5mins fire the rules in application, LATEST Version IS NOT downloaded
in m2 local repo and old rules are getting fired. I even tries with setting maven's
update policy as interval:1, but in vain.
KIE Scanner is only getting triggered if I manually change the latest version and last
updated in metadata.xml in local m2 repo. In this case KIE Scanner loads the new rules.
Kindly let us know what needs to be done.
KieScanner is not working as expected
-------------------------------------
Key: DROOLS-477
URL:
https://issues.jboss.org/browse/DROOLS-477
Project: Drools
Issue Type: Bug
Affects Versions: 6.0.1.Final
Environment: Windows 7
Reporter: Alexander Pykhtin
Assignee: Mario Fusco
Fix For: 6.1.0.Beta4
Attachments: drools_jar.zip, drools_sample.zip
KieScanner is not dynamically updates the rules in a sample application.
drools_sample is a parent project, drools_jar is its dependency that is expected to be
dynamically updated.
Here is the sample code:
Scanner scanner = new Scanner(System.in);
try {
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId( "com.study", "drools_sample",
"0.0.1-SNAPSHOT" );
KieContainer kContainer = ks.newKieContainer( releaseId );
KieSession kSession = null;
KieScanner kScanner = ks.newKieScanner( kContainer );
boolean repeat = true;
// go !
while(repeat)
{
kSession = kContainer.newKieSession("ksession-rules_jar");
Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
DynamicFactType dft = new DynamicFactType();
kSession.insert(message);
kSession.insert(dft);
kSession.fireAllRules();
kSession.dispose();
String inp = scanner.nextLine();
if(inp.length() > 0)
repeat = false;
else
{
kScanner.scanNow();
}
}
} catch (Throwable t) {
t.printStackTrace();
}
scanner.close();
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)