[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-3187) GetFactHandlesCommand does not return FactHandles when "connected"
Marco Rietveld (JIRA)
jira-events at lists.jboss.org
Wed Aug 24 13:41:17 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-3187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marco Rietveld resolved JBRULES-3187.
-------------------------------------
Resolution: Done
See my pull request
- "Fixed bug with "disconnected" factHandles (JBRULES-3187) and added a test"
> GetFactHandlesCommand does not return FactHandles when "connected"
> ------------------------------------------------------------------
>
> Key: JBRULES-3187
> URL: https://issues.jboss.org/browse/JBRULES-3187
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.3.0.Beta1
> Reporter: Marco Rietveld
> Assignee: Marco Rietveld
> Priority: Minor
>
> The GetFactHandlesCommand contains a bug that means that an empty collection (instead of a possibly filled one) of FactHandles is returned when the GetFactHandlesCommand.disconnected boolean is false.
> You can recreate this by doing one of the following:
> {code}
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> ksession = kbase.newStatefulKnowledgeSession();
> KnowledgeCommandContext kContext
> = new KnowledgeCommandContext( new ContextImpl( "ksession", null ), null, null, this.ksession, null );
> commandService = new DefaultCommandService(kContext);
> ksession.insert("fact");
>
> GetFactHandlesCommand command = new GetFactHandlesCommand();
> Object result = commandService.execute(command);
> Collection<FactHandle> factHandles = (Collection<FactHandle>) result;
> Assert.assertTrue( "FactHandles collection should contain at least one fact!", (factHandles.isEmpty()) );
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list