[jboss-jira] [JBoss JIRA] (DROOLS-654) Dynamic update with KieContainer.updateToVersion() not working when ksession was created with config
Mario Fusco (JIRA)
issues at jboss.org
Wed Nov 26 13:48:39 EST 2014
[ https://issues.jboss.org/browse/DROOLS-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023376#comment-13023376 ]
Mario Fusco commented on DROOLS-654:
------------------------------------
Yes, sorry I forgot to mention this.
You can write this declaratively in the kmodule.xml file of your kproject. if you want you can also generate the kmodule.xml file programmatically and add it to the KieFileSystem, see an example here: https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/AbstractKieCiTest.java#L78
> Dynamic update with KieContainer.updateToVersion() not working when ksession was created with config
> ----------------------------------------------------------------------------------------------------
>
> Key: DROOLS-654
> URL: https://issues.jboss.org/browse/DROOLS-654
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final, 6.2.0.CR2
> Environment: Ubuntu Linux
> Reporter: Tihomir Meščić
> Assignee: Mario Fusco
> Priority: Blocker
>
> I'm creating my {{KieSession}} by setting {{STREAM}} as the event processing mode in the configuration:
> {{KieBaseConfiguration config = KieServices.Factory.get()}}
> {{.newKieBaseConfiguration();}}
> {{config.setOption(EventProcessingOption.STREAM);}}
>
> {{KieContainer kc = ks.newKieContainer( ... releaseId ... );}}
> {{KieSession ksession = kc.newKieBase(config).newKieSession();}}
> After that, everything works fine. But when I try to dynamically update to a new version (containing new rules):
> {{kc.updateToVersion( ... newReleaseId... );}}
> It seems like all of the facts are removed from the session, and my rules are no longer triggered.
> When I do not use the configuration object when creating the session and just use:
> {{KieSession ksession = kc.newKieSession();}}
> then, everything works as expected. However, this is not an option because I need a way to specify the processing mode as {{STREAM}} (and this is the only way I know of).
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
More information about the jboss-jira
mailing list