[rules-users] Infinite loop while marshalling

Maciej Prochniak mpr at touk.pl
Wed Oct 7 09:51:56 EDT 2009


Hello,

I have 2 simple rules:

rule one
when
   A()
   not(B())
then
System.out.println("a");
end

rule two
when
   A()
then
System.out.println("b");
end

A and B are plain java objects with no properties.
When I create stateful knowledge session (default configuration) and do
the following:

session1.insert(new A());
session1.fireAllRules();
MarshallerFactory.newMarshaller(knowledgeBase).marshall(new
ByteArrayOutputStream(), session1);

I get an infite loop (resulting byte array eats up all heap space, no
matter how much I set).
Am I doing sth wrong or is it a bug?

br,
maciek prochniak




More information about the rules-users mailing list