[
https://issues.jboss.org/browse/JBRULES-2865?page=com.atlassian.jira.plug...
]
Kris Verlaenen commented on JBRULES-2865:
-----------------------------------------
Thanks a lot for the example project. There indeed was a difference between the valid and
invalid example in Drools 5.1.1 (which no longer exists in the latest Drools 5.2 SNAPSHOT
code). The reason that your rules are not executed (and this is actually the expected
behavior) is that rules are not executed by default, only when you call fireAllRules().
So that means, if a ruleset node is reached, the process will wait until those rules are
executed. If not fireAllRules() is called, this means no rules will be executed and the
process instance will simply wait.
To get the rules to fire (and the process instance to continue), simply call
ksession.fireAllRules() to execute the rules after call startProcess().
The reason that there was a difference between both version is that in Drools 5.1,
fireAllRules() was called automatically after completing a work item (like the log element
in this case). If you want to avoid having to call fireAllRules() manually, you can also
run the engine in reactive mode, meaning it will automatically execute rules when they are
activated.
Drools Flow execution with single RuleSet node (besides Start and
Stop nodes) results with no ruleset rules execution and java.lang.OutOfMemoryError.
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2865
URL:
https://issues.jboss.org/browse/JBRULES-2865
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core (flow)
Affects Versions: 5.1.0.FINAL, 5.1.1.FINAL
Environment: all
Reporter: Marek B
Assignee: Kris Verlaenen
Attachments: jbrules_2865.zip
Trying to invoke drools flow with single RuleSet element only (besides Start/Stop elems)
results in java.lang.OutOfMemoryError: GC overhead limit exceeded.
Also this bug affects probably all flows, with RuleSet element as first in execution
flow.
See stacktrace
Exception in thread "Worker#xxx.xxxxxx.xxx(3)" java.lang.OutOfMemoryError: GC
overhead limit exceeded
at java.util.Arrays.copyOf(Arrays.java:2746)
at java.util.concurrent.CopyOnWriteArrayList.add(CopyOnWriteArrayList.java:420)
at
org.drools.process.instance.event.DefaultSignalManager.addEventListener(DefaultSignalManager.java:57)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.addEventListener(WorkflowProcessInstanceImpl.java:377)
at
org.drools.workflow.instance.node.RuleSetNodeInstance.addRuleSetListener(RuleSetNodeInstance.java:55)
at
org.drools.workflow.instance.node.RuleSetNodeInstance.internalTrigger(RuleSetNodeInstance.java:41)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:32)
at
org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:192)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1644)
at
org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:306)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira