[jboss-jira] [JBoss JIRA] (DROOLS-477) KieScanner is not working as expected

RH Bugzilla Integration (JIRA) issues at jboss.org
Wed May 28 05:59:17 EDT 2014


    [ https://issues.jboss.org/browse/DROOLS-477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971134#comment-12971134 ] 

RH Bugzilla Integration commented on DROOLS-477:
------------------------------------------------

Ryan Zhang <rzhang at redhat.com> changed the Status of [bug 1096128|https://bugzilla.redhat.com/show_bug.cgi?id=1096128] from MODIFIED to ON_QA

> KieScanner is not working as expected
> -------------------------------------
>
>                 Key: DROOLS-477
>                 URL: https://issues.jboss.org/browse/DROOLS-477
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    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.2.3#6260)


More information about the jboss-jira mailing list