[
https://issues.jboss.org/browse/JBRULES-3187?page=com.atlassian.jira.plug...
]
Marco Rietveld updated JBRULES-3187:
------------------------------------
Description:
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}
was:
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}
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